n8n
Send Perly churn signals and health score changes to n8n workflows via webhooks. Self-hosted and cloud instances supported.
Overview
The n8n integration delivers Perly events to your n8n workflows via webhooks. Whether you run n8n self-hosted or use n8n Cloud, the setup is the same -- create a webhook node, paste the URL into Perly, and events start flowing.
This is an outbound-only integration. Perly pushes events to n8n via webhooks.
Available events
Perly can send the following event types to your n8n webhook:
- New Expansion Signal
- Customer At Risk
- Health Score Changed
- Upsell Opportunity Detected
- Billing Retry Failed
You choose which event types to forward when configuring the webhook in Perly.
Connecting n8n
No OAuth is required. The connection uses a standard webhook URL.
- 1Create a Webhook node in n8nIn your n8n instance, create a new workflow and add a Webhook node as the trigger. Set the HTTP method to POST.
- 2Copy the webhook URLn8n generates a unique URL for each Webhook node. Copy the production URL (not the test URL).
- 3Add the webhook in PerlyIn Perly, go to Settings > Integrations > n8n. Paste the webhook URL and select which event types to forward.
- Done -- events flow automaticallyPerly sends a test event to verify the connection. Activate your n8n workflow to start processing events.
Setting up a workflow
Once connected, build your n8n workflow using the webhook payload:
- Webhook node receives the Perly event as a JSON body.
- IF node or Switch node routes events based on
event_type. - Connect action nodes (Slack, email, HTTP request, database, etc.) to each branch.
Example workflow: Escalation pipeline
| Node | Action |
|---|---|
| Webhook | Receives customer_at_risk event from Perly |
| Switch | Branch by risk_level value |
| Slack (high) | Post to #cs-escalations channel |
| Email (critical) | Send urgent email to VP of Customer Success |
| Postgres | Insert event into internal analytics database |
Self-hosted considerations
If you run n8n self-hosted, ensure your webhook endpoint is publicly reachable by Perly's servers. You have two options:
- Public URL -- expose your n8n instance via a reverse proxy with HTTPS.
- Tunnel -- use n8n's built-in tunnel feature for development, or a service like Cloudflare Tunnel for production.
Perly's webhook delivery retries up to 5 times with exponential backoff if your endpoint is temporarily unreachable.
Payload format
All events follow the same JSON structure:
{
"event_type": "health_score_changed",
"customer_id": "cust_abc123",
"customer_name": "Acme Corp",
"customer_email": "admin@acme.com",
"health_score": 58,
"previous_health_score": 74,
"risk_level": "medium",
"signals": ["feature_usage_decline", "support_tickets_increasing"],
"timestamp": "2026-03-24T14:30:00Z"
}Event filtering
In Perly, you can filter which events reach your n8n webhook:
- By event type -- select specific triggers.
- By risk level -- only send events above a threshold.
- By health score delta -- only send changes above a minimum point swing.
Configure filters in Settings > Integrations > n8n > Event Filters.