Use this advanced n8n workflow to track expenses sent via WhatsApp text, image (receipt OCR), or audio. This powerful n8n template integrates AI agents, LangChain, and Postgres for seamless financial management.
Download this n8n workflow template and start using it instantly.
Individuals or small teams seeking a simple, chat-based method for tracking daily expenditures.
Users looking for advanced n8n templates that combine conversational AI (LLMs) with database operations.
Developers needing a comprehensive example of an n8n workflow integrating WhatsApp, OCR, Transcription, and LangChain agents.
Businesses requiring an easy-to-use, multi-input data capture system powered by n8n nodes.
This is an incredibly powerful and versatile n8n workflow designed to transform your WhatsApp conversations into a functional financial management tool. It solves the friction of traditional expense tracking apps by allowing users to log expenses using whatever format is easiest at the moment—be it a quick text message, a photo of a receipt, or a voice note.
The core value of this n8n template lies in its multi-modal processing capabilities. An incoming message triggers the n8n workflow, which first authenticates the user and then routes the request based on intent (logging a transaction, requesting a summary, or simple chat). For media inputs, the n8n nodes handle downloading, transcription (for audio), or OCR (for images/receipts). All parsed data is then validated and securely stored in a Postgres database. This sophisticated n8n solution demonstrates best practices for using LangChain agents within an n8n workflow environment.
The entire n8n workflow is initiated by the Incoming WhatsApp Trigger n8n node.
Message Intent Classifier) uses the message content to determine the user's goal: Report Request, Expense Log (Text), Expense Log (Media), or Casual Chat. The n8n workflow then routes the execution using the Route by Intent switch n8n node.Run OCR on Image) for text extraction (OCR).Transcribe Audio by deepgram) for transcription, turning the voice note into text.Parse & Validate Transaction family of n8n nodes) take the extracted or raw text input. They are instructed to rigorously parse the financial data into a structured JSON format (amount, category, description).Insert Transaction into DB1 (Postgres n8n node) commits the record. Incoming WhatsApp Trigger and the various outbound WhatsApp n8n nodes (ensure you have the necessary webhook configuration set up with your WhatsApp provider, e.g., Meta Cloud API).Fetch User Profile from Postgres and Insert Transaction into DB1 n8n nodes. Ensure your database schema is correctly set up to handle users and transaction records as expected by the Code and Postgres n8n node configurations. Incoming WhatsApp Trigger: The initial n8n trigger. Listens for incoming messages to start the entire n8n workflow.
LangChain Agent (Message Intent Classifier): Uses an LLM (via an OpenAI Chat Model n8n node) to categorize the incoming user request into predefined actions (e.g., Log Expense, Get Report).
Postgres n8n node (User/DB Ops): Used to check user existence and insert new user profiles or transaction records into the database. Key for persistent data storage in this n8n workflow.
HTTP Request n8n node (Run OCR on Image): Configured to interface with a service like the Gemini API, it extracts text from attached receipt images. This is a critical custom step in the multi-modal n8n node chain.
HTTP Request n8n node (Transcribe Audio by deepgram): Downloads and sends audio files for accurate transcription, transforming spoken expense reports into actionable text data.
LangChain Agent (Parse & Validate Transaction): Several versions of this powerful n8n node exist, tailored to clean and structure data derived from raw text, OCR output, or audio transcription before committing it to the database.
Code n8n node (Transform Custom Query for Postgres): Executes custom JavaScript logic to sanitize and finalize the AI-generated SQL query before it is run against the Postgres database, ensuring security and format correctness within the n8n template.
WhatsApp n8n node (Send Financial Response1): Used at the end of the transaction logging path to send confirmation or error messages back to the user, completing the loop of this complex n8n workflow.
Build a powerful, multi-modal WhatsApp AI Dietitian chatbot using this advanced n8n workflow. It integrates the Google Gemini LLM to analyze food images and provide instant health advice.

Deploy a smart, multilingual WhatsApp customer support solution using this powerful n8n workflow. Integrate Claude AI, Google Docs RAG, and media handling (audio/image) in one efficient n8n node sequence.

Deploy a powerful n8n workflow for WhatsApp customer support. Uses Google Gemini AI, Google Docs as a knowledge base, and handles the 24-hour window rule. Integrate this n8n template now.

Use this powerful n8n workflow to automate WhatsApp group onboarding. Instantly welcome new members with personalized messages and assign starter engagement points in Airtable.

Build a powerful WhatsApp marketing solution using this complex n8n workflow. Sync Meta templates, fetch contacts from Google Sheets, and send personalized, dynamic broadcasts.

I build robust, error-handled n8n automations—enhanced with AI—to simplify email, social, and CRM tasks. You can explore my published templates, like the WhatsApp Expense Tracker, directly in the n8n community. I’m endlessly curious—experimenting daily with new nodes, AI integrations (LangChain, OpenRouter), and workflow patterns to push what's possible in n8n.







































