Automation library · Content

Route weather-based delivery holds with Open-Meteo and Gemini

Started by a clock, and works across Postgres and Slack. It hands the judgement calls to Gemini. 26 steps, 3 branches, 1 loop or waits: large, and worth reading before you trust it with anything live.

LargeCalls a model: Gemini

26 stepsLarge: read it before trusting it with anything live
3Branches: places the flow splits
1Loop or waits
2Services it connects to

The flow

Starts it 2Model 3Logic 11Service 10

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

  1. 1When Error OccursError triggerStarts it
  2. 2Poll Weather Every 15 MinSchedule triggerStarts it
  3. 3Gemini AI ChatLm Chat Google GeminiModel
  4. 4Parse AI OutputOutput Parser StructuredModel
  5. 5Log Error to PostgresPostgresService
  6. 6Set Region ConfigurationSetLogic
  7. 7Delivery Impact Analyzer AgentAgentModel
  8. 8Alert Ops via SlackSlackService
  9. 9Fetch Weather DataHttp RequestService
  10. 10Initiate Incident CreationService NowService
  11. 11Set Weather Severity ConditionsSetLogic
  12. 12Prepare Affected Stores ListSetLogic
  13. 13If Severe Weather DetectedIfLogic
  14. 14Split Affected StoresSplit OutLogic
  15. 15Check for Active AlertsPostgresService
  16. 16No Severe Weather ActionNo OpLogic
  17. 17Notify Store ManagersSplit In BatchesLogic
  18. 18If Duplicate Alert ExistsIfLogic
  19. 19Complete Alert Log UpdatePostgresService
  20. 20Summary Notification to OpsSlackService
  21. 21Suppress Duplicate AlertNo OpLogic
  22. 22Log New Alert to PostgresPostgresService
  23. 23Retrieve Delivery ManifestsPostgresService
  24. 24Aggregate Delivery ManifestsAggregateLogic
  25. 25If Deliveries Are ImpactedIfLogic
  26. 26Log No Delivery ImpactPostgresService

How it's built

Starts on
A clock
Steps
26, with 3 branches, 1 loop or waits
Size
Large: read it before trusting it with anything live
Connects to
Postgres, Slack
Model
Gemini

Questions

What does it need to run?

An n8n account, plus your own Postgres 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 26 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 26 steps before you point it at anything that matters.