n8n

Send Perly churn signals and health score changes to n8n workflows via webhooks. Self-hosted and cloud instances supported.

~2 minPushwebhook

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.

n8n
PUSH
Perly
webhook events

Available events

Perly can send the following event types to your n8n webhook:

↓ PULL
    ↑ PUSH
    • 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.

    1. 1
      Create a Webhook node in n8n
      In your n8n instance, create a new workflow and add a Webhook node as the trigger. Set the HTTP method to POST.
    2. 2
      Copy the webhook URL
      n8n generates a unique URL for each Webhook node. Copy the production URL (not the test URL).
    3. 3
      Add the webhook in Perly
      In Perly, go to Settings > Integrations > n8n. Paste the webhook URL and select which event types to forward.
    4. Done -- events flow automatically
      Perly 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:

    1. Webhook node receives the Perly event as a JSON body.
    2. IF node or Switch node routes events based on event_type.
    3. Connect action nodes (Slack, email, HTTP request, database, etc.) to each branch.

    Example workflow: Escalation pipeline

    NodeAction
    WebhookReceives customer_at_risk event from Perly
    SwitchBranch by risk_level value
    Slack (high)Post to #cs-escalations channel
    Email (critical)Send urgent email to VP of Customer Success
    PostgresInsert 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.