Generate Salesforce opportunity next steps with Gemini and Slack
Ready for 3.0What this workflow does
This AI workflow has 13 nodes and runs on a schedule (every day at 10:00). Along the way it connects Salesforce, Google Gemini Chat Model and Slack.
How it runs
Trigger: On a schedule (every day at 10:00).
- Fetch all opportunities (Salesforce): get many (opportunity)
- Reverse opportunities (Code): runs custom JavaScript code
- Fetch opportunity data in batch of (Loop Over Items (Split in Batches)): loops over the items in batches
- Get required fields (Edit Fields (Set)): sets 14 fields: Id, Name, StageName…
- Get an opportunity data (Salesforce): get (opportunity)
- Get the open opportunities (Filter): keeps only the items that match a condition
- Create Prompt for each opportunity (Code): runs custom JavaScript code
- Get & update next step in batch of (Loop Over Items (Split in Batches)): loops over the items in batches
- Next step update - Agent (AI Agent): runs an AI agent, with model: Gemini; 2 tools (Slack, Update an opportunity in Salesforce)
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)
- Code
n8n-nodes-base.code - Edit Fields (Set)
n8n-nodes-base.set - Filter
n8n-nodes-base.filter - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - Salesforce
n8n-nodes-base.salesforce - Schedule Trigger
n8n-nodes-base.scheduleTrigger - AI Agent
@n8n/n8n-nodes-langchain.agent - Google Gemini Chat Model
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - Slack Tool
n8n-nodes-base.slackTool - Salesforce Tool
n8n-nodes-base.salesforceTool
From the author
Quick Overview This workflow runs daily at 10:00 AM to find open Salesforce Opportunities with no Next Step, generates a recommended next action with Google Gemini, posts it to Slack, and updates the Opportunity’s Next Step field back in Salesforce. How it…