🚨Warning! Potentially Destructive Operations!
Configured with Agent, Extract From File, OpenAI Chat Model, Local File Trigger, and additional nodes. Review the connections and setup before adapting this template.
Node categories in this workflow
- Trigger
- Code
- Transform
- Files / media
- AI & models
Icons describe general node roles, inferred from node types. Inspect the parameters for the configured action.
Drag to pan; use + and − to zoom. Reconstructed from the exported node positions; nothing runs here. Dashed lines represent non-main connections. Full node names and notes appear below.
How it works
The exported workflow contains the following configured nodes. Their connections are shown above; inspect the JSON for the complete logic, expressions, and external actions.
| Node | Category | Type | Operation |
|---|---|---|---|
| Watch For Bank Statements | Trigger | Local File Trigger | See node parameters |
| Get Tenant Details | Code | Tool Code | See node parameters |
| Structured Output Parser | Transform | Output Parser Structured | See node parameters |
| Get Bank Statement File | Files / media | Read Write File | See node parameters |
| Get CSV Data | Transform | Extract From File | See node parameters |
| Alert Actions To List | Transform | Split Out | See node parameters |
| Get Property Details | Code | Tool Code | See node parameters |
| Set Variables | Transform | Edit Fields | See node parameters |
| Append To Spreadsheet | Code | Code | See node parameters |
| OpenAI Chat Model | AI & models | OpenAI Chat Model | See node parameters |
| Reconcile Rental Payments | AI & models | Agent | See node parameters |
Setup
- Download the JSON and import it into an isolated n8n instance. Leave the workflow inactive.
- Connect your own credentials through n8n’s credential store. Replace
REPLACE_WITH_*values with your resource identifiers. - Inspect API destinations, Code nodes, database queries, file paths, and outbound actions.
- Run with synthetic data and harmless destinations. Enable triggers only after checking the actual outputs.
Requirements
An n8n instance with the listed node types and compatible versions. Service-connected workflows may require accounts, credentials, or paid APIs.
Credential types declared in the source
openAiApi
Workflow notes
Step 1. Wait For Incoming Bank Statements
Step 1. Wait For Incoming Bank Statements
Read more about the local file triggers
For this demo, we'll show that n8n is more than capable working with the local filesystem. This gives great benefits in terms of privacy and data security.
For our datastore, we're using a locally hosted XLSX Excel file which we'll query and update throughout this workflow.
Step 2. Delegate to AI Agent to Quickly Identify Issues with Rental Payments
Step 2. Delegate to AI Agent to Quickly Identify Issues with Rental Payments
An AI agent can not only check against agreed amounts and compare due dates but also consider contract exceptions and tenant notes before deciding to take action. In a scenario of 10+ of tenants, this can save a lot of admin time.
For this demo, we're using a remote LLM Model but this can easily be swapped out for other self-hosted LLMS models that support function calling.
Step 3. Generate a Report to Action any Issues
Step 3. Generate a Report to Action any Issues
Read more about using the Code Node
After the AI Agent has helped identify issues to action, we can generate a report and update a locally hosted xlsx file. This again helps keep workflows private to nothing senstive goes over the wire.
Though n8n lacks a builtin node for editing local xlsx file, we can tap into the sheetJS library available to the "Code" node.
Try It Out!
Try It Out!
This workflow ingests bank statements to analyses them against a list of tenants using an AI Agent. The agent then flags any issues such as missing payments or incorrect amounts which are exported to a XLSX spreadsheet.
Note: This workflow is intended to work with a self-hosted version of n8n and has access to the local file system.
- Watches for CSV files (bank statements)
- Imports into AI agent for analysis.
- AI agent will query the Excel spreadsheet for tenant and property details.
- AI agent will generate report on discrepancies or issues and write them to the Excel file.
Need Help?
Join the Discord or ask in the Forum!
Happy Hacking!
🚨Warning! Potentially Destructive Operations!
🚨Warning! Potentially Destructive Operations!
With code comes great responsibility! There is a risk you may overwrite/delete data you didn't intend. Always makes backups and test on a copy of your spreadsheets!
💡I'm designed to work self-hosted!
💡I'm designed to work self-hosted!
Some nodes in this workflow are only available to the self-hosted version of n8n.
🚨Warning! Potentially Destructive Operations!
🚨Warning! Potentially Destructive Operations!
Purpose and structure
This folder contains the 🚨Warning! Potentially Destructive Operations! workflow. Its executable nodes use agent, code, extractFromFile, lmChatOpenAi, localFileTrigger, outputParserStructured, readWriteFile, set, splitOut, toolCode. The table and connection map below are derived from the JSON, not an inferred guarantee of behavior.
Setup
Import inactive. Configure your own credentials and replace REPLACE_WITH_* values. Review external destinations and Code nodes before running.
Entry points
Watch For Bank Statements
Verification
Sanitized source candidate; not runtime-tested. This overview is generated from node metadata. Read the folder README for the connection map, credential types, and license.
Attribution
https://github.com/Zie619/n8n-workflows/blob/94007c1445d9258a7da116646b79473e7c7c3282/workflows/Localfile/0536_Localfile_Splitout_Send_Triggered.json MIT; preserve source notices.