Automation library · Alerts and monitoring

User authentication system with Gmail and Postgres

Started by another system calling it, and works across Gmail and Postgres. 23 steps, 5 branches: large, and worth reading before you trust it with anything live.

Large

23 stepsLarge: read it before trusting it with anything live
5Branches: places the flow splits
0Loops or waits
2Services it connects to

The flow

Starts it 4Logic 12Service 7

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

  1. 1Webhook EntryWebhookStarts it
  2. 2Check OPTIONS RequestIfLogic
  3. 3Respond to OPTIONSRespond To WebhookStarts it
  4. 4Route by ActionSwitchLogic
  5. 5Generate PasswordCryptoService
  6. 6Verify CredentialsPostgresService
  7. 7Check User ExistsPostgresService
  8. 8Create User AccountPostgresService
  9. 9Handle Login Result1CodeLogic
  10. 10Is User Not FoundIfLogic
  11. 11Check Signup Error1IfLogic
  12. 12Check Login StatusIfLogic
  13. 13Error ResponseRespond To WebhookStarts it
  14. 14Code in JavaScriptCodeLogic
  15. 15Success ResponseRespond To WebhookStarts it
  16. 16Handle Signup Error1CodeLogic
  17. 17Extract EmailSetLogic
  18. 18Save Reset CodePostgresService
  19. 19Generate Welcome EmailCodeLogic
  20. 20email2SetLogic
  21. 21Send Welcome EmailGmailService
  22. 22Generate HTML Email2CodeLogic
  23. 23Send a message2GmailService

How it's built

Starts on
Another system calling it
Steps
23, with 5 branches
Size
Large: read it before trusting it with anything live
Connects to
Gmail, Postgres
Model
None. This is plumbing, not judgement

Questions

What does it need to run?

An n8n account, plus your own Gmail and Postgres accounts. 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?

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.