Log PDF invoice emails to a CSV ledger with IMAP and local files
Ready for 3.0Ready 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.
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.
- Settings (Edit Fields (Set)): sets or maps fields
- Split PDF Attachments (Code): runs custom JavaScript code
- Extract PDF Text (Extract from File): extracts data from a file
- Parse Invoice Fields (Code): runs custom JavaScript code
- Read Ledger File (Read/Write Files from Disk): reads a file from disk
- Ledger File To Text (Extract from File): extracts data from a file
- Classify Against Ledger (Code): runs custom JavaScript code
- Build Ledger CSV (Code): runs custom JavaScript code
- Ledger CSV To File (Convert to File): converts data to a file
- 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
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.
Nodes used (11)
- Email Trigger (IMAP)
n8n-nodes-base.emailReadImap - Edit Fields (Set)
n8n-nodes-base.set - Code
n8n-nodes-base.code - Extract from File
n8n-nodes-base.extractFromFile - Read/Write Files from Disk
n8n-nodes-base.readWriteFile - Convert to File
n8n-nodes-base.convertToFile - Merge
n8n-nodes-base.merge - If
n8n-nodes-base.if - No Operation, do nothing
n8n-nodes-base.noOp - Switch
n8n-nodes-base.switch - Telegram
n8n-nodes-base.telegram
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.…