Templates / Extract invoice data from PDFs to JSON with Gemini AI and XML transformation

Extract invoice data from PDFs to JSON with Gemini AI and XML transformation

Ready for 3.0

by Mauricio Perera ✓ · 1,879 views · created 2025-09-10 · Invoice Processing, AI Summarization

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What this workflow does

This AI workflow has 6 nodes and runs when someone submits an n8n form (“Test”). Along the way it connects Google Gemini.

How it runs

Trigger: When someone submits an n8n form (“Test”).

  1. Extract from File: extracts data from a file (pdf)
  2. Limpio data (Edit Fields (Set)): sets 2 fields: text_limpio, estructuraXML
  3. Message a model (Google Gemini): uses Google Gemini
  4. Limpio XML (Edit Fields (Set)): sets 1 field: factura_limpia
  5. XML: converts between XML and JSON

Services it uses

Google Gemini

Before you upgrade to n8n 3.0

Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.

Nodes used (5)

From the author

This n8n workflow converts invoices in PDF format into a structured, ready-to-use JSON, using AI and XML transformation — without writing any code. 🚀 How it works 1. Upload form → The user uploads a PDF file. 2. Text extraction → The PDF content is extracted…

Excerpt from Mauricio Perera's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.