n8n Integration
Connect LostChurn to n8n for self-hosted workflow automation.
LostChurn integrates with n8n, the open-source workflow automation platform. Use n8n to build custom recovery workflows, sync data to internal systems, or trigger notifications — all on your own infrastructure.
Prerequisites
- An n8n instance (self-hosted or n8n Cloud)
- A LostChurn account with an API key (generate one at Settings > API Keys)
Connection Methods
There are two ways to connect LostChurn to n8n:
Option A: Webhook Trigger (No Install Required)
The simplest approach uses n8n's built-in Webhook node to receive LostChurn outbound webhook events directly. No custom node installation is needed.
- In n8n, create a new workflow.
- Add a Webhook node as the trigger.
- Set the HTTP method to
POST. - Copy the webhook URL (it looks like
https://your-n8n.example.com/webhook/abc-123). - In your LostChurn dashboard, go to Settings > Webhooks.
- Click Add Endpoint and paste the n8n webhook URL.
- Select the event types you want to receive (e.g.,
recovery.succeeded,payment.failed). - Click Create.
- Back in n8n, click Listen for Test Event, then click Send Test Event in LostChurn.
- The test payload appears in n8n. Build your workflow from there.
This method works with any n8n installation and requires no community nodes. Events are delivered in real time via webhooks.
Option B: LostChurn Community Node
For a richer experience with built-in triggers, actions, and credential management, install the LostChurn community node.
Installation
n8n Cloud:
- Go to Settings > Community Nodes.
- Search for
@lostchurn/n8n-nodes. - Click Install.
Self-hosted:
cd ~/.n8n
npm install @lostchurn/n8n-nodesRestart your n8n instance after installation.
Authentication
- In n8n, go to Credentials > New Credential.
- Search for LostChurn API.
- Enter your LostChurn API key.
- Click Save.
Available Trigger Events
Whether you use the Webhook node or the community node, LostChurn sends the same event payloads:
| Event | Description |
|---|---|
recovery.started | A new recovery campaign has begun |
recovery.succeeded | A failed payment was successfully recovered |
recovery.failed | A recovery retry attempt failed |
recovery.exhausted | All recovery attempts used without success |
payment.failed | A new failed payment was received from a processor |
payment.retry_succeeded | A payment retry attempt succeeded |
campaign.step_executed | A campaign step was executed (email sent, SMS sent, etc.) |
campaign.completed | A recovery campaign finished all steps |
customer.created | A new customer record was created |
customer.updated | A customer record was updated |
Available Actions (Community Node)
The LostChurn community node provides these action nodes:
| Node | Description |
|---|---|
| LostChurn: Create Recovery Note | Add a note to an existing recovery |
| LostChurn: Pause Recovery | Pause an active recovery campaign |
| LostChurn: Resume Recovery | Resume a paused recovery |
| LostChurn: Update Customer | Update customer metadata |
| LostChurn: Get Recovery Stats | Retrieve recovery statistics for a date range |
Example Workflows
Recovery Alert to Slack
[LostChurn Trigger: recovery.succeeded]
→ [Slack: Send Message]
Channel: #revenue-recovered
Message: "Recovered ${{$json.amount / 100}} from {{$json.customer_email}}"Failed Payment to Database
[LostChurn Trigger: payment.failed]
→ [Postgres: Insert Row]
Table: failed_payments
Columns: email, amount, decline_code, timestampRecovery Exhausted to Manual Review
[LostChurn Trigger: recovery.exhausted]
→ [IF: amount > 10000]
→ True: [Gmail: Send Email] to cs-team@company.com
→ False: [Google Sheets: Append Row] for monthly reviewMulti-Step CRM Sync
[LostChurn Trigger: recovery.succeeded]
→ [HTTP Request: GET HubSpot Contact by email]
→ [IF: Contact exists]
→ True: [HTTP Request: UPDATE HubSpot Contact]
→ False: [HTTP Request: CREATE HubSpot Contact]
→ [HTTP Request: CREATE HubSpot Deal]Webhook Payload Format
All events follow the same structure documented in Outbound Webhooks:
{
"id": "evt_abc123",
"type": "recovery.succeeded",
"created_at": "2026-03-13T10:30:00Z",
"data": {
"recovery_id": "rec_xyz789",
"customer_email": "jane@example.com",
"customer_name": "Jane Doe",
"amount": 4999,
"currency": "usd",
"decline_code": "insufficient_funds",
"retry_count": 2,
"recovered_at": "2026-03-13T10:30:00Z"
}
}Signature Verification
LostChurn signs all outbound webhook payloads with HMAC-SHA256. To verify signatures in n8n:
- Add a Code node after your Webhook trigger.
- Use the following JavaScript to verify the signature:
const crypto = require('crypto');
const secret = 'your_webhook_signing_secret'; // from Settings > Webhooks
const signature = $input.first().headers['x-lostchurn-signature'];
const timestamp = $input.first().headers['x-lostchurn-timestamp'];
const body = JSON.stringify($input.first().json);
const expected = crypto
.createHmac('sha256', secret)
.update(`${timestamp}.${body}`)
.digest('hex');
if (signature !== expected) {
throw new Error('Invalid webhook signature');
}
return $input.all();Rate Limits
When using the community node's action nodes, standard LostChurn API rate limits apply:
| Plan | Rate Limit |
|---|---|
| Engine | 60 requests/minute |
| Recovery | 120 requests/minute |
| Command | 300 requests/minute |
Webhook triggers are not rate-limited — events are delivered as they occur.
Troubleshooting
Webhook not receiving events
- Verify your n8n webhook URL is publicly accessible (not
localhost) - Check that the workflow is active (not in draft/test mode)
- Verify the webhook endpoint is active in Settings > Webhooks
- Check the delivery log in Settings > Webhooks > [endpoint] > Deliveries
Community node not appearing
- Ensure you restarted n8n after installing the package
- Check the n8n logs for installation errors
- Verify the package is installed:
npm list @lostchurn/n8n-nodes
Authentication failed
- Generate a new API key at Settings > API Keys
- Update the credential in n8n at Credentials > LostChurn API
- Ensure the API key has the required scopes (
webhooks:read,webhooks:write,recoveries:read)
Next Steps
- Zapier Integration — managed alternative to n8n
- Outbound Webhooks — full webhook API reference
- API Keys — manage API keys and scopes