Flag duplicate and risky AP invoices with Gmail, OpenAI and Supabase β n8n Workflow
Overview
π How it works
Monitors your AP inbox for incoming invoices, extracts structured data with AI, runs duplicate and vendor history checks against Supabase, then scores each invoice for fraud risk β routing suspicious ones to Slack and your AP team before any payment is processed.
π¬ Gmail Trigger monitors your accounts payable inbox in real time π€ AI Agent extracts invoice number, vendor, amount, currency, dates and line items into structured JSON β no manual data entry π Checks
Nodes used
Workflow Preview
How it Works
- 1
Trigger
The workflow starts with a trigger trigger.
- 2
Process
Data flows through 15 nodes, connecting agent, code, gmail.
- 3
Output
The workflow completes its automation and delivers the result to the configured destination.
Node Details (15)
Slack
slack
Gmail
gmail
Supabase
supabase
Code
code
AI Agent
n8n-nodes-langchain.agent
OpenAI Chat Model
n8n-nodes-langchain.lmChatOpenAi
Structured Output Parser
n8n-nodes-langchain.outputParserStructured
How to Import This Workflow
- 1Click Download JSON button on the right to save the workflow file.
- 2Open your n8n instance. Go to Workflows β New β Import from file.
- 3Select the downloaded
flag-duplicate-and-risky-ap-invoices-with-gmail-openai-and-supabasefile and click Import. - 4Set up credentials for each service node (API keys, OAuth, etc.).
- 5Click Test Workflow to verify everything works, then activate it.
Or paste directly in n8n β Import from JSON:
Integrations
Created by
Kumar SmartFlow Craft
@smartflowautomate
Tags
New to n8n?
n8n is a free, open-source workflow automation tool. Self-host it or use the cloud version.
Get n8n Free β