Skip to content
NEWMarketplace and your team: sell what you build, and get plans and changes that are tested before you see them. See what is new

Library / Email Automation

Email Automation

Score customer churn risk and trigger CS follow-ups with Postgres, Mixpanel, Zendesk

On a schedule, it handles email using ClickUp, Gmail, Postgres, Slack.

What it does

## 📉 Customer Churn Risk Scoring Agent – Automated CS Intervention ### How it works Every 6 hours, this workflow pulls signals from four data sources in parallel: product usage from your database, engagement scores from Mixpanel, NPS scores from your database, and recent support tickets from Zendesk. All four streams are merged into a single customer object. A code node computes a churn risk score per customer based on days since last login, engagement percentile, NPS score, and open ticket count. Customers above the risk threshold are routed: medium risk gets a personalised check-in email via Gmail; high risk additionally triggers a Calendly booking link, a ClickUp CS task, and a Slack escalation to the account manager. Every intervention is logged back to the database. ### Setup steps 1. Connect Postgres to Get Product Usage (DB) and Get Latest NPS Scores — replace with your DB connection. 2. Connect HTTP Request to Get Mixpanel Engagement — add your Mixpanel API key. 3. Connect Zendesk to Get Recent Support Tickets — set your Zendesk subdomain. 4. Adjust the score thresholds in Calculate Churn Risk Score to match your business definition of risk. 5. Connect Gmail OAuth2 to Send Check-in Email. 6. Connect Calendly API to Book CS Call and set the event URI. 7. Connect ClickUp API to Create CS Task (ClickUp) — replace the list ID. 8. Connect Slack OAuth2 to Escalate to Account Manager — set the account manager's channel. 9. Connect Postgres to Log Intervention. 10. Activate the schedule trigger.

The steps

  1. Every 6 Hours1
  2. Get Product Usage (DB)1
  3. Get Mixpanel Engagement1
  4. Get Latest NPS Scores1
  5. Get Recent Support Tickets1
  6. Merge Usage + Mixpanel1
  7. Merge + NPS1
  8. Merge + Tickets1
  9. Calculate Churn Risk Score1
  10. Is Churn Risk?1
  11. Is High Risk?1
  12. Send Check-in Email1
  13. Book CS Call1
  14. Create CS Task (ClickUp)1

16 steps in total.

Similar automations