Create interactive bank expense reports from statements with OpenAI GPT-4o
Ready for 3.0What this workflow does
This AI workflow has 14 nodes and runs when someone submits an n8n form (“Bank Statement to Expense Breakdown”). Along the way it connects OpenAI Chat Model.
How it runs
Trigger: When someone submits an n8n form (“Bank Statement to Expense Breakdown”).
- Is it a PDF? (If): checks a condition and branches into true / false
- Extract PDF Text (Extract from File): extracts data from a file (pdf)
- Extract CSV Text (Extract from File): extracts data from a file (text)
- Combine File Branches (Merge): merges the data from its input branches
- Parse Transactions (Code): runs custom JavaScript code
- Build Category Prompt (Code): runs custom JavaScript code
- Categorize Payees (AI Agent): runs an AI agent, with model: OpenAI Chat Model
- Calculate Totals (Code): runs custom JavaScript code
- Build Insights Prompt (Code): runs custom JavaScript code
- Insights Agent (AI Agent): runs an AI agent, with model: OpenAI Chat Model
…plus 2 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.
- Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Nodes used (8)
- n8n Form Trigger
n8n-nodes-base.formTrigger - If
n8n-nodes-base.if - Extract from File
n8n-nodes-base.extractFromFile - Merge
n8n-nodes-base.merge - Code
n8n-nodes-base.code - AI Agent
@n8n/n8n-nodes-langchain.agent - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - n8n Form
n8n-nodes-base.form
From the author
Quick overview This workflow accepts a bank statement upload (CSV or text-based PDF), parses transactions, uses OpenAI to categorize merchants and generate narrative insights, and returns an interactive HTML expense report with category totals, monthly…