Personalized customer retention campaigns with GPT-4o analytics & Gmail
Ready for 3.0What this workflow does
This AI workflow has 29 nodes and runs on a schedule (every day at 02:00). Along the way it connects OpenAI Chat Model, MCP Client, Gmail and HTTP Request.
How it runs
Trigger: On a schedule (every day at 02:00).
- Workflow Configuration (Edit Fields (Set)): sets 11 fields: customerApiUrl, churnThreshold, inactiveDays…
- Fetch Customer Data (HTTP Request): calls an HTTP API
- Calculate Churn Signals (Code): runs custom JavaScript code
- Check Churn Risk (If): checks a condition and branches into true / false
- Fetch Sentiment Data (HTTP Request): calls an HTTP API
- Fetch Product Usage Analytics (HTTP Request): calls an HTTP API
- Merge: merges the data from its input branches
- Segment by Risk Level (Switch): routes items into 2 branches
- High Risk Strategy Agent (AI Agent): runs an AI agent, with model: OpenAI Chat Model; 1 tool (MCP Client Tool); output parser: Structured Output Parser
- Wait: pauses until webhook
…plus 9 more steps. See the full node list below.
Services it uses
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (15)
- Schedule Trigger
n8n-nodes-base.scheduleTrigger - Edit Fields (Set)
n8n-nodes-base.set - HTTP Request
n8n-nodes-base.httpRequest - Code
n8n-nodes-base.code - If
n8n-nodes-base.if - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - MCP Client Tool
@n8n/n8n-nodes-langchain.mcpClientTool - Gmail Tool
n8n-nodes-base.gmailTool - Switch
n8n-nodes-base.switch - Merge
n8n-nodes-base.merge - AI Agent
@n8n/n8n-nodes-langchain.agent - Http Request Tool
n8n-nodes-base.httpRequestTool - Aggregate
n8n-nodes-base.aggregate - Wait
n8n-nodes-base.wait
From the author
HOW IT WORKS This workflow automates end-to-end data intelligence processing by ingesting structured data (CSV, JSON), enriching it through multiple AI analysis pathways, and generating actionable insights. Designed for business analysts, data scientists, and…