Predict Salesforce deal escalation risk with Gemini and Slack alerts
Ready for 3.0What this workflow does
This AI workflow has 14 nodes and runs manually, when you click “Execute workflow”. Along the way it connects Salesforce, Slack and Google Gemini.
How it runs
Trigger: Manually, when you click “Execute workflow”.
- Fetch Open Opportunities (Salesforce): get many (opportunity)
- Fetch Recent Activities (Last 30 Days) (Salesforce): work with search
- Map Opportunities with Activities (Merge): merges the data from its input branches
- Build Deal Context for Risk Analysis (Code): runs custom JavaScript code
- Loop Over Opportunities (Loop Over Items (Split in Batches)): loops over the items in batches
- Filter: High Probability & Active Deals (If): checks a condition and branches into true / false
- Prevent API Overload (Wait): waits 3 seconds
- Predict Deal Escalation Risk (Google Gemini): uses Google Gemini
- Clean & Validate AI Response (Code): runs custom JavaScript code
- Check Risk level (If): checks a condition and branches into true / false
…plus 3 more steps. See the full node list below.
Services it uses
Other Google Gemini + Slack templates (309) · Other Salesforce + Slack templates (31) · Other Salesforce + Google Gemini templates (11)
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.
- Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Nodes used (10)
- Manual Trigger
n8n-nodes-base.manualTrigger - Salesforce
n8n-nodes-base.salesforce - Merge
n8n-nodes-base.merge - Code
n8n-nodes-base.code - If
n8n-nodes-base.if - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - Edit Fields (Set)
n8n-nodes-base.set - Slack
n8n-nodes-base.slack - Google Gemini
@n8n/n8n-nodes-langchain.googleGemini - Wait
n8n-nodes-base.wait
From the author
Quick overview This workflow pulls open Salesforce opportunities and their last-30-days activities, uses Google Gemini to predict escalation risk per deal, then flags high-risk opportunities in Salesforce and notifies a Slack user. How it works 1. Starts…