Score customer health and churn risk with Salesforce, Gemini, and Gmail
Ready for 3.0What this workflow does
This AI workflow has 27 nodes and runs on a schedule (every minute) (plus 1 other trigger). Along the way it connects Salesforce, Gmail and Google Gemini. It also calls dummyjson.com over HTTP.
How it runs
Trigger: On a schedule (every minute) (plus 1 other trigger).
- Salesforce: get many (account)
- Alert - Error Notification (Gmail): uses Gmail
- Loop Over Items (Loop Over Items (Split in Batches)): loops over the items in batches
- Init Retry Code (Code): runs custom JavaScript code
- Decision - Circuit Breaker (If): checks a condition and branches into true / false
- ERP - Fetch Orders (HTTP Request): calls an HTTP API
- Fallback - Fetch Orders Backup (HTTP Request): calls dummyjson.com
- Decision - Orders Success (If): checks a condition and branches into true / false
- ERP - Fetch Payments (HTTP Request): calls an HTTP API
- Wait: waits 3 seconds
…plus 15 more steps. See the full node list below.
Services it uses
HTTP calls to: dummyjson.com
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 (13)
- Schedule Trigger
n8n-nodes-base.scheduleTrigger - HTTP Request
n8n-nodes-base.httpRequest - Edit Fields (Set)
n8n-nodes-base.set - Salesforce
n8n-nodes-base.salesforce - Code
n8n-nodes-base.code - If
n8n-nodes-base.if - Switch
n8n-nodes-base.switch - Gmail
n8n-nodes-base.gmail - Error Trigger
n8n-nodes-base.errorTrigger - Wait
n8n-nodes-base.wait - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - Merge
n8n-nodes-base.merge - Google Gemini
@n8n/n8n-nodes-langchain.googleGemini
From the author
Quick Overview This workflow runs every minute to pull accounts from Salesforce, enrich each customer with order, payment, support, and marketing data via HTTP APIs, analyze the combined profile with Google Gemini, then update the Salesforce account and send…