Researched: Sourced and summarized, not yet run end-to-end by us CRM

HubSpot churn prediction alerts from deals, tickets and usage (n8n)

Last checked: · Sourced and summarized; not yet run end-to-end by us. What this means

At a glance

Setup estimate
2–3 h (ESTIMATE)
Tools
Industries
SaaS
View source template on n8n.io (opens in new tab)

Problem

Account managers learn about at-risk clients too late

Who it's for

Small SaaS and subscription businesses with a customer success or account manager who uses HubSpot for deals and tickets and can export product usage to a Google Sheet. The trigger: you keep learning about unhappy accounts at renewal time, and you want an email per account when ticket tone, usage or contract age suggests a check-in.

Skip it if you have no usage data you can keep up to date in a sheet, or if you aren't comfortable building a second n8n workflow: the HubSpot data tool depends on one that isn't included.

Tools and what each does

Manual Trigger + HubSpot (Get All Deals)
Starts the run and fetches deals over HubSpot OAuth2.
Loop over deals
Processes one deal at a time and sends one email per deal.
AI Agent: Gather Customer Data
For each deal ID, uses three tools to assemble deal fields, linked tickets, a sentiment score and feature usage into a fixed JSON shape.
Tool: Get HubSpot Data (MCP client)
Calls a separate n8n workflow you build that exposes HubSpot data as an MCP endpoint.
Tool: Get Feature Usage from Sheets
Reads your usage sheet (document ID left blank in the template).
Tool: Calculate Sentiment Score (HTTP) + webhook sub-flow
Posts tickets to this workflow's own webhook; each ticket goes through n8n's Sentiment Analysis node and scores +10 Positive, +5 Neutral, −10 Negative, then the total is returned.
AI Chain: Analyze for Churn Risk + SMTP email
Checks three signals and writes an alert email, converted from Markdown to HTML and sent by SMTP.
OpenAI chat model (gpt-5-mini in the template)
Shared model for the agent, the sentiment node and the churn chain.

Browse by tool: n8n, HubSpot, Google Sheets, OpenAI

Steps

  1. Run the workflow; HubSpot returns your deals.
  2. For each deal, the agent fetches deal details through your MCP HubSpot workflow, including associated contacts and the deal's close timestamp.
  3. The agent sends the deal's tickets to the sentiment webhook, which scores each ticket and returns a total.
  4. The agent looks up the primary contact's email and reads all usage rows for that email from the sheet.
  5. Feature rows are grouped by feature name.
  6. The churn chain flags risk if the deal closed more than a year ago, the sentiment total is below 0, or usage or user counts fell, and rates risk Low, Medium or High.
  7. The alert is converted to HTML and emailed, then the loop moves to the next deal.

Known problems in the source template

Found by reading the template's JSON, not by running it. Likely fails as shipped.

  • Problem: There is no condition before the email node, and the prompt doesn't say what to do when no signal fires, so the template is likely to email something for every deal on every run.

    Fix: Add an If node on a 'risk' field before sending.

Before you start

  • HubSpot account with deal access, connected by OAuth2.
  • A separate n8n workflow acting as an MCP endpoint for HubSpot data, and its URL in the MCP tool. The template author says this is required; it isn't part of the template.
  • The workflow published so the sentiment webhook's production URL works, pasted into the HTTP tool.
  • A Google Sheet of feature usage per customer over time, an OpenAI (or other LLM) key, and SMTP credentials with your From/To addresses.
  • Setup estimate: 2–3 h (ESTIMATE).

What can go wrong

You need to maintain a Google Sheet of feature-usage data and set up a separate HubSpot data workflow that one tool calls. Support-ticket text is sent to your LLM provider. Treat churn alerts as prompts to check in, not certainties.

  • Reliability'Deal closed more than a year ago' is one of the three triggers on its own, so every customer past their first year can be flagged even when usage and tickets look fine.
  • ReliabilityThe HTTP tool's body is filled in by the AI ($fromAI), so whether the right tickets reach the sentiment webhook depends on the model following instructions. A malformed body breaks scoring for that deal.
  • Rate limitEach deal triggers several model calls plus one Sentiment Analysis call per ticket. Cost and HubSpot API usage grow with the number of deals; per-run cost is UNKNOWN.
  • ModelThe template uses gpt-5-mini. OpenAI lists the gpt-5-mini-2025-08-07 snapshot for shutdown on Dec 11, 2026, with gpt-5.6-terra as the recommended replacement.
  • Data privacySupport ticket text, contact emails and deal values go to your LLM provider. Treat alerts as prompts to check in, not as certainties.

How to adapt it

  • Add an If node so only deals with at least one triggered signal send an email, and add a Schedule Trigger (weekly is plenty for most teams).
  • Filter HubSpot deals to closed-won customers only before the loop.
  • Change the thresholds in the churn chain prompt (for example renewal date within 60 days instead of 'older than a year').
  • Change the scoring in 'Code: Convert Sentiment to Score' to weight negative tickets differently.
  • Swap Google Sheets or HubSpot for Airtable or Salesforce, as the author suggests, by replacing the matching tool.

Sources we checked

Status
Researched: Sourced and summarized, not yet run end-to-end by us
Last checked
Details checked

Setup estimates are rough guesses for someone comfortable with the tools who already has the accounts and API keys. Real time is unknown until tested.

Practical AI workflows for small businesses, every Tuesday

A few workflows each issue for lead follow-up, CRM, proposals, onboarding and support, each labeled Researched or Tested.

We'll email you a link to confirm. Unsubscribe in one click. Privacy policy.

Why trust it: every entry links its source and caveats, and nothing is called Tested until we publish the logs. Our method.

More CRM workflows

Researched: Sourced and summarized, not yet run end-to-end by us CRM

AI lead scoring and routing into HighLevel

Form leads land in a sheet with no prioritization, and sales responds late

Setup: 1–2 h (ESTIMATE) Checked 2026-10-18

  • n8n
  • Google Sheets
  • Azure OpenAI
  • HighLevel
Researched: Sourced and summarized, not yet run end-to-end by us CRM

Daily AI summary of the Pipedrive pipeline

Owners don't have time to review every deal and note

Setup: 30–60 min (ESTIMATE) Checked 2026-10-18

  • n8n
  • Pipedrive
  • OpenAI