Automation library · Documents and files

Automate document approvals with Supabase and Gmail

Started by someone submitting a form, and works across Gmail and Supabase. 33 steps, 3 branches: large, and worth reading before you trust it with anything live.

Large

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

The flow

Starts it 3Logic 6Service 24

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

  1. 1WebhookWebhookStarts it
  2. 2start_approval_formForm triggerStarts it
  3. 3get_approval_dataSupabaseService
  4. 4upload_to_supabase_storageHttp RequestService
  5. 5IfIfLogic
  6. 6save_documentSupabaseService
  7. 7update_approval_dataSupabaseService
  8. 8response_messageSetLogic
  9. 9get_workflow_level_oneSupabaseService
  10. 10check_reject_or_approveIfLogic
  11. 11Respond to Webhook1Respond To WebhookStarts it
  12. 12get_user_by_roleSupabaseService
  13. 13get_level_detailsSupabaseService
  14. 14Final Update DocumentSupabaseService
  15. 15create_uuid_tokenCryptoService
  16. 16get_next_levelSupabaseService
  17. 17AuditSupabaseService
  18. 18create_record_approvalsSupabaseService
  19. 19is_last_levelIfLogic
  20. 20response_message1SetLogic
  21. 21fetch_file_to_reviewHttp RequestService
  22. 22get_workflow_by_levelSupabaseService
  23. 23send_emailGmailService
  24. 24get_user_by_role1SupabaseService
  25. 25audit_invitesSupabaseService
  26. 26generate_uuidCryptoService
  27. 27end_formFormService
  28. 28create_approval_recordSupabaseService
  29. 29get_document_detailsSupabaseService
  30. 30fetch_file_to_review1Http RequestService
  31. 31send_emai_by_levelGmailService
  32. 32Audit1SupabaseService
  33. 33response_message2SetLogic

How it's built

Starts on
Someone submitting a form
Steps
33, with 3 branches
Size
Large: read it before trusting it with anything live
Connects to
Gmail, Supabase
Model
None. This is plumbing, not judgement

Questions

What does it need to run?

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

What starts it?

It starts on someone submitting a form.

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