Classify churn and send monthly SaaS reports with Notion, Sheets and Gemini
Ready for 3.0What this workflow does
This AI workflow has 20 nodes and runs on Notion events (plus 1 other trigger). Along the way it connects Notion, Google Sheets, Google Gemini Chat Model and Gmail and 1 more.
How it runs
Trigger: On Notion events (plus 1 other trigger).
- Format Cancellation Data (Edit Fields (Set)): sets 3 fields: customer_id, Cancellation Date, revenue
- Fetch Churn Log (Google Sheets): uses Google Sheets
- Fetch Dunning History (Google Sheets): uses Google Sheets
- Calculate Monthly Metrics (Code): runs custom JavaScript code
- Validate Dunning Window (Code): runs custom JavaScript code
- Generate AI Narrative (Basic LLM Chain): sends a prompt to an LLM, with model: Gemini Engine; output parser: Enforce JSON Schema
- Is Involuntary Churn? (If): checks a condition and branches into true / false
- Extract Report Data (Edit Fields (Set)): sets 2 fields: report_title, summary
- Assign Churn Category (Edit Fields (Set)): sets 2 fields: Churn Type, Classification Notes
- Email Executive Report (Gmail): uses Gmail
…plus 6 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 (12)
- Notion Trigger
n8n-nodes-base.notionTrigger - Edit Fields (Set)
n8n-nodes-base.set - Google Sheets
n8n-nodes-base.googleSheets - Code
n8n-nodes-base.code - If
n8n-nodes-base.if - Schedule Trigger
n8n-nodes-base.scheduleTrigger - 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 - Gmail
n8n-nodes-base.gmail - Switch
n8n-nodes-base.switch - Slack
n8n-nodes-base.slack
From the author
Quick overview This workflow monitors cancellation records in Notion, checks related payment-failure (dunning) history in Google Sheets to classify churn as involuntary or voluntary, logs each result to a churn log sheet, and then runs a monthly rollup that…