Automation library · Alerts and monitoring

Optimize fleet routes and anomaly alerts with OpenAI and Slack

Started by another system calling it, and works across Email, Postgres and Slack. It hands the judgement calls to OpenAI. 28 steps, 2 branches, 1 loop or waits: large, and worth reading before you trust it with anything live.

LargeCalls a model: OpenAI

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

The flow

Starts it 3Model 6Logic 12Service 7

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

  1. 1Telemetry Webhook TriggerWebhookStarts it
  2. 2Scheduled Data SyncSchedule triggerStarts it
  3. 3OpenAI GPT-4 ModelLm Chat Open AiModel
  4. 4Route Optimization Output ParserOutput Parser StructuredModel
  5. 5OpenAI GPT-4 Model for AnomalyLm Chat Open AiModel
  6. 6Anomaly Detection Output ParserOutput Parser StructuredModel
  7. 7Workflow ConfigurationSetLogic
  8. 8Merge Trigger SourcesMergeLogic
  9. 9Route Optimization AgentAgentModel
  10. 10Anomaly Detection AgentAgentModel
  11. 11Normalize Telemetry DataCodeLogic
  12. 12Apply Business RulesCodeLogic
  13. 13Validate Data QualityCodeLogic
  14. 14Route by SeveritySwitchLogic
  15. 15Remove Duplicate EventsRemove DuplicatesLogic
  16. 16Store Telemetry RecordsPostgresService
  17. 17Wait for Manual ReviewWaitLogic
  18. 18Alert Critical IncidentsSlackService
  19. 19Fetch Traffic & Weather DataHttp RequestService
  20. 20Merge Telemetry with External DataMergeLogic
  21. 21Notify Dispatchers via SlackSlackService
  22. 22Store Incident RecordsPostgresService
  23. 23Prepare Customer NotificationSetLogic
  24. 24Generate Performance ReportPostgresService
  25. 25Email Operations TeamEmail SendService
  26. 26Check if Re-routing RequiredIfLogic
  27. 27Respond to WebhookRespond To WebhookStarts it
  28. 28Trigger Re-routing ActionCodeLogic

How it's built

Starts on
Another system calling it
Steps
28, with 2 branches, 1 loop or waits
Size
Large: read it before trusting it with anything live
Connects to
Email, Postgres, Slack
Model
OpenAI

Questions

What does it need to run?

An n8n account, plus your own Email, Postgres and Slack accounts, and a key for OpenAI. You connect your own accounts after importing it; none are included.

What starts it?

It starts on another system calling it.

Does it use AI?

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

How long does it take to set up?

Take your time. At 28 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 28 steps before you point it at anything that matters.