Automation library · Alerts and monitoring

Automated product health monitor with OpenAI and Gmail

Started by a clock, and works across Gmail, Notion, Postgres and Slack. It hands the judgement calls to OpenAI. 32 steps, 1 branch: large, and worth reading before you trust it with anything live.

LargeCalls a model: OpenAI

32 stepsLarge: read it before trusting it with anything live
1Branch: places the flow splits
0Loops or waits
4Services it connects to

The flow

Starts it 4Model 1Logic 5Service 22

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

  1. 1daily report triggerSchedule triggerStarts it
  2. 2Trigger RHSchedule triggerStarts it
  3. 3Trigger CSSchedule triggerStarts it
  4. 4Trigger UHSchedule triggerStarts it
  5. 5Execute SQL query incident checkPostgresService
  6. 6Execute the SQL queryPostgresService
  7. 7select open incidentPostgresService
  8. 8daily usage metricsPostgresService
  9. 9sum upCodeLogic
  10. 10anomalies checkCodeLogic
  11. 11Condition incidentIfLogic
  12. 12anomaliesCodeLogic
  13. 13daily report emailGmailService
  14. 14log incidentPostgresService
  15. 15revenue by countryPostgresService
  16. 16revenue by planPostgresService
  17. 17insert incidentsPostgresService
  18. 18Notions database creationNotionService
  19. 19Update notionsNotionService
  20. 20Merge dataMergeLogic
  21. 21Slack notificationSlackService
  22. 22log system final1PostgresService
  23. 23slack notificationSlackService
  24. 24sum up/ hypothesisOpen AiModel
  25. 25usage health emailGmailService
  26. 26email alertGmailService
  27. 27root cause summarySlackService
  28. 28log system UHPostgresService
  29. 29log systemPostgresService
  30. 30root cause summary emailGmailService
  31. 31update incident statusPostgresService
  32. 32log system finalPostgresService

How it's built

Starts on
A clock
Steps
32, with 1 branch
Size
Large: read it before trusting it with anything live
Connects to
Gmail, Notion, Postgres, Slack
Model
OpenAI

Questions

What does it need to run?

An n8n account, plus your own Gmail, Notion, 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 a clock.

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