Automation library · Alerts and monitoring

Notify clients of delayed trade settlements with Google Sheets

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

MediumCalls a model: Gemini

19 stepsMedium: a working afternoon
2Branches: places the flow splits
1Loop or waits
3Services it connects to

The flow

Starts it 1Model 1Logic 14Service 3

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

  1. 1Daily Settlement Check TriggerSchedule triggerStarts it
  2. 2Fetch Trade Data (Google Sheets)Google SheetsService
  3. 3Normalize Trade FieldsSetLogic
  4. 4Validate & Format Settlement DatesCodeLogic
  5. 5Detect Delayed TradesCodeLogic
  6. 6Filter Delayed Trades OnlyIfLogic
  7. 7Group Trades by Client EmailCodeLogic
  8. 8Skip Non-Delayed TradesNo OpLogic
  9. 9Process Each Client BatchSplit In BatchesLogic
  10. 10Prepare AI Input PayloadCodeLogic
  11. 11Analyze Delayed Trades (AI)Google GeminiModel
  12. 12Parse AI ResponseSetLogic
  13. 13Split Individual TradesSplit OutLogic
  14. 14Route by Severity (HIGH/MEDIUM/LOW)SwitchLogic
  15. 15Build Slack Alert MessageCodeLogic
  16. 16Merge Trade StreamsMergeLogic
  17. 17Send Slack NotificationSlackService
  18. 18Build Email ReportCodeLogic
  19. 19Send Email NotificationGmailService

How it's built

Starts on
A clock
Steps
19, with 2 branches, 1 loop or waits
Size
Medium: a working afternoon
Connects to
Gmail, Google Sheets, Slack
Model
Gemini

Questions

What does it need to run?

An n8n account, plus your own Gmail, Google Sheets 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?

Plan an afternoon. 19 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 19 steps before you point it at anything that matters.