Generate competitive deal strategies in Salesforce with Google Sheets and Gemini
Ready for 3.0What this workflow does
This AI workflow has 18 nodes and runs on Salesforce events (opportunity created) (plus 1 other trigger). Along the way it connects Google Gemini, Salesforce, Gmail and Google Sheets.
How it runs
Trigger: On Salesforce events (opportunity created) (plus 1 other trigger).
- Process Each Opportunity (Loop Over Items (Split in Batches)): loops over the items in batches
- Get Opportunity Details (Salesforce): get (opportunity)
- Competitor Present & Not Processed (If): checks a condition and branches into true / false
- Fetch Account Opportunity History (Salesforce): work with search
- Fetch Competitor Intelligence (Google Sheets): uses Google Sheets
- Account Opportunities (Aggregate): combines items into one
- History + Competitor Data (Merge): merges the data from its input branches
- Account History Summary (Code): runs custom JavaScript code
- AI Input Payload (Edit Fields (Set)): sets 7 fields: opportunityName, dealAmount, CloseDate…
- Competitive Analysis (Current Deal) (Google Gemini): uses Google Gemini
…plus 6 more steps. See the full node list below.
Services it uses
Other Google Sheets + Gmail templates (2,102) · Other Google Gemini + Google Sheets templates (819) · Other Google Gemini + Gmail templates (518)
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 (12)
- Google Gemini
@n8n/n8n-nodes-langchain.googleGemini - Code
n8n-nodes-base.code - Edit Fields (Set)
n8n-nodes-base.set - Salesforce
n8n-nodes-base.salesforce - Gmail
n8n-nodes-base.gmail - Wait
n8n-nodes-base.wait - Salesforce Trigger
n8n-nodes-base.salesforceTrigger - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - If
n8n-nodes-base.if - Aggregate
n8n-nodes-base.aggregate - Google Sheets
n8n-nodes-base.googleSheets - Merge
n8n-nodes-base.merge
From the author
Quick overview This workflow triggers on Salesforce opportunity creation or updates, pulls recent account opportunity history and competitor intel from Google Sheets, uses Google Gemini to generate competitive analysis and a counter-strategy, calculates a…