Route AI-scored approval requests with GPT-4o-mini, Supabase and Gmail
Ready for 3.0What this workflow does
This AI workflow has 19 nodes and runs when someone submits an n8n form (“Approval Request Form”) (plus 1 other trigger). Along the way it connects OpenAI, Supabase and Gmail.
How it runs
Trigger: When someone submits an n8n form (“Approval Request Form”) (plus 1 other trigger).
- Normalize Form Data (Edit Fields (Set)): sets 8 fields: request_type, request_title, amount…
- If: checks a condition and branches into true / false
- Analyze Risk & Priority (OpenAI): uses OpenAI
- Mark Request Approved (Supabase): update
- Mark Request Rejected (Supabase): update
- Extract AI JSON Response (Code): runs custom JavaScript code
- Reload Approved Request (Supabase): get
- Reload Rejected Request (Supabase): get
- Prepare AI + Form Data (Edit Fields (Set)): sets 4 fields: AI response, Form data, approval_level…
- Requester Email Valid? (If): checks a condition and branches into true / false
…plus 7 more steps. See the full node list below.
Services it uses
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (9)
- n8n Form Trigger
n8n-nodes-base.formTrigger - Edit Fields (Set)
n8n-nodes-base.set - OpenAI
@n8n/n8n-nodes-langchain.openAi - Supabase
n8n-nodes-base.supabase - Code
n8n-nodes-base.code - Gmail
n8n-nodes-base.gmail - Webhook
n8n-nodes-base.webhook - If
n8n-nodes-base.if - Switch
n8n-nodes-base.switch
From the author
Quick overview This workflow collects approval requests via an n8n form, uses OpenAI (GPT-4o-mini) to summarize and score risk, stores the request in Supabase, emails the right approver via Gmail with approve/reject links, then updates the Supabase record and…