Automation library · CRM

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.

LargeCalls a model: OpenAI

23 stepsLarge: read it before trusting it with anything live
0Branches: places the flow splits
1Loop or waits
3Services it connects to

The flow

Starts it 3Model 7Logic 9Service 4

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

  1. 1Manual Trigger: Run Churn AnalysisManual triggerStarts it
  2. 2Trigger: Receive Tickets for ScoringWebhookStarts it
  3. 3Config: Set LLM for Agent & ChainsLm Chat Open AiModel
  4. 4Tool: Get HubSpot DataMcp Client ToolModel
  5. 5Tool: Calculate Sentiment ScoreHttp Request ToolService
  6. 6Tool: Get Feature Usage from SheetsGoogle Sheets ToolService
  7. 7AI: Structure Agent's Findings Export to SheetsOutput Parser StructuredModel
  8. 8AI: Structure Alert EmailOutput Parser StructuredModel
  9. 9HubSpot: Get All DealsHubspotService
  10. 10Code: Format Tickets for AnalysisCodeLogic
  11. 11AI: Analyze Ticket SentimentSentiment AnalysisModel
  12. 12AI Agent: Gather Customer DataAgentModel
  13. 13AI Chain: Analyze for Churn RiskChain LlmModel
  14. 14Start Loop: For Each DealSplit In BatchesLogic
  15. 15Loop: For Each TicketSplit OutLogic
  16. 16Merge: Consolidate ResultsMergeLogic
  17. 17Code: Group Feature Data by NameCodeLogic
  18. 18Format: Convert Alert to HTMLMarkdownLogic
  19. 19Set: Isolate Current Deal ID Export to SheetsSetLogic
  20. 20Code: Convert Sentiment to ScoreCodeLogic
  21. 21Email: Send Churn Alert Export to SheetsEmail SendService
  22. 22Code: Sum All Ticket ScoresCodeLogic
  23. 23Respond: Return Total Score Export to SheetsRespond To WebhookStarts 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.