# Generate Salesforce opportunity next steps with Gemini: n8n workflow

> Started by a clock, and works across Salesforce. It hands the judgement calls to Gemini. 13 steps, 2 loops or waits: a working afternoon to understand properly.

Source: https://millionrounds.com/workflow/generate-salesforce-opportunity-next-steps-with-gemini (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [CRM](https://millionrounds.com/workflows?category=CRM#library)

# Generate Salesforce opportunity next steps with Gemini

Started by a clock, and works across Salesforce. It hands the judgement calls to Gemini. 13 steps, 2 loops or waits: a working afternoon to understand properly.

Medium Calls a model: Gemini

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fgenerate-salesforce-opportunity-next-steps-with-gemini)

**13 steps** Medium: a working afternoon

**0** Branches: places the flow splits

**2** Loops or waits

**1** Service it connects to

## The flow

Starts it 1 Model 2 Logic 6 Service 4

The steps in the order they run, from what starts it.

- 1 **Execute every day - 10AM** Schedule trigger *Starts it*
- 2 **Gemini** Lm Chat Google Gemini *Model*
- 3 **Slack** Slack Tool *Service*
- 4 **Update an opportunity in Salesforce** Salesforce Tool *Service*
- 5 **Fetch all opportunities** Salesforce *Service*
- 6 **Next step update - Agent** Agent *Model*
- 7 **Reverse opportunities** Code *Logic*
- 8 **Get & update next step in batch of 1** Split In Batches *Logic*
- 9 **Fetch opportunity data in batch of 10** Split In Batches *Logic*
- 10 **Get required fields** Set *Logic*
- 11 **Get an opportunity data** Salesforce *Service*
- 12 **Get the open opportunities** Filter *Logic*
- 13 **Create Prompt for each opportunity** Code *Logic*

## How it's built

- **Starts on:** A clock
- **Steps:** 13, 2 loops or waits
- **Size:** Medium: a working afternoon
- **Connects to:** Salesforce
- **Model:** Gemini

## Questions

What does it need to run?

An n8n account, plus your own Salesforce account, and a key for Gemini. You connect your own accounts after importing it; none are included.

What starts it?

It starts on a clock.

Does it use AI?

Yes. It calls Gemini. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Plan an afternoon. 13 steps is enough that you should read each one before running it.

How do I import it?

Copy the workflow, open a new workflow in n8n and paste. The steps appear on the canvas, ready for your own accounts.

**Before you run it**

Nothing here has been tested by us. It is somebody's working automation, read and described from its own steps. Treat the connections it wants as a list of accounts it will touch, and read the 13 steps before you point it at anything that matters.

## Run it in n8n

- **Create your n8n account** Free to start. n8n is where the workflow runs. [Create an n8n account ↗](https://millionrounds.com/n8n)
- **Download the workflow** Free with a Millionrounds account. [Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fgenerate-salesforce-opportunity-next-steps-with-gemini)
- **Paste it into n8n** Open a new workflow in n8n and paste. Then connect your own accounts.

Stored with the author's traces removed: canvas notes, instance identifiers, saved credential names and any live document they had left behind.

## Connects to

Each opens the other workflows that use it.

[Salesforce](https://millionrounds.com/workflows?service=Salesforce#library)

## Workflows like it

Also crm, with the same services where possible, closest in size first.

- [**Create Salesforce accounts based on Excel file data** 13 steps · Salesforce](https://millionrounds.com/workflow/create-salesforce-accounts-based-on-excel-file-data)
- [**AI-powered review sentiment analysis** 12 steps · calls a model · Google Sheets, Salesforce](https://millionrounds.com/workflow/ai-powered-review-sentiment-analysis)
- [**Detect revenue leakage with Salesforce and Google Sheets** 12 steps · calls a model · Google Sheets, Salesforce](https://millionrounds.com/workflow/detect-revenue-leakage-with-salesforce-and-google-sheets)
- [**Turn webinar recordings into Salesforce follow-up emails** 14 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/turn-webinar-recordings-into-salesforce-follow-up-emails)
- [**Back up Salesforce records to Google Drive CSV** 14 steps · Gmail, Google Drive](https://millionrounds.com/workflow/back-up-salesforce-records-to-google-drive-csv)
- [**Create Salesforce accounts based on Excel 365 data** 12 steps · Excel, Salesforce](https://millionrounds.com/workflow/create-salesforce-accounts-based-on-excel-365-data)
