Templates / Log PDF invoice emails to a CSV ledger with IMAP and local files

Log PDF invoice emails to a CSV ledger with IMAP and local files

Ready for 3.0

by Invoice Ledger ✓ · 1 views · created 2026-11-11 · Invoice Processing

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-12-01.

📬 Weekly n8n 3.0 breakage alerts, free

What this workflow does

This workflow has 30 nodes and runs when a new email arrives over IMAP. Along the way it connects Telegram.

How it runs

Trigger: When a new email arrives over IMAP.

  1. Settings (Edit Fields (Set)): sets or maps fields
  2. Split PDF Attachments (Code): runs custom JavaScript code
  3. Extract PDF Text (Extract from File): extracts data from a file
  4. Parse Invoice Fields (Code): runs custom JavaScript code
  5. Read Ledger File (Read/Write Files from Disk): reads a file from disk
  6. Ledger File To Text (Extract from File): extracts data from a file
  7. Classify Against Ledger (Code): runs custom JavaScript code
  8. Build Ledger CSV (Code): runs custom JavaScript code
  9. Ledger CSV To File (Convert to File): converts data to a file
  10. Write Ledger File (Read/Write Files from Disk): reads a file from disk

…plus 16 more steps. See the full node list below.

Services it uses

Telegram

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.

Check at runtime on n8n 3.0
  • Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Informational: a static scan can't see the data, so test these on your own instance. Status above is unchanged.

Nodes used (11)

From the author

Quick overview This workflow reads invoice emails from an IMAP inbox, extracts text from PDF attachments, parses key invoice fields, and appends non-duplicate entries to a local CSV ledger file, with an optional run digest sent to Telegram. How it works 1.…

Excerpt from Invoice Ledger'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.