Score customer churn risk and trigger CS follow-ups with Postgres, Mixpanel, Zendesk, Gmail, Calendly, ClickUp, and Slack
Quick overview
Description
Quick overview This workflow runs every 6 hours to combine customer usage and NPS data from Postgres with Mixpanel engagement and Zendesk ticket signals, calculate a churn risk score, and trigger Customer Success interventions via Gmail, Calendly, ClickUp, Slack, and a Postgres intervention log. How it works Runs every 6 hours on a schedule trigger. Pulls recent product usage and last-login data from Postgres, fetches engagement data from Mixpanel, fetches recent NPS responses from Postgres, and retrieves recent tickets from Zendesk. Merges the four data sources into a single per-customer record keyed by customer_id. Calculates a composite churn score and risk level (low/medium/high) based on login recency, feature usage change, seat utilization, NPS score, and ticket signals. Skips customers below the churn-risk threshold and routes at-risk customers to intervention steps. Sends a personalized check-in email via Gmail for churn-risk customers, and for high-risk customers also creates a Calendly scheduled event, opens a follow-up task in ClickUp, and posts an escalation message to a Slack channel. Logs the intervention details back to Postgres. Setup Add Postgres credentials and update the SQL queries and table/column names for usage snapshots, NPS responses, and the churn_intervention_log insert. Add Mixpanel API credentials and replace YOUR_MIXPANEL_PROJECT_ID in the Mixpanel request body. Add Zendesk credentials and set any required account/subdomain settings to retrieve the right ticket data. Add Gmail OAuth2 credentials and ensure your customer records provide contact_email and (optionally) contact_first_name. Add Calendly API credentials and replace YOUR_CS_CALL_EVENT_TYPE_ID (or adjust the step if you only want to include a booking link in the email). Add ClickUp and Slack credentials, then replace YOUR_CS_LIST_ID, set the target Slack channel and ACCOUNT_MANAGER_SLACK_ID, and adjust churn score thresholds in the scoring logic as needed. An n8n automation workflow template by Rahul Joshi.
Community Metrics
Author
Rahul Joshi
Platform
web
Pricing model
free
Categories
- Automation
Tags
- n8n
- workflow
- http-request
- postgres
- slack
- zendesk
- clickup
- gmail
- code
Capabilities
- 7 nodes
- 9 views