🧾 Extract invoice data from PDF with Claude AI and create vendor bill in Odoo 18

⚡ 428 views · 🧾 Invoice Processing

Description

This workflow automates accounts payable: upload a PDF invoice, let Claude AI extract the key fields, and automatically create a vendor bill (incoming invoice) in Odoo 18.

Who is this for?

Small and medium businesses using Odoo 18 who want to automate invoice data entry. Finance teams, bookkeepers, or anyone processing incoming invoices manually.

How it works

  1. Receive a PDF invoice via webhook (file upload)
  2. Convert the PDF to base64 for AI processing
  3. Claude AI extracts: vendor name, invoice number, date, amounts, tax rate
  4. Authenticate with Odoo 18 via JSON-RPC API
  5. Check for duplicate invoices (by invoice number)
  6. Find or create the vendor (res.partner) in Odoo
  7. Create a draft vendor bill (account.move) in Odoo
  8. Return a structured JSON response with the result

The invoice is created in draft status so you can review and confirm it manually in Odoo before posting.

Extracted fields

vendor, invoice_number, invoice_date, total_amount, currency, net_amount, tax_rate, tax_amount

Setup

  1. Open the Configuration node and enter your Odoo URL, database, user, and password
  2. Create an HTTP Header Auth credential named Anthropic API Key with header name x-api-key and your Anthropic API key as value
  3. Activate the workflow and send a test PDF

Test with curl

curl -X POST https://your-n8n-instance.com/webhook/invoice-process -F "data=@invoice.pdf"

Requirements

How to customize

Note on data privacy

This workflow sends PDF documents to the Anthropic API for data extraction. Ensure you have a Data Processing Agreement (DPA) with Anthropic and comply with your local data protection regulations (e.g. GDPR) before processing documents containing personal data.

Author: Florian Eiche — eiche-digital.de

🔗 Nodes Used

HTTP Request, Webhook, Extract from File

📥 Import

Download workflow.json and import into n8n: Workflow menu → Import from File

📖 Importing guide · 🔑 Credential setup