Free n8n template

AI churn risk alerts n8n template

What it does

An importable n8n workflow that runs every Monday, joins your account map with Stripe failed payments and the last 14 days of Zendesk tickets, scores each account with rules you can read, and has Claude tag concerns in flagged accounts' tickets with supporting quotes. Each owner gets a Slack message with their top ten accounts, the signals, a short reason and one next step.

What this workflow does

  1. Mondays at 8am (Schedule Trigger) starts the weekly run.
  2. Read account map (Google Sheets) loads one row per account with its Stripe customer ID, Zendesk organization ID, owner, renewal date and active user counts. This is the mapping table the guide describes.
  3. Stripe failed payments (HTTP Request) lists invoice.payment_failed events from the last 30 days.
  4. Zendesk recent tickets (HTTP Request, Zendesk search API) pulls tickets created in the last 14 days.
  5. Score accounts (Code) applies documented point rules: usage down 30 percent or more, a failed payment, renewal within 60 days (worth more when usage is down), three or more tickets, and open high-priority tickets. Accounts at or above the threshold move on.
  6. Read tickets with Claude (HTTP Request) returns strict JSON: concern tags from a fixed list (feature gap, competitor mentioned, champion change, budget, service failure, expansion signal), each with a verbatim quote, a short reason and one next step from your list.
  7. Build owner digests (Code) handles refusals and API errors by falling back to the rule reasons, groups accounts by owner, sorts by score and caps each digest at ten.
  8. Exception? (If) sends AI failures and accounts without an owner to Post churn exception, and the digests to Send owner digest as Slack direct messages.

Before you import

  • A current n8n version.
  • A Stripe restricted key with read access to events, a Zendesk API token, an Anthropic API key and a Slack bot that can message users.
  • A Google Sheet with an Accounts tab. Usage numbers come from your product database or analytics; sync them into the sheet or swap the sheet node for a Postgres query.

Setup

  1. Import the JSON and connect the five credentials.
  2. Create the Accounts tab with headers: account_id, account_name, owner_slack_id, stripe_customer_id, zendesk_org_id, renewal_date, active_users_now, active_users_prior, crm_url.
  3. Replace REPLACE_WITH_SHEET_ID, REPLACE_WITH_ZENDESK_SUBDOMAIN and REPLACE_WITH_SLACK_EXCEPTIONS_CHANNEL_ID.
  4. Edit RULES and THRESHOLD in Score accounts, and the tag and next-step lists if your team uses different ones.

Test it

Add three test rows: one with a big usage drop and a renewal next month, one with a Stripe customer that had a failed payment in test mode, and one healthy account. Run the workflow manually. Two accounts should be scored, the healthy one skipped, and the owner should get one Slack message. Blank one owner ID to see the exception path.

Make it production-ready

  • Back-test the rules against last year’s churned accounts before rollout, and run for a month with CS leadership only.
  • Stripe and Zendesk return 100 results per page here. Add pagination for larger books.
  • Add a “handled” button and log owner actions, which feeds the quarterly accuracy review in the guide.
  • Add an n8n error workflow so a failed weekly run is noticed the same day.
  • Keep the AI to reading tickets. Scores stay in code so owners can see exactly why an account was flagged.

Read the full guide on AI churn risk alerts for signal selection and back-testing, or work with Lumeor to connect HubSpot, Chargebee or your warehouse.

Next steps