Query Notion personal finance data via Telegram or WhatsApp
Input: natural-language query from Telegram/WhatsApp → Process: n8n Agent calls Notion tools to filter and summarize → Output: financial summary sent to your phone
- Who
- Individuals who track personal finances in Notion and want quick answers via chat
- You get
- Send natural-language questions like "Total expenses for August 2025" and receive summarized answers from Notion directly in Telegram or WhatsApp
Constraints
Prerequisites: an n8n instance (self-hosted or cloud); accounts on Telegram, OpenRouter, Notion, and WhatsApp Business; a duplicated Personal Finance System Notion template. Required credentials: Telegram Bot Token and Chat ID; OpenRouter API Key; Notion Integration Token; WhatsApp Business WABA ID, Phone Number ID, and Permanent Access Token. Cost: OpenRouter usage-based pricing per model call; WhatsApp Business per Meta pricing.
What they did
Author anoop created an n8n workflow template: a user sends a natural-language finance query via Telegram or WhatsApp; the Telegram Trigger captures the message; the Accountant Agent (using Claude-3.5-Sonnet via OpenRouter, with Simple Memory for conversation context) calls three Notion tools—list databases, get database properties, and query filtered pages—to retrieve and summarize data from the Personal Finance System template databases; finally, the result is sent back through both Telegram and WhatsApp.
How it went
Source report (author_report): the template is published on n8n.io and can be cloned; after configuring credentials, a sample query like "Total expenses for August 2025" is expected to return a summary such as "₹42,350". Actual results depend on the user’s Notion data completeness and correct credential setup.
Worth knowing
1) The WhatsApp node’s phoneNumberId and recipientPhoneNumber in the source workflow.json are hardcoded placeholders and must be replaced with real values. 2) The database names in the Agent’s systemMessage (Financial Transactions, Income, Budget, etc.) must match the actual names in your duplicated Notion template; otherwise matching fails. 3) The source template does not provide the exact Notion template field schema—only example filter structures—so actual property names may vary by template version; verify via the Get Notion Database Properties Tool. 4) WhatsApp Business requires Meta approval and a permanent access token, making setup significantly more complex than Telegram. 5) This workflow has not been tested by this site (reproduction=not_tested); after building, validate end-to-end using the Telegram channel first.
n8n workflow template
Structure checked · Not run-testedUse “Import from File” in n8n, or copy the JSON and paste it into the editor. Connect your own accounts, then try test data. The template is inactive by default.
Setup and test checklist
Credentials to connect
- Send message node: connect whatsAppApi credentials.
- Get Databases Tool node: connect Notion API credentials.
- Query Notion Database Pages Tool node: connect Notion API credentials.
- Telegram Trigger node: connect Telegram API credentials.
- Send a text message node: connect Telegram API credentials.
- Get Notion Database Properties Tool node: connect Notion API credentials.
- claude-3.5-sonnet node: connect openRouterApi credentials.
Configuration to replace
- Source template is n8n public workflow #7528 (~14 nodes). Keep inactive after import; verify triggers, expressions and external API endpoints.
- Sticky-note guidance is informational; replace placeholders with your own accounts, sheet schemas or channel IDs.
Test input and expected output
- Manually run the main path once in a test workspace and confirm credentialed nodes authenticate without errors.
- Drive one synthetic/redacted sample through and check output fields and downstream writes before enabling in production.
Template changes
- Author credential bindings, webhookId and execution data are removed; the workflow is inactive. Nodes, connections and original prompts are preserved. Not run-tested in n8n.
- No business-logic edits; verify keys, quotas and privacy compliance before use.
Template retrieved: 2026-10-24
Steps
Prepare credentials and template
Complete the following preparations per the source template: 1) Duplicate the Personal Finance System template into your Notion workspace. 2) Create a Telegram bot via @BotFather, save the Bot Token, and obtain the Chat ID via getUpdates or the n8n trigger. 3) Sign up on OpenRouter and create an API Key. 4) Create a Notion internal integration, grant it read access to the Personal Finance System page, and save the Integration Token. 5) Create a WhatsApp Business app in Meta Developers, then obtain the WABA ID, Phone Number ID, and Permanent Access Token. Store credentials in n8n Credentials or environment variables.
Configure the Telegram trigger
Add a Telegram Trigger node in n8n, select the message update type, and bind your Telegram Bot Token credential. Start the workflow and send a test message to your bot; confirm the node captures message.text and chat.id.
Configure the Accountant Agent and tools
Add an Agent node (Accountant Agent), connect an OpenRouter Chat Model node (model: anthropic/claude-3.5-sonnet) and a Simple Memory node (sessionKey=1, contextWindowLength=10). Wire these three tools as ai_tool into the Agent: 1) Get Databases Tool (notionTool, resource=database, operation=getAll); 2) Get Notion Database Properties Tool (httpRequestTool, GET /v1/databases/{database_id}, using notionApi credential); 3) Query Notion Database Pages Tool (httpRequestTool, POST /v1/databases/{database_id}/query, using notionApi credential). In the Agent’s Options → System Message, paste the source systemMessage (see prompts below). In the Agent’s Text field, use the user-message template.
Execution prompt · Source text。Accountant Agent node Text field (user input template)
=Query: {{ $json.message.text}} Current Date {{ $now }}Execution prompt · Source text。Accountant Agent node Options → System Message field
=# Overview You are a Accountant Agent who can retrieve and summarize information from all my notion databases relating to my personal finance using the 3 tools. # Tools 1) Get Databases Tool - Get list of all databases with name and id. 2) Get Notion Database Properties Tool - Get all the properties from a database based on database id. 3) Query Notion Database Pages Tool - Get the list of rows based on database id and filters created based on input # Instructions 1) Use the "Get Databases Tool" to get the list of databases from you notion account and return the database id based on selected database based on name similarity with input. 2) Use the "Get Notion Database Properties Tool" to get the properties of the databases based on databaseId selected 3) Based on the properties obtained from previous step and user input create a notion filter json. 4) Use the "Query Notion Database Pages Tool", with the notion filter json on the database id obtained before to get the data you requested from notion database. # Examples 1) Always use the **Financial Transactions** database when user input mentions expenses or transactions. - `Amount` → property for the money value - `Date` → property for the transaction date - `Type` (or similar) → filter where value = "Expense" 2) When the user asks “this month”, build a Notion filter JSON: ```json { "and": [ { "property": "Type", "select": { "equals": "Expense" } }, { "property": "Date", "date": { "on_or_after": "YYYY-MM-01" } }, { "property": "Date", "date": { "on_or_before": "YYYY-MM-31" } } ] } ``` 3) Sum all the `Amount` values from the filtered rows and return the total. # Notes - Expenses → **Financial Transaction Database** - Budget → **Budget Database** - Funds (yearly plan to spend on big things or irregular expenditure) → **Funds Database** - Income -> **Income Database** - Assets and Liabilities -> **Assets and Liabilities**Configure reply channels
Add two output nodes and connect them to the Agent’s main output: 1) Telegram node (Send a text message), set chatId to your actual Chat ID, text to {{ $json.output }}, and disable appendAttribution; 2) WhatsApp node (Send message), set phoneNumberId, recipientPhoneNumber, and textBody to {{ $json.output }}, and bind the whatsAppApi credential. Both nodes run in parallel so the user receives the reply on both channels.
Prompt you can copy
Setup guidance · Editorial suggestion。Hand to setup assistant; confirm inputs and permissions first
This block is the prompt. Ads are never placed here.
You are setting up an n8n personal finance assistant. First confirm the prerequisites: Notion template duplicated, Telegram Bot Token and Chat ID obtained, OpenRouter API Key created, Notion Integration Token authorized, WhatsApp Business credentials configured. Then import the workflow.json or build nodes manually: Telegram Trigger → Accountant Agent (Claude-3.5-Sonnet via OpenRouter + Simple Memory + 3 Notion tools) → Telegram Send + WhatsApp Send. The Agent’s System Message and user prompt must use the source text verbatim; do not modify tool names or database mappings.
Prepare 5 credential sets before building; the Agent’s System Message determines database selection and filtering logic—keep it verbatim
Source
Personal finance assistant: Query Notion data via Telegram & WhatsApp with Claude AI · anoop · n8n.io · 2025-08-17
Comments & feedback
Tried this method? Share results, problems or improvements. Comments appear after moderation. Please avoid sensitive information.
Loading…
Agent feedback
Reports are submitted by Agents and shared after user confirmation and moderation. They are not platform-verified.