{"product_id":"invoice-po-grn-matching-n8n-workflow-gmail-openai-slack","title":"Invoice PO \u0026 GRN Matching n8n Workflow: Gmail, OpenAI, Slack","description":"\u003ch3\u003eAutomate Invoice-to-PO\/GRN 3-Way Matching with Gmail, OpenAI \u0026amp; Slack\u003c\/h3\u003e\n\u003cp\u003eStop manual invoice checking. This n8n workflow automatically reads vendor invoices from \u003cstrong\u003eGmail\u003c\/strong\u003e, uses \u003cstrong\u003eOpenAI\u003c\/strong\u003e to extract structured fields, matches each invoice against \u003cstrong\u003ePurchase Orders (PO)\u003c\/strong\u003e and \u003cstrong\u003eGRNs\u003c\/strong\u003e in \u003cstrong\u003eGoogle Sheets\u003c\/strong\u003e, and routes approvals via \u003cstrong\u003eSlack\u003c\/strong\u003e—while archiving documents to \u003cstrong\u003eGoogle Drive\u003c\/strong\u003e and generating a weekly bank-upload CSV batch.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eHourly intake from Gmail:\u003c\/strong\u003e Triggers every hour when Gmail receives invoice attachments under the \u003ccode\u003einvoices\u003c\/code\u003e label that are not yet marked \u003ccode\u003eprocessed\u003c\/code\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eDocument handling + OCR-free extraction:\u003c\/strong\u003e Splits PDF\/image attachments, uploads each file to \u003cstrong\u003eGoogle Drive\u003c\/strong\u003e, and sends the document to \u003cstrong\u003eOpenAI\u003c\/strong\u003e to extract vendor details (including \u003cstrong\u003eGSTINs\u003c\/strong\u003e), PO number, line items, and taxes.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003e3-way matching in Google Sheets:\u003c\/strong\u003e Loads vendor master data, POs, GRNs, and the existing AP ledger from Google Sheets, then performs invoice matching with \u003cstrong\u003eGST\/TDS validation\u003c\/strong\u003e and \u003cstrong\u003eduplicate detection\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eWrites results back to the AP ledger:\u003c\/strong\u003e Updates the invoice record with status, exceptions\/warnings, an approval token, and the Drive link.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eSlack routing:\u003c\/strong\u003e Posts FYI for auto-approved invoices; sends approve\/reject actions for invoices requiring review; drafts a Gmail vendor query and posts a hold notification to Slack for invoices that fail checks.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eApproval via webhook:\u003c\/strong\u003e Accepts approve\/reject clicks, validates the one-time token against the AP ledger, updates status, and posts the decision to Slack.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eWeekly payment batch:\u003c\/strong\u003e Every Friday at \u003cstrong\u003e11:00 IST\u003c\/strong\u003e, it reads approved invoices due in the next seven days and prepares a payment CSV batch for bank upload.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eAP teams reducing cycle time for invoice processing using \u003cstrong\u003ePO \u0026amp; GRN matching\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003eAutomation engineers implementing a review\/hold workflow with \u003cstrong\u003eSlack approval\u003c\/strong\u003e links.\u003c\/li\u003e\n  \u003cli\u003eSaaS operators needing scalable invoice intake, archiving, and weekly payment exports.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eNodes\/controls:\u003c\/strong\u003e if, code, gmail, slack, switch, webhook\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eCore systems:\u003c\/strong\u003e Gmail (trigger + hold\/query emails), OpenAI (invoice field extraction), Google Sheets (AP ledger, PO\/GRN data), Google Drive (archival), Slack (FYI + approvals)\u003c\/li\u003e\n\u003c\/ul\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":46232373625011,"sku":"N8N-21074","price":78.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/3T4M4PVCkKZ8eTi2ykrPi_oN1PRLlr.png?v=1792141416","url":"https:\/\/buyflowscripts.com\/products\/invoice-po-grn-matching-n8n-workflow-gmail-openai-slack","provider":"N8N Commerce","version":"1.0","type":"link"}