Flag B2B churn-risk orders from Google Sheets with Gemini and Slack alerts
Ready for 3.0What this workflow does
This AI workflow has 22 nodes and runs on a schedule (cron 0 2 * * *). Along the way it connects Google Sheets, Google Gemini Chat Model, Slack and Gmail.
How it runs
Trigger: On a schedule (cron 0 2 * * *).
- Set Config Parameters (Edit Fields (Set)): sets 2 fields: spreadsheet_id, cooldown_days
- Fetch Orders from Sheets (Google Sheets): uses Google Sheets
- Limit: keeps the first few items
- Filter: keeps only the items that match a condition
- Fetch Baselines from Sheets (Google Sheets): uses Google Sheets
- Merge: merges the data from its input branches
- Filter: keeps only the items that match a condition
- Detect Order Anomalies (Code): runs custom JavaScript code
- If: checks a condition and branches into true / false
- Check Alert Cooldown (If): checks a condition and branches into true / false
…plus 7 more steps. See the full node list below.
Services it uses
Other Google Sheets + Gmail templates (2,102) · Other Google Sheets + Slack templates (1,314) · Other Gmail + Slack templates (957)
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 (14)
- Schedule Trigger
n8n-nodes-base.scheduleTrigger - Edit Fields (Set)
n8n-nodes-base.set - Google Sheets
n8n-nodes-base.googleSheets - Filter
n8n-nodes-base.filter - Merge
n8n-nodes-base.merge - Code
n8n-nodes-base.code - If
n8n-nodes-base.if - Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm - Google Gemini Chat Model
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - Slack
n8n-nodes-base.slack - Gmail
n8n-nodes-base.gmail - No Operation, do nothing
n8n-nodes-base.noOp - Limit
n8n-nodes-base.limit
From the author
Quick overview Youtube Video: https://youtu.be/yjCtj3-QLws This workflow runs daily and monitors new B2B order rows in Sheets, compares them to account baselines, and flags churn-risk anomalies. For qualifying accounts, it uses Gemini to generate a structured…