Classify and file inbound documents with GPT-4o-mini and Gmail
Ready for 3.0What this workflow does
This AI workflow has 40 nodes and runs when an HTTP POST request hits its webhook URL (plus 1 other trigger). Along the way it connects OpenAI and Gmail.
How it runs
Trigger: When an HTTP POST request hits its webhook URL (plus 1 other trigger).
- Validate Intake Token (Code): runs custom JavaScript code
- Find Unsent Document Review Alerts (Data table): get (row)
- Intake Authorized? (If): checks a condition and branches into true / false
- Build Unsent Document Review Alert (Code): runs custom JavaScript code
- Normalize Document Intake (Code): runs custom JavaScript code
- Respond Intake Unauthorized (Respond to Webhook): sends the response back to the webhook caller
- Send Reconciled Document Review Alert (Gmail): send (message)
- Claim Document Key (Code): runs custom JavaScript code
- Build Reconciled Document Alert Update (Code): runs custom JavaScript code
- Document Claim Duplicate? (If): checks a condition and branches into true / false
…plus 28 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 (8)
- Webhook
n8n-nodes-base.webhook - Code
n8n-nodes-base.code - If
n8n-nodes-base.if - Data table
n8n-nodes-base.dataTable - Respond to Webhook
n8n-nodes-base.respondToWebhook - OpenAI
@n8n/n8n-nodes-langchain.openAi - Gmail
n8n-nodes-base.gmail - Schedule Trigger
n8n-nodes-base.scheduleTrigger
From the author
Quick overview This workflow receives documents through a token-protected webhook, validates OCR and file metadata, and uses OpenAI to classify and extract key fields. It stores every outcome in an n8n Data Table, records highconfidence results as logically…