AI Finance Assistant: Notion Data Query via Chat Apps - n8n Workflow

Learn how to build an expert Accountant AI Agent using n8n to query your Notion finance data instantly via Telegram and WhatsApp. Use this powerful n8n workflow to automate reporting.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Personal finance enthusiasts who track expenses and budgets in Notion.
Users looking for immediate, conversational access to their financial reports.
Developers seeking advanced examples of using Langchain agent n8n templates with external APIs (Notion).
Anyone needing a custom, instant reporting solution leveraging an n8n workflow.

Overview

This comprehensive n8n workflow transforms your personal Notion finance tracker into a conversational reporting tool accessible directly from Telegram and WhatsApp. Instead of manually opening Notion and filtering databases, you simply ask the bot a question—like, “What were my total expenses last month?”—and the Accountant Agent handles the entire process. This powerful n8n workflow utilizes an LLM (Claude 3.5 Sonnet) combined with specialized data-fetching tools to understand natural language queries, construct complex Notion API filters, retrieve data, perform calculations (like summing amounts), and deliver the summarized answer back to the originating chat platform. It showcases a sophisticated use case for the n8n node ecosystem, providing immediate, automated insights.

How it Works

The automation executes in three main stages:


  1. Trigger & Input: The process begins when a user sends a message to the dedicated Telegram or WhatsApp bot. The incoming query is captured by the relevant n8n trigger (in this case, the Telegram Trigger or the configured WhatsApp Webhook) and passes the message text to the agent.

  2. Agent Processing: The core logic resides in the Accountant Agent n8n node. This agent, configured with Anthropic's Claude 3.5 Sonnet via OpenRouter, processes the natural language input. It uses the Simple Memory n8n node to maintain conversation context. Based on the system prompt, the agent intelligently selects the correct database (e.g., Financial Transactions for expenses) and uses its available tools (Notion HTTP Request nodes) to:

Identify the target Notion database.
Fetch the database properties (schema).
Dynamically generate a Notion filter JSON object (e.g., filtering by date range and expense type).
Execute the Query Notion Database Pages Tool to fetch the relevant rows.
* Summarize the retrieved data (e.g., summing the 'Amount' property) to form a final, concise answer.

  1. Response: The final summary generated by the Accountant Agent is simultaneously sent back to the user via the Telegram Send Message n8n node and the WhatsApp Send Message n8n node, ensuring instant delivery across platforms. This complete flow defines the utility of this specific n8n templates approach.

Installation Guide

To deploy this n8n workflow, follow these steps:


  1. Import the n8n Workflow: Copy the provided JSON data and paste it directly into your n8n instance using the 'Import from JSON' option.

  2. Notion Setup: Ensure you have a personal finance database (like the official Notion template) and create a Notion Integration Token. Grant this integration access to your relevant finance databases (e.g., 'Financial Transactions', 'Budget'). Configure the Notion API credentials in the workflow.

  3. Telegram Configuration: Create a Telegram bot using BotFather. Obtain the Bot Token and your personal Chat ID. Configure the Telegram Trigger and Telegram Send Message n8n node credentials.

  4. WhatsApp Configuration: Set up a WhatsApp Business account and Meta Developer App. Obtain the Permanent Access Token and Phone Number ID. Configure these details in the WhatsApp n8n node credentials.

  5. LLM Service: Set up an account with OpenRouter (or switch the LLM n8n node to your preferred service like OpenAI or Anthropic). Input the API key into the respective credential setting.

  6. Activate: Once all credentials are set up, activate the n8n workflow. Test by sending a query to your Telegram bot.

Node Details

Telegram Trigger: This n8n trigger initiates the workflow upon receiving a new message. It captures the user's finance query.
Accountant Agent (Langchain Agent): The core processing n8n node. It manages the conversation, uses the LLM (claude-3.5-sonnet) for reasoning, and orchestrates the data retrieval via the Notion tools. The prompt instructs it to interpret financial queries and build necessary database filters.
Simple Memory (Langchain MemoryBufferWindow): Stores the past conversation history (context window of 10 messages) so the agent can respond contextually within the n8n workflow.
Get Databases Tool (Notion): A standard Notion n8n node configured to retrieve a list of all accessible databases, allowing the agent to identify the correct database ID based on the query (e.g., matching 'expenses' to the 'Financial Transactions' database).
Get Notion Database Properties Tool (HTTP Request Tool): This tool is essential for the agent. It fetches the schema (properties) of the targeted database, enabling the agent to correctly name properties like Amount, Date, or Type when building the Notion filter JSON.
Query Notion Database Pages Tool (HTTP Request Tool): The execution tool. The agent dynamically generates the URL and the filter JSON body for this n8n node, executing the filtered query against the Notion API to retrieve the relevant finance data.
Send a text message (Telegram): Sends the final, summarized financial answer back to the user via Telegram.
Send message (WhatsApp): Sends the final summarized financial answer to the user via WhatsApp, ensuring multi-channel availability from this single n8n workflow.

Related n8n Workflows

Free

Nodes: 9 Nodes
Updated: December 26 2025
View all
Created by
Anoop
Anoop

🌟 About Me 🌟 I am a passionate and driven individual who thrives on learning and adapting to any situation. My mission is to create impactful, end-to-end products in the domains of productivity, learning, AI, and finance. With a strong foundation in backend development, LLMs, and data engineering, I bring intermediate-level expertise in AI, DevOps, and frontend development, alongside a growing interest in UI/UX and product design.

Featured*