Automation library · Scheduling

Score Salesforce deal momentum and explain it with Gmail

Started by a clock, and works across Gmail, Google Calendar, Salesforce and Slack. It hands the judgement calls to Gemini. 21 steps, 2 branches, 2 loops or waits: large, and worth reading before you trust it with anything live.

LargeCalls a model: Gemini

21 stepsLarge: read it before trusting it with anything live
2Branches: places the flow splits
2Loops or waits
4Services it connects to

The flow

Starts it 1Model 2Logic 11Service 7

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

  1. 1Daily Momentum TriggerSchedule triggerStarts it
  2. 2Google Gemini Chat ModelLm Chat Google GeminiModel
  3. 3Fetch OpportunitiesSalesforceService
  4. 4Generate Momentum ReasoningChain LlmModel
  5. 5Process Deals One by OneSplit In BatchesLogic
  6. 6Parse AI OutputCodeLogic
  7. 7Fetch Opportunity DetailsSalesforceService
  8. 8Update Deal MomentumSalesforceService
  9. 9Merge Deal DataMergeLogic
  10. 10Check ContactId ExistsIfLogic
  11. 11Send Momentum Update to SlackSlackService
  12. 12Calculate Momentum ScoreCodeLogic
  13. 13Fetch Contact DetailsSalesforceService
  14. 14Wait Between DealsWaitLogic
  15. 15Prepare AI InputSetLogic
  16. 16Check Contact Email ExistsIfLogic
  17. 17Fetch Deal EmailsGmailService
  18. 18Fetch Deal MeetingsGoogle CalendarService
  19. 19Prepare Email MetricsCodeLogic
  20. 20Prepare Meeting MetricsCodeLogic
  21. 21Merge Engagement MetricsMergeLogic

How it's built

Starts on
A clock
Steps
21, with 2 branches, 2 loops or waits
Size
Large: read it before trusting it with anything live
Connects to
Gmail, Google Calendar, Salesforce, Slack
Model
Gemini

Questions

What does it need to run?

An n8n account, plus your own Gmail, Google Calendar, Salesforce and Slack accounts, 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?

Take your time. At 21 steps it is large: read it before trusting it with anything live.

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 21 steps before you point it at anything that matters.