Block duplicate vendor invoice payments with Google Sheets, Slack, and Gmail
Quick Overview This workflow receives vendor invoices via a webhook, normalizes key fields into a fingerprint, checks Google Sheets for prior payments to block duplicates, and then logs results, notifies Slack, and emails a Gmail approver for high-value invoices.
How it works Receives invoice submissions via an HTTP POST webhook endpoint. Parses and normalizes vendor, invoice number, and amount to create a fingerprint for each invoice and drops incomplete records. Looks up the fingerprint in a Google Sheets register of previously paid invoices to detect duplicates. If a duplicate is found, posts a Slack alert and appends an audit entry to a Google Sheets “DuplicateLog” sheet. If no duplicate is found, calculates an approval status and due date, then appends the invoice to a Google Sheets “PaidInvoices” sheet. Emails a manager via Gmail when the amount meets the approval threshold, otherwise posts a Slack “cleared” notice. Returns a JSON response to the webhook caller indicating the invoice number and whether it was flagged as a duplicate.
Setup Copy the webhook URL from the Invoice Intake Webhook node and configure your AP/OCR/source system to POST invoice payloads to it. Create a Google Sheet with “PaidInvoices” and “DuplicateLog” tabs (including columns such as fingerprint, vendorName, invoiceNumber, amount, currency, paid_date, and payment_ref) and replace YOUR_GOOGLE_SHEET_ID in the Google Sheets nodes. Add a Google Sheets OAuth credential in n8n for the lookup and append operations. Add a Slack credential and replace YOUR_SLACK_CHANNEL_ID with the channel where duplicate/cleared notifications should be posted. Add a Gmail credential and set YOUR_APPROVER_EMAIL for manager notifications, and adjust the approval threshold (currently 5,000) if needed.
Related Templates
AI Email Classifier & Auto-Delete for Gmail (SPAM/OFFER Cleaner)
This workflow is designed for freelancers, solopreneurs, and business owners who receive a high volume of irrelevant mes...
Generate Food Recipes from Gmail & Form Requests with Ollama & Llama 3.2
This n8n template demonstrates how to create an intelligent food recipe assistant that accepts requests via Gmail and we...
Automatic News Summarization & Email Digest with GPT-4, NewsAPI and Gmail
📰 AI News Digest Agent: Auto News Summarizer & Email Newsletter Create an intelligent news curation system that automat...
🔒 Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments