See llms.txt for all machine-readable content.
This workflow runs daily to three-way match invoices against purchase orders and goods receipts in Google Sheets, using fuzzy similarity scoring plus Groq Llama 3.3 semantic checks to approve, reject with Gmail alerts, or escalate for a Notion-backed AI audit decision.
Adjusting Financial Tolerance:
Inside the Merge & Similarity Scoring code node, look for the line const tolerance = inv.invoice_amount * 0.05;. You can change 0.05 to 0.02 if you want a stricter 2% tolerance limit.
Adding Synonyms:
In that same code node, there is a const synonyms dictionary. You can easily add your own industry-specific terms here (e.g., monitor: ["screen", "display"]) to make the baseline scoring smarter.
Tweaking the AI Agent:
Open the Analyze Discrepancy vs History AI Agent node. You can modify the System Message to give the Llama 3.3 model specific instructions unique to your company's risk appetite.
Slack or Microsoft Teams Integration:
Swap out the Gmail node for a Slack or Teams node to send real-time chat alerts for rejected invoices to a dedicated finance channel.
ERP/Accounting Software Sync:
Instead of updating Google Sheets at the end of the workflow, add a QuickBooks Online or Xero node to directly create approved bills in your accounting software.
PDF OCR Extraction:
Add an Email Trigger and a Document Parser at the very beginning of the workflow to automatically extract text from PDF invoices emailed by vendors, feeding that data directly into the Sheets.
Standard AP Automation:
Automatically approving recurring monthly utility or software vendor bills that rarely change in price or description.
E-commerce Inventory Reconciliation:
Matching digital purchase orders with warehouse receiving logs to ensure suppliers aren't overcharging for missing units.
Vendor Risk Management:
Catching "category creep," where a vendor approved to sell office supplies suddenly bills for high-end electronics, allowing the AI to flag the strange behavior based on historical data.
Supply Chain Discrepancy Resolution:
Automatically resolving minor wording variations in global shipping manifests (e.g., "Timber" vs "Wood") without needing a human to manually intervene.
Automated Financial Auditing:
Keeping a pristine, hands-off record in Notion of exactly why a payment was approved, complete with the math and AI reasoning, ready for tax season or internal audits.
| Issue | Possible Cause | Solution |
|---|---|---|
| Google Sheets nodes fail to fetch data | Incorrect Document ID or revoked OAuth permissions. | Re-authenticate your Google credential in n8n. Verify the Document ID in the node settings matches your spreadsheet's URL. |
| Workflow errors at the Merge & Scoring node | Missing or incorrectly named columns in your Sheets. | Ensure your Sheets have exact column headers matching the code: invoice_id, vendor_id, invoice_amount, items, etc. |
| AI Review marks everything as "Rejected" | Groq Llama node is missing context or Notion history failed to load. | Check the Fetch Historical Vendor Approvals node to ensure it is actually pulling data. Review the AI Agent's prompt for over-strictness. |
| Notion Archive nodes throw an error | Database properties are misspelled or mismatched. | Check that your Notion DB has exact property types (e.g., matchScore must be a Number property, decision must be Rich Text). |
| Emails are not sending | Gmail node limits or credential token expiration. | Reconnect your Gmail account. Check your Google Workspace security settings to ensure n8n has permission to send emails on your behalf. |
Building AI-powered financial automation requires precision. If you are struggling to map your specific spreadsheets, want to swap Google Sheets for a complex ERP like SAP or Oracle or need help customizing the Groq AI prompts for your specific industry, you don't have to do it alone.
Reach out to the automation experts at WeblineIndia. Our n8n workflow developers can help you customize Add-Ons, troubleshoot data structures and build reliable, tailor-made n8n workflows that save your business hundreds of manual hours.