Skip to main content
n8n is an open-source workflow automation tool that you can self-host for complete data privacy and control. It offers powerful nodes for HTTP requests and webhooks to integrate with SendPilot.

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)

  1. Create a new workflow in n8n
  2. Add a Webhook node as the trigger
  3. Set method to POST
  4. Copy the webhook URL (e.g., https://your-n8n.com/webhook/abc123)

Step 2: Register Webhook in SendPilot

  1. Go to SendPilot IntegrationsWebhooks
  2. Click Add Webhook
  3. Paste your n8n webhook URL
  4. Select events: message.received, connection.accepted, etc.
  5. Save

Step 3: Configure HTTP Request Node (Actions)

For calling SendPilot API, use the HTTP Request node:

Example Workflows

1. Lead Reply → Slack + HubSpot

Webhook Node Configuration:
  • Path: /sendpilot-events
  • Method: POST
IF Node Configuration:
  • Value 1: {{$json["eventType"]}}
  • Operation: Equal
  • Value 2: message.received
Slack Node Configuration:
  • Channel: #sales-leads
  • Message: 🎉 Reply from {{$json["data"]["linkedinUrl"]}}: {{$json["data"]["replyPreview"]}}

2. Google Sheet → Add Leads to Campaign

HTTP Request Node:

3. Connection Accepted → Enrich + CRM Sync

4. Daily Campaign Report

HTTP Request Node (Get Campaigns):

Reusable Credential Setup

Create a custom credential for SendPilot API:
  1. Go to Credentials in n8n
  2. Click Add Credential
  3. Select Header Auth
  4. Configure:
    • Name: SendPilot API
    • Header Name: X-API-Key
    • Header Value: YOUR_API_KEY
Now you can select this credential in HTTP Request nodes.

Error Handling

n8n provides excellent error handling:
Add an Error Trigger workflow to catch failures:

Complete Workflow JSON

Here’s a complete workflow you can import into n8n:

Best Practices

Store your API key in n8n environment variables, not hardcoded in workflows.
Use the HTTP Request node’s built-in retry options for resilience.
Add logging nodes to track workflow execution for debugging.
Use n8n’s “Execute Workflow” feature to test with real webhook payloads.

Deployment

Self-Hosted

n8n Cloud

Use n8n.cloud for a managed solution with the same features.