Route AP invoice approvals with Google Sheets three-way match and Gmail
Ready for 3.0What this workflow does
This workflow has 14 nodes and runs manually, when you click “Execute workflow” (plus 1 other trigger). Along the way it connects Google Sheets and Gmail.
How it runs
Trigger: Manually, when you click “Execute workflow” (plus 1 other trigger).
- Config — Safe Test Mode (Code): runs custom JavaScript code
- Read Invoice Queue (Google Sheets): uses Google Sheets
- Read PO Register (Google Sheets): uses Google Sheets
- Mark Invoice Records (Code): runs custom JavaScript code
- Mark PO Records (Code): runs custom JavaScript code
- Combine Invoice and PO Records (Merge): merges the data from its input branches
- Validate & Three-Way Match (Code): runs custom JavaScript code
- Route AP Decision (Switch): routes items into 3 branches
- Reserve AP Decision (Google Sheets): append
- Request Approval — Test Routed (Gmail): uses Gmail
…plus 2 more steps. See the full node list below.
Services it uses
Other Google Sheets + Gmail templates (2,102)
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.
- Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Nodes used (7)
- Manual Trigger
n8n-nodes-base.manualTrigger - Code
n8n-nodes-base.code - Schedule Trigger
n8n-nodes-base.scheduleTrigger - Google Sheets
n8n-nodes-base.googleSheets - Merge
n8n-nodes-base.merge - Switch
n8n-nodes-base.switch - Gmail
n8n-nodes-base.gmail
From the author
Quick overview This workflow runs on a schedule (or manually) to read invoices and purchase orders from Google Sheets, validate each invoice with a three-way match against the PO register, and then log the decision and send approval/exception emails via Gmail…