Score tenant churn risk with Google Sheets, Gemini, Gmail and Slack
Needs changesWhat this workflow does
This AI workflow has 25 nodes and runs on a schedule (every 24 hours) (plus 1 other trigger). Along the way it connects Slack, Google Sheets, Google Gemini Chat Model and Gmail.
How it runs
Trigger: On a schedule (every 24 hours) (plus 1 other trigger).
- Set Configuration Params (Edit Fields (Set)): sets 5 fields: config_id, w_payment, w_maintenance…
- Notify Slack of Error (Slack): uses Slack
- Read Tenant Data in Sheets (Google Sheets): uses Google Sheets
- Loop Over Tenants (Loop Over Items (Split in Batches)): loops over the items in batches
- Notify Churn Scan Completion (Slack): uses Slack
- Set Payment Friction (Edit Fields (Set)): sets 1 field: paymentFriction
- Set Maintenance Friction (Edit Fields (Set)): sets 1 field: maintenanceFriction
- Set Lease Proximity (Edit Fields (Set)): sets 1 field: leaseProximity
- Sentiment Analyzer Agent (AI Agent): runs an AI agent, with model: Google Gemini Sentiment Model
- Set Sentiment Scores (Edit Fields (Set)): sets 2 fields: sentimentScore, sentimentSummary
…plus 12 more steps. See the full node list below.
Services it uses
Before you upgrade to n8n 3.0
1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:
- AI Agent v1 (old agent modes) in Sentiment Analyzer Agent (v1.9): replace with Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.
Rather not rewrite it? Many of these flows can be rebuilt in Make (free plan).
| Removed in 3.0 | Replace with |
|---|---|
| AI Agent v1 (old agent modes) Sentiment Analyzer Agent (v1.9) | Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent. |
Nodes used (10)
- Error Trigger
n8n-nodes-base.errorTrigger - Slack
n8n-nodes-base.slack - Schedule Trigger
n8n-nodes-base.scheduleTrigger - Google Sheets
n8n-nodes-base.googleSheets - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - Edit Fields (Set)
n8n-nodes-base.set - Google Gemini Chat Model
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - AI Agent
@n8n/n8n-nodes-langchain.agent - Switch
n8n-nodes-base.switch - Gmail
n8n-nodes-base.gmail
From the author
Quick overview YouTube video: https://youtu.be/wtTylRmZ4D8 This workflow runs daily to score tenant churn risk using Google Sheets data and Google Gemini sentiment analysis, then updates the tenant spreadsheet, alerts high-risk cases in Slack, and sends…