Skip to main content

Automated invoice payment tracking with OCR, Claude AI, Slack & Notion DB

Workflow preview

Workflow preview
100%
Automated invoice payment tracking with OCR, Claude AI, Slack & Notion DB preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

How it Works This workflow automates Invoice & Payment Tracking (with Approvals) across Notion and Slack. Ingest — You drop invoices/receipts (PDF/IMG/JSON) into the flow. Extract — OCR + parsing p...

Best for

  • AI Summarization automation workflows
  • Multimodal AI automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.code, n8n-nodes-base.switch, n8n-nodes-base.httprequest, n8n-nodes-base.if, @n8n/n8n-nodes-langchain.chainllm, @n8n/n8n-nodes-langchain.lmchatanthropic, n8n-nodes-base.slacktrigger, n8n-nodes-base.notion

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Han.

Original n8n.io source

1.1 Workflow description

Title
Automated invoice payment tracking with OCR, Claude AI, Slack & Notion DB
Workflow name
Automated invoice payment tracking with OCR, Claude AI, Slack & Notion DB

How it Works

This workflow automates Invoice & Payment Tracking (with Approvals) across Notion and Slack.

  • Ingest — You drop invoices/receipts (PDF/IMG/JSON) into the flow.

  • Extract — OCR + parsing pulls out key fields (invoice no, vendor, currency, totals, receipt paid amount/date).

  • De-dup & Match — We canonicalize vendor + invoice_no and search Notion:

    • Primary match: Invoice No (+ optional Currency / Vendor (Canon)).
    • Fallback: uses document Amount Total and dates.
  • Decide the action

    • create_unpaid — new invoice (no payment).
    • create_paid — new invoice fully paid (unverified).
    • create_partial — new invoice with a first partial payment.
    • update_partial — add a partial to an existing invoice.
    • update_mark_paid — mark existing invoice paid in full.
    • manual_review — currency mismatch / overpayment / ambiguous.
    • archive — push to archive logs (from manual review).
  • Slack approvals (one-click) — A message shows previous paid, this receipt, new total, and Approve buttons (links to a Wait for Webhook resumeUrl). Reviewer picks: Approve Partial / Mark Paid / Manual Review / Archive.

  • Notion updates

    • We only write editable fields: Paid Amount (number), Status (select), Last Payment Date (date).
    • Formulas (e.g., Amount Total, Amount Due) recompute automatically.
    • Receipts are saved in a Receipts DB and related back to the invoice.
  • Notifications & duplicates — If duplicates are detected, Slack posts a simple list with clickable invoice names.

  • Archiving — From Manual Review, Archive goes straight to Archived Invoice DB (and optional Archived Source File DB) as a log entry—no pre-checks needed.

Set up Steps

Prerequisites

  1. Notion DB
  2. 4 Slack Channel (Invoice Input, Notification, Manual Review, Duplicate Alert (Optional))
  3. AI Model (We use Claude 3.5 Haiku, Feel free to use Latest Model)
  4. OCR Parsing (We Used ocr.space, Feel Free to Change into any OCR Parsing you have)

  • Create Notion DBs:
    • Invoice DB: Title Invoice No; Number Paid Amount (editable); Select Status; Dates (Issue/Due/Last Payment Date); Formulas:
      • Amount Total = round(Subtotal - Discount Amount + Tax Total, 2)
      • Amount Due = max(0, round(Amount Total - Paid Amount, 2))
    • Receipts DB: Invoice No, Vendor, Paid Amount (number), Currency (select), Paid Date (date), Receipt No, Source URL; Relation → Invoice.
    • Archived Invoice DB: Invoice No, Vendor, Reason, Source URL, Original Page ID, Archived At (date).
    • (Optional) Source File / Archived Source File DBs.
    • Share all DBs with your Notion integration (Add connections).
  • Add credentials in n8n: Notion (integration token) and Slack (bot token). Invite the bot to your channel.
  • Import the workflow/template: Set each Notion node’s Database ID and each Slack node’s Channel/Credential.
  • Map updates: In the Invoice Update Page node, map Paid Amount, Status, Last Payment Date. In Create Receipt, map Invoice relation + receipt fields.
  • Test: Run with a sample invoice/receipt → click a Slack button → verify Invoice/Receipt updates in Notion → try Archive from Manual Review.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Format Check

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 2 - Check Format

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 3.2

Block 3 - Take Binary Files for Document

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 4 - OCR Space Parse1

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 5 - Code

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 6 - Check parsing Error3

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 7 - Basic LLM Chain

Type / Role
@n8n/n8n-nodes-langchain.chainLlm - chainLlm
Config choices
Version 1.7

Block 8 - Anthropic Chat Model4

Type / Role
@n8n/n8n-nodes-langchain.lmChatAnthropic - lmChatAnthropic
Config choices
Version 1.3

Block 9 - Cleans AI Response

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 10 - Internal Check Duplicate Invoice

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 11 - Slack Trigger

Type / Role
n8n-nodes-base.slackTrigger - slackTrigger
Config choices
Version 1

Block 12 - Merge with Original Data

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 13 - Merge Data Value into One Key

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 14 - Decide Fate for Data

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 15 - Create Query for DB

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 16 - Check DB Invoice

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 17 - Merge Items Invoice

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 18 - Send to Source File Invoice 1

Type / Role
n8n-nodes-base.notion - notion
Config choices
Version 2.2

Block 19 - Prepare Line Items before send

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 20 - Decide Fate

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 3.2

Block 21 - Create new Invoice Unpaid

Type / Role
n8n-nodes-base.notion - notion
Config choices
Version 2.2

Block 22 - Add Receipt into Cashflow

Type / Role
n8n-nodes-base.notion - notion
Config choices
Version 2.2

Block 23 - Update Invoice to Paid Fully

Type / Role
n8n-nodes-base.notion - notion
Config choices
Version 2.2

Block 24 - Send to Source File Invoice 2

Type / Role
n8n-nodes-base.notion - notion
Config choices
Version 2.2

Showing the first 24 of 92 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Automated invoice payment tracking with OCR, Claude AI, Slack & Notion DB
Complexity advanced
Nodes 92
Categories AI Summarization, Multimodal AI
Author Han
Published 23 Aug 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/7773/7773.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Automated invoice payment tracking with OCR, Claude AI, Slack & Notion DB do?

How it Works This workflow automates Invoice & Payment Tracking (with Approvals) across Notion and Slack. Ingest — You drop invoices/receipts (PDF/IMG/JSON) into the flow. Extract — OCR + parsing p...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your AI Summarization, Multimodal AI use case.