# Automate document approvals with Supabase and Gmail: n8n workflow

> 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...

Source: https://millionrounds.com/workflow/automate-document-approvals-with-supabase-and-gmail (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [Documents and files](https://millionrounds.com/workflows?category=Documents+and+files#library)

# 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

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fautomate-document-approvals-with-supabase-and-gmail)

**33 steps** Large: read it before trusting it with anything live

**3** Branches: places the flow splits

**0** Loops or waits

**2** Services it connects to

## The flow

Starts it 3 Logic 6 Service 24

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

- 1 **Webhook** Webhook *Starts it*
- 2 **start_approval_form** Form trigger *Starts it*
- 3 **get_approval_data** Supabase *Service*
- 4 **upload_to_supabase_storage** Http Request *Service*
- 5 **If** If *Logic*
- 6 **save_document** Supabase *Service*
- 7 **update_approval_data** Supabase *Service*
- 8 **response_message** Set *Logic*
- 9 **get_workflow_level_one** Supabase *Service*
- 10 **check_reject_or_approve** If *Logic*
- 11 **Respond to Webhook1** Respond To Webhook *Starts it*
- 12 **get_user_by_role** Supabase *Service*
- 13 **get_level_details** Supabase *Service*
- 14 **Final Update Document** Supabase *Service*
- 15 **create_uuid_token** Crypto *Service*
- 16 **get_next_level** Supabase *Service*
- 17 **Audit** Supabase *Service*
- 18 **create_record_approvals** Supabase *Service*
- 19 **is_last_level** If *Logic*
- 20 **response_message1** Set *Logic*
- 21 **fetch_file_to_review** Http Request *Service*
- 22 **get_workflow_by_level** Supabase *Service*
- 23 **send_email** Gmail *Service*
- 24 **get_user_by_role1** Supabase *Service*
- 25 **audit_invites** Supabase *Service*
- 26 **generate_uuid** Crypto *Service*
- 27 **end_form** Form *Service*
- 28 **create_approval_record** Supabase *Service*
- 29 **get_document_details** Supabase *Service*
- 30 **fetch_file_to_review1** Http Request *Service*
- 31 **send_emai_by_level** Gmail *Service*
- 32 **Audit1** Supabase *Service*
- 33 **response_message2** Set *Logic*

## 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.

## Run it in n8n

- **Create your n8n account** Free to start. n8n is where the workflow runs. [Create an n8n account ↗](https://millionrounds.com/n8n)
- **Download the workflow** Free with a Millionrounds account. [Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fautomate-document-approvals-with-supabase-and-gmail)
- **Paste it into n8n** Open a new workflow in n8n and paste. Then connect your own accounts.

Stored with the author's traces removed: canvas notes, instance identifiers, saved credential names and any live document they had left behind.

## Connects to

Each opens the other workflows that use it.

[Gmail](https://millionrounds.com/workflows?service=Gmail#library)[Supabase](https://millionrounds.com/workflows?service=Supabase#library)

## Workflows like it

Also documents and files, with the same services where possible, closest in size first.

- [**Send, chase, and e-signature with Airtable and TurboDocx** 33 steps · Airtable, Gmail](https://millionrounds.com/workflow/send-chase-and-e-signature-with-airtable-and-turbodocx)
- [**Document-based RAG chat assistant with Google Drive** 32 steps · calls a model · Google Drive, Supabase](https://millionrounds.com/workflow/document-based-rag-chat-assistant-with-google-drive)
- [**Chat with Google Drive and Pinecone** 30 steps · calls a model · Gmail, Google Drive](https://millionrounds.com/workflow/chat-with-google-drive-and-pinecone)
- [**Provide academic OCR and RAG answers on Telegram with Gemini** 28 steps · calls a model · Google Drive, Google Sheets](https://millionrounds.com/workflow/provide-academic-ocr-and-rag-answers-on-telegram-with-gemini)
- [**Translate documents to multiple languages with Google Drive** 27 steps · Gmail, Google Drive](https://millionrounds.com/workflow/translate-documents-to-multiple-languages-with-google-drive)
- [**Archive HR and legal documents with UploadToURL** 26 steps · Airtable, Gmail](https://millionrounds.com/workflow/archive-hr-and-legal-documents-with-uploadtourl)
