Why n8n?
- Self-hosted: Keep your data on your own servers
- Open source: Full transparency and customization
- No vendor lock-in: Export and own your workflows
- Powerful: Complex branching, loops, and error handling
Setting Up SendPilot in n8n
Step 1: Create a Webhook Node (Trigger)
- Create a new workflow in n8n
- Add a Webhook node as the trigger
- Set method to
POST - Copy the webhook URL (e.g.,
https://your-n8n.com/webhook/abc123)
Step 2: Register Webhook in SendPilot
- Go to SendPilot Integrations → Webhooks
- Click Add Webhook
- Paste your n8n webhook URL
- Select events:
message.received,connection.accepted, etc. - Save
Step 3: Configure HTTP Request Node (Actions)
For calling SendPilot API, use the HTTP Request node:Example Workflows
1. Lead Reply → Slack + HubSpot
- Path:
/sendpilot-events - Method: POST
- Value 1:
{{$json["eventType"]}} - Operation: Equal
- Value 2:
message.received
- Channel:
#sales-leads - Message:
🎉 Reply from {{$json["data"]["linkedinUrl"]}}: {{$json["data"]["replyPreview"]}}
2. Google Sheet → Add Leads to Campaign
3. Connection Accepted → Enrich + CRM Sync
4. Daily Campaign Report
Reusable Credential Setup
Create a custom credential for SendPilot API:- Go to Credentials in n8n
- Click Add Credential
- Select Header Auth
- Configure:
- Name:
SendPilot API - Header Name:
X-API-Key - Header Value:
YOUR_API_KEY
- Name:
Error Handling
n8n provides excellent error handling:Complete Workflow JSON
Here’s a complete workflow you can import into n8n:Best Practices
Use Environment Variables
Use Environment Variables
Store your API key in n8n environment variables, not hardcoded in workflows.
Add Retry Logic
Add Retry Logic
Use the HTTP Request node’s built-in retry options for resilience.
Log Everything
Log Everything
Add logging nodes to track workflow execution for debugging.
Test with Real Data
Test with Real Data
Use n8n’s “Execute Workflow” feature to test with real webhook payloads.