HubSpot + Google Sheets: churn risk alerts by email
Churn usually doesn’t surprise you. It sneaks up in the gaps between tools: one “angry” support ticket in one place, a usage drop in another, and a deal that’s been stuck forever in HubSpot.
Customer Success Managers feel this when renewals suddenly get tense. Account Managers get pulled into “save the account” calls with zero context. And founders running lean? They just want churn risk alerts that show up in email, on time, with a clear next step.
This workflow ties HubSpot + Google Sheets into a simple churn signal system. You’ll see how it pulls deal context, scores ticket sentiment, checks usage trends, and emails a clean, data-driven alert when risk crosses your threshold.
How This Automation Works
See how this solves the problem:
n8n Workflow Template: HubSpot + Google Sheets: churn risk alerts by email
flowchart LR
subgraph sg0["Manual Trigger: Run Churn Analysis Flow"]
direction LR
n0@{ icon: "mdi:play-circle", form: "rounded", label: "Manual Trigger: Run Churn An..", pos: "b", h: 48 }
n1["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/hubspot.svg' width='40' height='40' /></div><br/>HubSpot: Get All Deals"]
n2@{ icon: "mdi:swap-vertical", form: "rounded", label: "Start Loop: For Each Deal", pos: "b", h: 48 }
n3@{ icon: "mdi:swap-vertical", form: "rounded", label: "Set: Isolate Current Deal ID..", pos: "b", h: 48 }
n4["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/webhook.dark.svg' width='40' height='40' /></div><br/>Trigger: Receive Tickets for.."]
n5["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/code.svg' width='40' height='40' /></div><br/>Code: Format Tickets for Ana.."]
n6@{ icon: "mdi:swap-vertical", form: "rounded", label: "Loop: For Each Ticket", pos: "b", h: 48 }
n7@{ icon: "mdi:robot", form: "rounded", label: "AI: Analyze Ticket Sentiment", pos: "b", h: 48 }
n8["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/merge.svg' width='40' height='40' /></div><br/>Merge: Consolidate Results"]
n9["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/code.svg' width='40' height='40' /></div><br/>Code: Convert Sentiment to S.."]
n10["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/code.svg' width='40' height='40' /></div><br/>Code: Sum All Ticket Scores"]
n11["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/webhook.dark.svg' width='40' height='40' /></div><br/>Respond: Return Total Score .."]
n12@{ icon: "mdi:robot", form: "rounded", label: "AI Agent: Gather Customer Data", pos: "b", h: 48 }
n13@{ icon: "mdi:brain", form: "rounded", label: "Config: Set LLM for Agent & ..", pos: "b", h: 48 }
n14@{ icon: "mdi:wrench", form: "rounded", label: "Tool: Get HubSpot Data", pos: "b", h: 48 }
n15@{ icon: "mdi:web", form: "rounded", label: "Tool: Calculate Sentiment Sc..", pos: "b", h: 48 }
n16@{ icon: "mdi:database", form: "rounded", label: "Tool: Get Feature Usage from..", pos: "b", h: 48 }
n17@{ icon: "mdi:robot", form: "rounded", label: "AI: Structure Agent's Findin..", pos: "b", h: 48 }
n18["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/code.svg' width='40' height='40' /></div><br/>Code: Group Feature Data by .."]
n19@{ icon: "mdi:robot", form: "rounded", label: "AI Chain: Analyze for Churn ..", pos: "b", h: 48 }
n20@{ icon: "mdi:robot", form: "rounded", label: "AI: Structure Alert Email", pos: "b", h: 48 }
n21["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/markdown.dark.svg' width='40' height='40' /></div><br/>Format: Convert Alert to HTML"]
n22@{ icon: "mdi:message-outline", form: "rounded", label: "Email: Send Churn Alert Exp..", pos: "b", h: 48 }
n6 --> n7
n1 --> n2
n14 -.-> n12
n20 -.-> n19
n2 --> n3
n8 --> n9
n10 --> n11
n7 --> n8
n21 --> n22
n12 --> n18
n15 -.-> n12
n19 --> n21
n9 --> n10
n18 --> n19
n5 --> n6
n13 -.-> n7
n13 -.-> n12
n13 -.-> n19
n0 --> n1
n16 -.-> n12
n4 --> n5
n22 --> n2
n3 --> n12
n17 -.-> n12
end
%% Styling
classDef trigger fill:#e8f5e9,stroke:#388e3c,stroke-width:2px
classDef ai fill:#e3f2fd,stroke:#1976d2,stroke-width:2px
classDef aiModel fill:#e8eaf6,stroke:#3f51b5,stroke-width:2px
classDef decision fill:#fff8e1,stroke:#f9a825,stroke-width:2px
classDef database fill:#fce4ec,stroke:#c2185b,stroke-width:2px
classDef api fill:#fff3e0,stroke:#e65100,stroke-width:2px
classDef code fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
classDef disabled stroke-dasharray: 5 5,opacity: 0.5
class n0 trigger
class n7,n12,n17,n19,n20 ai
class n13 aiModel
class n14 ai
class n16 database
class n4,n11,n15 api
class n5,n9,n10,n18 code
classDef customIcon fill:none,stroke:none
class n1,n4,n5,n8,n9,n10,n11,n18,n21 customIcon
The Challenge: Spotting churn risk before it’s obvious
Most churn prevention fails for a boring reason: the signals are scattered. HubSpot knows the commercial story (deal age, owner, stage). Your product usage spreadsheet knows what the customer is actually doing. Support tickets capture the mood, but reading them one-by-one takes forever, and you never read all of them anyway. So you end up reacting late, with half the picture, while someone asks “How did we not see this coming?” Honestly, you probably did see it. You just didn’t have it in one place, at the right moment.
It adds up fast. Here’s where it breaks down in real teams.
- Support ticket sentiment lives in threads and inboxes, so “they sound unhappy” never turns into a tracked signal.
- Usage drops get noticed late because someone has to open a sheet, filter it, and remember what “normal” looks like.
- Deal context exists in HubSpot, but connecting it to product reality usually means manual detective work.
- Even when someone flags risk, the handoff is messy and the next step is unclear, so outreach slips another day.
The Fix: Automated churn risk scoring with email alerts
This automation continuously monitors customer health by combining what your CRM knows with what your customers are doing and saying. It starts by pulling deals from HubSpot, then enriches each deal with two extra layers of truth: support-ticket sentiment and feature usage trends stored in Google Sheets. An AI sentiment step reviews ticket text and converts it into a consistent score, so “this feels bad” becomes a number you can compare week to week. Next, an AI agent evaluates the full picture (deal age, sentiment score, and usage direction) against thresholds you define. If it detects churn risk, it generates a clear email alert with context and next-step recommendations, then sends it to the right owner automatically.
The workflow kicks off with a churn scan and iterates through HubSpot deals in batches. It pulls in usage signals from Google Sheets and ticket sentiment via a webhook-based scoring tool. Finally, an AI review composes an email that’s actually usable, then your SMTP email node sends it out without you touching anything.
What Changes: Before vs. After
| What This Eliminates | Impact You’ll See |
|---|---|
|
|
Real-World Impact
Say you manage 40 active deals. A basic churn check often means 3 manual steps per deal (HubSpot review, usage lookup in Sheets, skim recent tickets), and even at maybe 5 minutes per step, that’s about 10 hours of weekly “health checks.” With this workflow, you trigger a scan, let it process in the background, and only handle the handful of accounts that generate churn risk alerts by email. For many teams, that turns a long weekly ritual into a short daily inbox habit.
Requirements
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- HubSpot to fetch deals and ownership context.
- Google Sheets to pull feature usage signals.
- LLM provider API key (get it from your provider dashboard, such as OpenAI).
Skill level: Intermediate. You’ll mostly connect accounts and paste URLs/IDs, plus minor prompt or scoring tweaks if you want custom logic.
Need help implementing this? Talk to an automation expert (free 15-minute consultation).
The Workflow Flow
A churn scan kicks things off. You manually launch the workflow when you want a check (daily, weekly, or right before renewals). n8n immediately pulls your current deals from HubSpot and starts iterating through them in manageable batches.
Tickets get scored for sentiment. A webhook receives ticket payloads for scoring, the workflow transforms the text, then an AI sentiment step reviews each ticket and returns a structured result. That result is converted into a single score so you can compare accounts consistently.
Usage signals are pulled from Google Sheets. For each deal/account, the workflow looks up usage (and then groups it) so the later risk review sees a trend, not a raw spreadsheet row.
An AI agent makes the churn call, then the email goes out. The agent collects HubSpot context via a tool call, combines it with sentiment and usage, then an AI chain decides if the account is at risk. If it is, the workflow formats a clean HTML email and sends it through your SMTP settings to the owner or team.
You can easily modify the risk thresholds and email content to match your renewal motion. See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the Manual Trigger and Webhook Trigger
Set up the workflow entry points for manual scans and incoming ticket payloads.
- Add Manual Launch: Churn Scan as the manual trigger node for ad-hoc runs.
- Add Incoming Tickets Webhook and set Path to
9696956a-460a-4c45-aa3c-e5f83ce95e54. - Set HTTP Method to
POSTand Response Mode toresponseNodein Incoming Tickets Webhook. - Connect Incoming Tickets Webhook → Transform Tickets Payload.
- Connect Manual Launch: Churn Scan → Retrieve HubSpot Deals.
body.tickets as a JSON string, since Transform Tickets Payload parses it with JSON.parse($input.first().json.body.tickets).Step 2: Connect HubSpot and Deal Iteration
Pull deal data from HubSpot and iterate each deal for downstream AI enrichment.
- Configure Retrieve HubSpot Deals with Resource set to
deal, Operation set togetAll, and Authentication set tooAuth2. - Credential Required: Connect your HubSpot OAuth2 credentials in Retrieve HubSpot Deals (none are configured in the workflow).
- Connect Retrieve HubSpot Deals → Batch Iterate Deals to handle deal-by-deal processing.
- In Map Current Deal ID, add an assignment for dealId with value
{{ $json.dealId }}. - Connect Batch Iterate Deals → Map Current Deal ID → AI Agent: Collect Client Data.
Step 3: Set Up the Ticket Sentiment Scoring Pipeline
This branch converts incoming ticket payloads into sentiment scores and returns a total score via webhook response.
- In Transform Tickets Payload, keep the provided JavaScript to build the
tickets_textarray from the webhook payload. - Configure Split Tickets List with Field To Split Out set to
tickets_text. - Set AI Sentiment Review with Input Text set to
{{ $json.tickets_text }}. - Set Merge Sentiment Streams to Number Inputs
3(the node merges three outputs from AI Sentiment Review). - Keep the JavaScript in Compute Sentiment Score to map sentiment categories to numeric scores.
- Keep the JavaScript in Aggregate Ticket Scores to sum scores into
totalScore. - Connect Aggregate Ticket Scores → Return Score Response to reply to Incoming Tickets Webhook.
Step 4: Set Up AI Agent & Churn Risk Review
Configure the AI agent to gather deal, contact, ticket, and feature-usage data, then generate churn-risk alert content.
- In LLM Config: Agent & Chains, set the model to
gpt-5-mini. - Credential Required: Connect your OpenAI credentials in LLM Config: Agent & Chains (missing in the workflow).
- In AI Agent: Collect Client Data, keep the prompt text that references
{{ $json.dealId }}and the tools Tool: Fetch HubSpot Data, Tool: Sentiment Scoring, and Tool: Pull Feature Usage. - Ensure Parse Agent Findings is connected as the output parser for AI Agent: Collect Client Data.
- Configure Tool: Pull Feature Usage with Sheet Name set to
gid=0and add the correct Document ID. - Keep the JavaScript in Group Feature Usage to aggregate features and output
resas JSON. - In AI Chain: Churn Risk Review, keep the prompt with expressions
{{ $('AI Agent: Collect Client Data').item.json.output.hs_is_closed_timestamp }},{{ $('AI Agent: Collect Client Data').item.json.output.score }}, and{{ $json.res }}. - Ensure Parse Alert Email is connected as the output parser for AI Chain: Churn Risk Review.
Step 5: Configure the Output Email Delivery
Convert the AI-generated alert into HTML and send it to your Customer Success team.
- In Format Alert to HTML, set Mode to
markdownToHtml, Markdown to{{ $json.output.message }}, and Destination Key tomessage. - Configure Send Churn Email with HTML set to
{{ $json.message }}and Subject set to{{ $json.output.subject }}. - Credential Required: Connect your SMTP credentials in Send Churn Email.
- Confirm the loopback flow: Format Alert to HTML → Send Churn Email → Batch Iterate Deals to continue scanning the next deal.
Step 6: Test and Activate Your Workflow
Validate both the manual scan and webhook-based ticket scoring before going live.
- Click Execute Workflow on Manual Launch: Churn Scan to test the deal scan path.
- Send a POST request to the Incoming Tickets Webhook URL with a
body.ticketsJSON string to test sentiment scoring. - Confirm a successful run: Return Score Response should return a
totalScore, and Send Churn Email should dispatch a formatted alert when thresholds are triggered. - When results look correct, toggle the workflow to Active for production use.
Watch Out For
- HubSpot credentials can expire or need specific permissions. If things break, check your HubSpot private app scopes and reconnect the “Retrieve HubSpot Deals” node first.
- If you’re using Wait nodes or external rendering, processing times vary. Bump up the wait duration if downstream nodes fail on empty responses.
- Default prompts in AI nodes are generic. Add your brand voice early or you’ll be editing outputs forever.
Common Questions
Usually about an hour once your accounts and keys are ready.
Yes, but someone should be comfortable pasting IDs/URLs and testing a few runs. No coding is required unless you want custom scoring logic.
Yes. n8n has a free self-hosted option and a free trial on n8n Cloud. Cloud plans start at $20/month for higher volume. You’ll also need to factor in LLM API costs (often a few cents per batch of accounts, depending on volume).
Two options: n8n Cloud (managed, easiest setup) or self-hosting on a VPS. For self-hosting, Hostinger VPS is affordable and handles n8n well. Self-hosting gives you unlimited executions but requires basic server management.
You can change the scoring in “Compute Sentiment Score” and “Aggregate Ticket Scores” to match how your team defines “bad signals.” Most teams also edit the prompt in “AI Chain: Churn Risk Review” to weight deal age vs. usage drop differently, then adjust the email structure in “Parse Alert Email” so it matches your internal playbook. If your usage data isn’t in Google Sheets, swap “Tool: Pull Feature Usage” for Airtable, a database, or a product analytics API. The core pattern stays the same: enrich → score → decide → alert.
Most of the time it’s expired credentials or missing scopes on the HubSpot private app. Reconnect HubSpot in n8n, then confirm the Deals API permissions are allowed for the account you’re using. Also check if the external MCP endpoint used by “Tool: Fetch HubSpot Data” is reachable, because that tool call can fail even when the basic HubSpot node works.
It depends on your n8n plan and your AI usage, but most small teams can scan dozens of deals per run comfortably.
Often, yes, because this kind of workflow needs branching logic, batching, and AI steps that get clunky (and expensive) in simpler tools. n8n also lets you self-host for unlimited executions, which matters if you run frequent scans. Zapier or Make can still be fine for a lightweight “if usage drops, send email” rule. But once you want sentiment scoring, deal context, and a structured alert email, you’ll appreciate the flexibility here. If you’re torn, Talk to an automation expert and we’ll sanity-check your use case.
Churn doesn’t become “urgent” overnight. This workflow helps you catch it earlier, with clear churn risk alerts that land in email with enough context to act.
Need Help Setting This Up?
Our automation experts can build and customize this workflow for your specific needs. Free 15-minute consultation—no commitment required.