Automation library · Alerts and monitoring

Monitor customer risk and AI feedback with PostgreSQL

Started by a clock, and works across Discord, Gmail, Google Sheets and Postgres. 23 steps, 2 branches, 2 loops or waits: large, and worth reading before you trust it with anything live.

Large

23 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 2Logic 13Service 8

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

  1. 1Weekly schedule1Schedule triggerStarts it
  2. 2Daily Risk Check TriggerSchedule triggerStarts it
  3. 3Edit Fields2SetLogic
  4. 4Edit Fields3SetLogic
  5. 5Switch1SwitchLogic
  6. 6Fetch Customer Risk DataPostgresService
  7. 7Get row(s) in sheet1Google SheetsService
  8. 8Is High Risk Customer?IfLogic
  9. 9Loop Over Items1Split In BatchesLogic
  10. 10Prepare Escalation Summary For Low Risk UserSetLogic
  11. 11Prepare Escalation Summary For High Risk UserSetLogic
  12. 12Merge1MergeLogic
  13. 13Prompt For Model1CodeLogic
  14. 14Merge Risk ResultMergeLogic
  15. 15Send a message1GmailService
  16. 16HTTP Request1Http RequestService
  17. 17Send a message4GmailService
  18. 18Send a message5DiscordService
  19. 19Code in JavaScriptCodeLogic
  20. 20Code in JavaScript3CodeLogic
  21. 21Append or update row in sheetGoogle SheetsService
  22. 22Append or update row in sheet3Google SheetsService
  23. 23Wait1WaitLogic

How it's built

Starts on
A clock
Steps
23, with 2 branches, 2 loops or waits
Size
Large: read it before trusting it with anything live
Connects to
Discord, Gmail, Google Sheets, Postgres
Model
None. This is plumbing, not judgement

Questions

What does it need to run?

An n8n account, plus your own Discord, Gmail, Google Sheets and Postgres accounts. You connect your own accounts after importing it; none are included.

What starts it?

It starts on a clock.

Does it use AI?

No. Every step is fixed logic or a call to a service, so it does the same thing every time.

How long does it take to set up?

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