# Predict deal close dates and update Salesforce with Groq: n8n workflow

> Started by a clock, and works across Gmail, Google Sheets and Salesforce. It hands the judgement calls to Groq.

Source: https://millionrounds.com/workflow/predict-deal-close-dates-and-update-salesforce-with-groq (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)

# Predict deal close dates and update Salesforce with Groq

Started by a clock, and works across Gmail, Google Sheets and Salesforce. It hands the judgement calls to Groq. 17 steps, 2 branches, 1 loop or waits: a working afternoon to understand properly.

Medium Calls a model: Groq

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fpredict-deal-close-dates-and-update-salesforce-with-groq)

**17 steps** Medium: a working afternoon

**2** Branches: places the flow splits

**1** Loop or waits

**3** Services it connects to

## The flow

Starts it 1 Model 2 Logic 6 Service 8

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

- 1 **Insights** Lm Chat Groq *Model*
- 2 **Run Schedule** Schedule trigger *Starts it*
- 3 **AI Deal Timeline Predictor** Agent *Model*
- 4 **Set Lookback Timeframe** Set *Logic*
- 5 **Parse AI Output** Code *Logic*
- 6 **Fetch Historical Won Deals** Salesforce *Service*
- 7 **Fetch Recent Active Deals** Salesforce *Service*
- 8 **check confidence score** If *Logic*
- 9 **Process Opportunities** Split In Batches *Logic*
- 10 **Update Close Date** Salesforce *Service*
- 11 **alert for Manual review** Gmail *Service*
- 12 **Fetch Deal Details** Salesforce *Service*
- 13 **Log Auto-Update Success** Google Sheets *Service*
- 14 **Log Pending Review** Google Sheets *Service*
- 15 **Deal Task History** Salesforce *Service*
- 16 **Is Deal Valid & Active?** If *Logic*
- 17 **Calculate Deal Risk & Velocity** Code *Logic*

## How it's built

- **Starts on:** A clock
- **Steps:** 17, with 2 branches, 1 loop or waits
- **Size:** Medium: a working afternoon
- **Connects to:** Gmail, Google Sheets, Salesforce
- **Model:** Groq

## Questions

What does it need to run?

An n8n account, plus your own Gmail, Google Sheets and Salesforce accounts, and a key for Groq. 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 Groq. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Plan an afternoon. 17 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 17 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%2Fpredict-deal-close-dates-and-update-salesforce-with-groq)
- **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.

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

## Workflows like it

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

- [**Analyze real estate deals with Google Sheets and Groq AI** 17 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/analyze-real-estate-deals-with-google-sheets-and-groq-ai)
- [**Automate B2B sales research & email personalization with Sona** 17 steps · calls a model · Google Sheets](https://millionrounds.com/workflow/automate-b2b-sales-research-and-email-personalization-with-s)
- [**Detect and escalate Salesforce bottlenecks with Gemini** 17 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/detect-and-escalate-salesforce-bottlenecks-with-gemini)
- [**Extract sales insights from Scoot call transcripts with Gemini** 17 steps · calls a model · Gmail](https://millionrounds.com/workflow/extract-sales-insights-from-scoot-call-transcripts-with-gemi)
- [**Personalized outbound emails with Gemini and Notion CRM** 17 steps · calls a model · Google Sheets, Notion](https://millionrounds.com/workflow/personalized-outbound-emails-with-gemini-and-notion-crm)
- [**Re-engage stalled HubSpot deals with OpenAI and Gmail** 17 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/re-engage-stalled-hubspot-deals-with-openai-and-gmail-2)
