Use this robust n8n workflow to automate invoice processing. It features Slack file triggering, OCR extraction, Claude AI parsing, duplicate checking, and dynamic Notion Ledger updates.
Download this n8n workflow template and start using it instantly.
Managing vendor invoices manually is time-consuming and prone to duplication errors. This comprehensive n8n workflow solves this by providing an end-to-end automation solution. It utilizes a Slack input to trigger processing, automatically handles files (PDFs and images) via OCR, leverages the Claude AI language model for highly accurate structured data extraction (vendor, amount, dates, line items), and performs sophisticated internal and external duplicate checks against existing Notion databases. Depending on whether the invoice is new, a duplicate, or a payment against an existing invoice, the n8n workflow dynamically creates, updates, or archives records in your Notion Invoice Ledger and Cashflow Ledger, or routes ambiguous cases to a manual Slack review process. This advanced n8n template ensures data integrity and drastically reduces processing time.
The entire process is initiated by the n8n trigger when a file is posted to a designated Slack channel.
Code n8n node checks the file MIME type (Image or Document/PDF) and routes the binary file download accordingly.Check parsing Error2/Check parsing Error3) stop the workflow if OCR fails, preventing bad data from entering the system.Basic LLM Chain using the Anthropic Chat Model (Claude 3.5 Haiku) n8n node. This powerful n8n node follows a precise prompt to extract 15+ standardized invoice fields into a robust JSON schema.Cleans AI Response code node meticulously cleanses and normalizes the AI-generated data, resolving payment arithmetic and clamping values. The Internal Check Duplicate Invoice n8n node then flags entries that are duplicates within the current batch based on canonicalized vendor names and invoice numbers, ensuring only one 'master' copy continues.Code n8n node (Create Query for DB) to generate a dynamic Notion API query. It checks the Notion Invoice Ledger for existing matches based on Invoice No + Vendor or a fallback heuristic (Amount + Date window).Merge Items Invoice code node compares the extracted data against any Notion matches, determining the nextaction (e.g., createpaid, updatemarkpaid, manual_review).Decide Fate Switch n8n node routes the data to the final Notion operations:Send a message followed by a Wait n8n node) for human intervention. The manual approval resumes the workflow and completes the final Notion update based on the reviewer's choice.To deploy this comprehensive n8n workflow and its advanced functionality, follow these steps:
Anthropic Chat Model4 n8n node.Slack Trigger and all Slack notification n8n nodes with your desired Channel IDs for expense submission, general notifications, and duplicate alerts.Slack Trigger n8n node is activated in production mode to start listening for incoming files. Slack Trigger: The starting n8n trigger, listening for file uploads or messages containing files in a specific Slack channel, initiating the expense automation.
Code (Format Check, Cleans AI Response, Internal Check Duplicate Invoice, etc.): Multiple custom Code n8n nodes perform critical functions: determining file type, consolidating OCR text, robustly cleaning and normalizing LLM output, running complex financial arithmetic, and executing the multi-stage deduplication logic.
HTTP Request (OCR Space Parse): This n8n node sends the binary invoice file to the OCR Space API to convert image or PDF text into machine-readable format.
Anthropic Chat Model4: A core component of this n8n workflow. It uses the Claude language model for highly accurate, structured JSON extraction from the raw OCR text, enforcing a strict invoice data schema.
If/Switch n8n node: Used extensively (Check Format, Decide Fate for Data, Decide Fate) for sophisticated flow control, routing items based on file type, deduplication role, and database match outcomes.
Notion n8n node: Used for all database interactions (create, update, archive) across four separate databases (Invoice Ledger, Cashflow Ledger, Source Files, and Archive). This n8n node manages relations between the records.
Use this powerful n8n workflow to automate accounts receivable. It connects Google Sheets to Gmail, sending timely, personalized payment reminders for invoices due soon or overdue. Optimize cash flow with this essential n8n template.

Use this robust n8n workflow to automate invoice management. It features a scheduled n8n trigger to scan Nextcloud folders, email documents via SMTP, and notify teams using Telegram.

Use this n8n workflow to automatically generate structured invoices. Read financial data from Google Sheets, utilize Google Docs templates, and replace placeholders instantly using core n8n nodes.

Use this powerful n8n workflow to automate invoice handling from email (IMAP) to Google Drive categorization, AI data extraction, Google Sheets logging, and forwarding to DateV.

Deploy this powerful n8n workflow to automate invoice processing. Use Telegram to submit documents, leverage GPT-4o and LlamaIndex OCR for extraction, and sync data directly to SAP Purchase Invoices.

Use this comprehensive n8n workflow to automate billing. Triggers from Google Sheets, generates content with AI, sends invoices via Gmail, checks payment status, and manages smart, escalating payment reminders using the n8n node structure.








































