# Predict customer churn with Google Sheets: n8n workflow

> Started by another system calling it, and works across Email, Google Sheets and HubSpot. It hands the judgement calls to OpenAI.

Source: https://millionrounds.com/workflow/predict-customer-churn-with-google-sheets (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [CRM](https://millionrounds.com/workflows?category=CRM#library)

# Predict customer churn with Google Sheets

Started by another system calling it, and works across Email, Google Sheets and HubSpot. It hands the judgement calls to OpenAI. 23 steps, 1 loop or waits: large, and worth reading before you trust it with anything live.

Large Calls a model: OpenAI

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fpredict-customer-churn-with-google-sheets)

**23 steps** Large: read it before trusting it with anything live

**0** Branches: places the flow splits

**1** Loop or waits

**3** Services it connects to

## The flow

Starts it 3 Model 7 Logic 9 Service 4

The steps in the order they run, from what starts it.

- 1 **Manual Trigger: Run Churn Analysis** Manual trigger *Starts it*
- 2 **Trigger: Receive Tickets for Scoring** Webhook *Starts it*
- 3 **Config: Set LLM for Agent & Chains** Lm Chat Open Ai *Model*
- 4 **Tool: Get HubSpot Data** Mcp Client Tool *Model*
- 5 **Tool: Calculate Sentiment Score** Http Request Tool *Service*
- 6 **Tool: Get Feature Usage from Sheets** Google Sheets Tool *Service*
- 7 **AI: Structure Agent's Findings Export to Sheets** Output Parser Structured *Model*
- 8 **AI: Structure Alert Email** Output Parser Structured *Model*
- 9 **HubSpot: Get All Deals** Hubspot *Service*
- 10 **Code: Format Tickets for Analysis** Code *Logic*
- 11 **AI: Analyze Ticket Sentiment** Sentiment Analysis *Model*
- 12 **AI Agent: Gather Customer Data** Agent *Model*
- 13 **AI Chain: Analyze for Churn Risk** Chain Llm *Model*
- 14 **Start Loop: For Each Deal** Split In Batches *Logic*
- 15 **Loop: For Each Ticket** Split Out *Logic*
- 16 **Merge: Consolidate Results** Merge *Logic*
- 17 **Code: Group Feature Data by Name** Code *Logic*
- 18 **Format: Convert Alert to HTML** Markdown *Logic*
- 19 **Set: Isolate Current Deal ID Export to Sheets** Set *Logic*
- 20 **Code: Convert Sentiment to Score** Code *Logic*
- 21 **Email: Send Churn Alert Export to Sheets** Email Send *Service*
- 22 **Code: Sum All Ticket Scores** Code *Logic*
- 23 **Respond: Return Total Score Export to Sheets** Respond To Webhook *Starts it*

## How it's built

- **Starts on:** Another system calling it
- **Steps:** 23, 1 loop or waits
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Email, Google Sheets, HubSpot
- **Model:** OpenAI

## Questions

What does it need to run?

An n8n account, plus your own Email, Google Sheets and HubSpot accounts, and a key for OpenAI. You connect your own accounts after importing it; none are included.

What starts it?

It starts on another system calling it.

Does it use AI?

Yes. It calls OpenAI. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Take your time. At 23 steps it is large: read it before trusting it with anything live.

How do I import it?

Copy the workflow, open a new workflow in n8n and paste. The steps appear on the canvas, ready for your own accounts.

**Before you run it**

Nothing here has been tested by us. It is somebody's working automation, read and described from its own steps. Treat the connections it wants as a list of accounts it will touch, and read the 23 steps before you point it at anything that matters.

## Run it in n8n

- **Create your n8n account** Free to start. n8n is where the workflow runs. [Create an n8n account ↗](https://millionrounds.com/n8n)
- **Download the workflow** Free with a Millionrounds account. [Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fpredict-customer-churn-with-google-sheets)
- **Paste it into n8n** Open a new workflow in n8n and paste. Then connect your own accounts.

Stored with the author's traces removed: canvas notes, instance identifiers, saved credential names and any live document they had left behind.

## Connects to

Each opens the other workflows that use it.

[Email](https://millionrounds.com/workflows?service=Email#library)[Google Sheets](https://millionrounds.com/workflows?service=Google+Sheets#library)[HubSpot](https://millionrounds.com/workflows?service=HubSpot#library)

## Workflows like it

Also crm, with the same services where possible, closest in size first.

- [**Automate AI Video Production Pipeline with OpenAI and Fal.AI** 23 steps · calls a model · Google Sheets, YouTube](https://millionrounds.com/workflow/automate-ai-video-production-pipeline-with-openai-and-fal-ai)
- [**Send sales forecast charts and answer Q&A on WhatsApp** 23 steps · calls a model · Google Sheets, WhatsApp](https://millionrounds.com/workflow/send-sales-forecast-charts-and-answer-q-and-a-on-whatsapp)
- [**Capture and Store CRM Contacts with Telegram and Gemini** 22 steps · calls a model · Google Sheets, Telegram](https://millionrounds.com/workflow/capture-and-store-crm-contacts-with-telegram-and-gemini)
- [**Track competitor risk from Gmail and webhooks with Groq** 22 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/track-competitor-risk-from-gmail-and-webhooks-with-groq)
- [**n8n cheatsheet for data pipeline with Gemini and OpenAI** 24 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/n8n-cheatsheet-for-data-pipeline-with-gemini-and-openai)
- [**AI-powered document workflow automation with OpenAI** 21 steps · calls a model · Email, Google Drive](https://millionrounds.com/workflow/ai-powered-document-workflow-automation-with-openai)
