This workflow corresponds to n8n.io template #10871 — we link there as the canonical source.
This workflow follows the Agent → Google Drive recipe pattern — see all workflows that pair these two integrations.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"id": "5iA-EUSnMdIX2-eosJXZX",
"meta": {
"templateId": "10871"
},
"name": "Personal finance tracker with Telegram Bot, Google Gemini Vision, and Sheets",
"tags": [],
"nodes": [
{
"id": "c6e24869-d9a4-4d62-99cc-3e39b9fd63df",
"name": "Telegram Trigger",
"type": "n8n-nodes-base.telegramTrigger",
"position": [
1600,
1072
],
"parameters": {
"updates": [
"message"
],
"additionalFields": {}
},
"credentials": {
"telegramApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
},
{
"id": "0f25c4e9-a057-4b51-8f60-84f3403b5f47",
"name": "Aggregate1",
"type": "n8n-nodes-base.aggregate",
"position": [
3536,
1264
],
"parameters": {
"options": {},
"aggregate": "aggregateAllItemData"
},
"typeVersion": 1
},
{
"id": "72c6e90c-8ccc-42ca-a7ea-c30151291739",
"name": "Extract from File",
"type": "n8n-nodes-base.extractFromFile",
"position": [
2864,
1552
],
"parameters": {
"options": {},
"operation": "pdf"
},
"typeVersion": 1
},
{
"id": "66ce05ba-0377-4093-92d8-d2e4cd3d93c1",
"name": "AI Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"onError": "continueRegularOutput",
"position": [
4448,
1216
],
"parameters": {
"text": "={{ $json.data }}",
"options": {
"systemMessage": "=You are a Telegram chatbot for receipt tracking, expense queries. You assist users by processing receipts,you also have access to a google sheet where all expenseses are logged and a calculator to perform complex math.\n\nAlways analyze the user's message first.\n\n1. Message Analysis:\n - If contains a binary file ({{ $json.data }}): Process as receipt via OCR.\n - If contains receipt-like text in {{ $json.data }}\n(e.g., \"Date: 2025-09-10, Amount: 5000 NGN, Food\"): Parse as receipt.\n\n2. Receipt Processing (Binary or Text):\n - For binary: Use OCR on the receipt (image/PDF, in Naira).\n - For text: Parse details from text.\n - Extract:\n - Date (YYYY-MM-DD)\n - Amount (NGN, number, e.g., 1500)\n - Description (brief summary at least a sentence)\n - Category: food, transportation, subscriptions, takeouts, other stuffs, gift, electricity, Repairs,entertainment \n - Defaults: date=today ({{ $('Telegram Trigger').item.json.message.date }}), amount=0, category=\"other stuffs\" if unclear.\n - Output \"data\" as: {\"date\": \"YYYY-MM-DD\", \"amount\": 1500, \"description\": \"Brief summary\", \"category\": \"category_name\"}\n - \"message\": User-friendly confirmation, e.g., \"Receipt processed! Date: [date], Amount: [amount] NGN, Category: [category].\"\n\n3. Tone & Rules:\n - Friendly, concise, professional.\n - For errors (e.g., invalid file, unreadable text): Output {\"type\": \"error\", \"data\": {}, \"message\": \"Sorry, couldn't process\u2014try again!\"}\n - Always output valid JSON.\n - For receipts: {\"type\": \"receipt\", \"data\": {\"date\": \"YYYY-MM-DD\", \"amount\": number, \"description\": \"string\", \"category\": \"string\"}, \"message\": \"string\"}\n - For spend queries: {\"type\": \"spend\", \"data\": {\"start_date\": \"YYYY-MM-DD\", \"end_date\": \"YYYY-MM-DD\", \"category\": \"string\" | null}, \"message\": \"string\"}\n - For general/financial queries: {\"message\": \"string\"}\n- always maintain the Json structure and where information doesn't exsist leave as empty \"\"\n- if amount is equaly to 0 leave as empty \"\"\n\nOutput: JSON as specified\n\n{\n \"type\": \"receipt\",\n \"data\": {\n \"date\": \"2025-09-10\",\n \"amount\": 1500,\n \"description\": \"Groceries from supermarket\",\n \"category\": \"food\"\n },\n \"message\": \"Receipt processed! Date: 2025-09-10, Amount: 1500 NGN, Category: food.\"\n}",
"passthroughBinaryImages": true
},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 2.2
},
{
"id": "14851a75-04cc-4073-abbe-26a97a84afbe",
"name": "Google Gemini Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"position": [
4272,
1440
],
"parameters": {
"options": {}
},
"typeVersion": 1
},
{
"id": "471df243-b318-4067-9986-7ba73093857e",
"name": "Simple Memory",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
4400,
1440
],
"parameters": {
"sessionKey": "=chatid",
"sessionIdType": "customKey",
"contextWindowLength": 10
},
"typeVersion": 1.3
},
{
"id": "eee55184-66f8-43b0-880d-9f9e2f452bba",
"name": "Structured Output Parser",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
4784,
1440
],
"parameters": {
"jsonSchemaExample": "{\n \"type\": \"receipt\",\n \"data\": {\n \"date\": \"2025-09-10\",\n \"amount\": 1500,\n \"description\": \"Groceries from supermarket\",\n \"category\": \"food\"\n },\n \"message\": \"Receipt processed! Date: 2025-09-10, Amount: 1500 NGN, Category: food.\"\n}"
},
"typeVersion": 1.3
},
{
"id": "6e62a277-53f4-48de-ae84-41eade4c000a",
"name": "Calculator",
"type": "@n8n/n8n-nodes-langchain.toolCalculator",
"position": [
4528,
1440
],
"parameters": {},
"typeVersion": 1
},
{
"id": "1548a894-b4c7-4327-b645-76bc913760b8",
"name": "Switch",
"type": "n8n-nodes-base.switch",
"position": [
1824,
1056
],
"parameters": {
"rules": {
"values": [
{
"outputKey": "image",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "abcd0b2d-0711-43d4-bf2b-7ea651662dd0",
"operator": {
"type": "number",
"operation": "exists",
"singleValue": true
},
"leftValue": "={{ $json.message.photo[0].height }}",
"rightValue": ""
}
]
},
"renameOutput": true
},
{
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "e948e774-03df-493b-bd1c-63241d678d56",
"operator": {
"type": "string",
"operation": "exists",
"singleValue": true
},
"leftValue": "={{ $json.message.document.mime_type }}",
"rightValue": ""
}
]
}
},
{
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "ee2205bd-5270-448a-8c63-8323bc7856ac",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "",
"rightValue": ""
}
]
}
}
]
},
"options": {}
},
"typeVersion": 3.2
},
{
"id": "a5d2b46c-9fa4-44e9-9784-1a236d679696",
"name": "Get a file1",
"type": "n8n-nodes-base.telegram",
"position": [
2224,
1072
],
"parameters": {
"fileId": "={{ $json.message.photo[0].file_id }}",
"resource": "file",
"additionalFields": {
"mimeType": ""
}
},
"credentials": {
"telegramApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
},
{
"id": "525bfeb1-9480-47a2-9be7-eb15749cf376",
"name": "Get a file2",
"type": "n8n-nodes-base.telegram",
"position": [
2640,
1456
],
"parameters": {
"fileId": "={{ $json.message.document.file_id }}",
"resource": "file",
"additionalFields": {}
},
"credentials": {
"telegramApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
},
{
"id": "9d341f5c-5cc7-47f3-85bb-44a8257a5504",
"name": "Append row in sheet",
"type": "n8n-nodes-base.googleSheets",
"position": [
4992,
1216
],
"parameters": {
"columns": {
"value": {
"Date ": "={{ $json.output.data.date }}",
"Category": "={{ $json.output.data.category }}",
"Discription ": "={{ $json.output.data.description }}",
"Amount in Naira": "={{ $json.output.data.amount }}",
"google drive image": "={{ $('Aggregate1').item.json.data[1].webViewLink }}"
},
"schema": [
{
"id": "Date ",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Date ",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Amount in Naira",
"type": "string",
"display": true,
"required": false,
"displayName": "Amount in Naira",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Discription ",
"type": "string",
"display": true,
"required": false,
"displayName": "Discription ",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Category",
"type": "string",
"display": true,
"required": false,
"displayName": "Category",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "google drive image",
"type": "string",
"display": true,
"required": false,
"displayName": "google drive image",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1XfL5d023PVUF-N7IQfIFhbrGuZ-EDjM0hJEqnLXxNws/edit#gid=0",
"cachedResultName": "Sheet1"
},
"documentId": {
"__rl": true,
"mode": "url",
"value": ""
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.7
},
{
"id": "fb639227-827f-49a8-b4fb-04ee8be9316f",
"name": "Send a text message",
"type": "n8n-nodes-base.telegram",
"position": [
5216,
1216
],
"parameters": {
"text": "={{ $('AI Agent').item.json.output.message }}",
"chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
"additionalFields": {
"appendAttribution": false
}
},
"credentials": {
"telegramApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
},
{
"id": "3fe82c55-c6de-4cf6-a2d5-89c82bdb1a30",
"name": "Code in JavaScript",
"type": "n8n-nodes-base.code",
"position": [
2640,
1072
],
"parameters": {
"jsCode": "// Access the binary data from the previous node\nconst binaryData = $input.first().binary?.data;\n\nif (!binaryData) {\n throw new Error(\"No binary data found\");\n}\n\n// binaryData.data is the Base64-encoded string of the image file\nconst base64Image = binaryData.data;\n\n// You can now use this base64Image string as needed,\n// for example, send it to another service or include it in JSON output\n\nreturn {\n json: {\n base64Image: base64Image,\n },\n binary: {\n data: binaryData, // optionally keep the binary data for next nodes\n }\n};"
},
"typeVersion": 2
},
{
"id": "0a7aee0f-b24c-4694-b954-72f22f495af4",
"name": "Get row(s) in sheet in Google Sheets",
"type": "n8n-nodes-base.googleSheetsTool",
"position": [
4656,
1440
],
"parameters": {
"options": {},
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1XfL5d023PVUF-N7IQfIFhbrGuZ-EDjM0hJEqnLXxNws/edit#gid=0",
"cachedResultName": "Sheet1"
},
"documentId": {
"__rl": true,
"mode": "id",
"value": "="
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.7
},
{
"id": "173e8433-b6a4-4cbc-8c39-9f428fbff9f9",
"name": "Upload file",
"type": "n8n-nodes-base.googleDrive",
"position": [
2864,
976
],
"parameters": {
"name": "={{ $json.result.file_unique_id }}",
"driveId": {
"__rl": true,
"mode": "list",
"value": "My Drive"
},
"options": {},
"folderId": {
"__rl": true,
"mode": "list",
"value": "1pwaId4osTGRoRKtubrtHkj6qE7t4eBv1",
"cachedResultUrl": "https://drive.google.com/drive/folders/1pwaId4osTGRoRKtubrtHkj6qE7t4eBv1",
"cachedResultName": "Monthly receipts "
}
},
"typeVersion": 3
},
{
"id": "12a33412-4c43-4081-b543-8b8eb4dc159d",
"name": "Upload file1",
"type": "n8n-nodes-base.googleDrive",
"position": [
2864,
1360
],
"parameters": {
"name": "={{ $('Get a file2').item.json.result.file_id }}",
"driveId": {
"__rl": true,
"mode": "list",
"value": "My Drive"
},
"options": {},
"folderId": {
"__rl": true,
"mode": "list",
"value": "1pwaId4osTGRoRKtubrtHkj6qE7t4eBv1",
"cachedResultUrl": "https://drive.google.com/drive/folders/1pwaId4osTGRoRKtubrtHkj6qE7t4eBv1",
"cachedResultName": "Monthly receipts "
}
},
"typeVersion": 3
},
{
"id": "d7f55735-bec7-4ea8-8537-ba9e2e9580d8",
"name": "Merge1",
"type": "n8n-nodes-base.merge",
"position": [
3088,
1456
],
"parameters": {},
"typeVersion": 3.2
},
{
"id": "458e8a34-3299-4b21-a7b6-2dd495f5044f",
"name": "Analyze an image",
"type": "@n8n/n8n-nodes-langchain.googleGemini",
"position": [
2864,
1168
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "models/gemini-2.5-flash-lite-preview-06-17",
"cachedResultName": "models/gemini-2.5-flash-lite-preview-06-17"
},
"options": {},
"resource": "image",
"inputType": "binary",
"operation": "analyze"
},
"typeVersion": 1
},
{
"id": "29e49d4d-621a-4786-b48f-62a39f2d9060",
"name": "Merge",
"type": "n8n-nodes-base.merge",
"position": [
3088,
1072
],
"parameters": {},
"typeVersion": 3.2
},
{
"id": "a0fb83c3-3415-40cf-b9f3-fe74fd6422b5",
"name": "If",
"type": "n8n-nodes-base.if",
"position": [
3312,
1264
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "09e5f9b6-3b82-4b79-8574-35eadb893e68",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "",
"rightValue": ""
}
]
}
},
"typeVersion": 2.2
},
{
"id": "75df2f47-e48b-45fb-91c5-1e6006da5ea9",
"name": "AI Agent1",
"type": "@n8n/n8n-nodes-langchain.agent",
"onError": "continueRegularOutput",
"position": [
2768,
-64
],
"parameters": {
"text": "={{ $json.message.text }}",
"options": {
"systemMessage": "=You are a helpful Telegram finance assistant that answers spending questions and provides financial advice. You have access to expense data and can perform calculations.\n\nHow to handle user queries:\n\nSpending Questions:\nWhen users ask about their expenses, analyze:\n- Time period (any month, year, or custom range)\n- Categories (if specified) \n- Calculation type (totals, percentages, averages, comparisons)\n\nUse available data and calculator for:\n- Total spending amounts\n- Category breakdowns and percentages\n- Monthly/quarterly/yearly comparisons\n- Spending trends and patterns\n- Average spending calculations\n\nProvide clear, detailed answers with specific numbers and helpful insights.\n\nFinancial Advice:\n- Offer practical tips for budgeting, saving, and money management\n- Explain financial concepts in simple terms\n- Provide supportive, non-judgmental guidance\n\nGeneral Responses:\n- Be friendly, concise, and helpful\n- If you can't answer something: \"I don't have enough data to answer that question yet.\"\n- Always respond in natural, conversational language\n\nExamples:\n- \"How much did I spend on food last month?\" \u2192 \"Last month you spent 15,400 NGN on food across 12 transactions.\"\n- \"What percentage of my spending was transportation?\" \u2192 \"Transportation made up 22% of your September spending, totaling 8,500 NGN.\"\n- \"Show me my top spending categories\" \u2192 \"Your top categories last month were: Food (35%), Transportation (22%), and Entertainment (15%).\"\n- \"Compare my spending this month vs last month\" \u2192 \"Your spending this month is 18% lower than last month. You saved the most on dining out and transportation.",
"passthroughBinaryImages": true
},
"promptType": "define"
},
"typeVersion": 2.2
},
{
"id": "936d3341-d3b9-4e16-b179-1166e6de0a58",
"name": "Simple Memory1",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
2768,
160
],
"parameters": {
"sessionKey": "=chatid",
"sessionIdType": "customKey",
"contextWindowLength": 10
},
"typeVersion": 1.3
},
{
"id": "79930277-57fc-40b4-9a99-1ffa4975b558",
"name": "Calculator1",
"type": "@n8n/n8n-nodes-langchain.toolCalculator",
"position": [
2896,
160
],
"parameters": {},
"typeVersion": 1
},
{
"id": "1319c5bd-57c1-4608-bc1b-f6a258aba613",
"name": "Send a text message1",
"type": "n8n-nodes-base.telegram",
"position": [
3232,
48
],
"parameters": {
"text": "={{ $json.output }}",
"chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
"additionalFields": {
"appendAttribution": false
}
},
"credentials": {
"telegramApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
},
{
"id": "389c6950-6986-4069-a2cf-7ab330b66cc1",
"name": "Get row(s) in sheet in Google Sheets1",
"type": "n8n-nodes-base.googleSheetsTool",
"position": [
3024,
160
],
"parameters": {
"options": {},
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1XfL5d023PVUF-N7IQfIFhbrGuZ-EDjM0hJEqnLXxNws/edit#gid=0",
"cachedResultName": "Sheet1"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1XfL5d023PVUF-N7IQfIFhbrGuZ-EDjM0hJEqnLXxNws",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1XfL5d023PVUF-N7IQfIFhbrGuZ-EDjM0hJEqnLXxNws/edit?usp=drivesdk",
"cachedResultName": "Monthly expensese"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.7
},
{
"id": "475cdf62-f8f8-4a3c-80ee-f316362c5ba1",
"name": "Google Gemini Chat Model1",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"position": [
2640,
160
],
"parameters": {
"options": {}
},
"typeVersion": 1
},
{
"id": "e79874c0-bd63-40e8-a657-24dcdddbc4e7",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
1392,
928
],
"parameters": {
"color": 6,
"width": 768,
"height": 592,
"content": "# Trigger/ start workflow\n\nThis is where the workflow begins with a telegram node\n\nthen a switch node that would determine if the input form telegram is an image, text or pdf "
},
"typeVersion": 1
},
{
"id": "794d37c8-f403-4386-b922-2acc0fa3f288",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
2480,
736
],
"parameters": {
"color": 3,
"width": 1184,
"height": 1056,
"content": "# Sorting, extracting and OCR\n\n_Here images are OCRed with Gemini model or any model of your choice \n_ PDF are extracted with the extract with the native extract form PDF node\n_ Everything is aggregated with an aggregator node which is then passed to an LLM \n\n\n"
},
"typeVersion": 1
},
{
"id": "fa5a7d4c-e61f-48b9-85fb-1eddb9ddec7b",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
2608,
-256
],
"parameters": {
"color": 4,
"width": 880,
"height": 656,
"content": "# Process text Enquires \n\nThis section processes financial questions, advice and information about financial spend, the Gemini model has access to your excel sheet, a simple memory and calculator to aid with all the enquires it gets."
},
"typeVersion": 1
},
{
"id": "9cac23c2-a32e-491d-ba93-fdb7a34c615a",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
4224,
1040
],
"parameters": {
"color": 4,
"width": 1280,
"height": 672,
"content": "# Invoice Processing\n The agent processes the information form the invoice and then appends to your excel sheet"
},
"typeVersion": 1
},
{
"id": "31d1a7dc-3663-42b0-a888-6b0efb03895f",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
368,
240
],
"parameters": {
"width": 688,
"height": 992,
"content": "# Personal Finance Telegram Bot: Automated Receipt Tracking & Expense Queries\n\nThis workflow turns your Telegram bot into a smart personal finance assistant. Send receipt photos/PDFs or text, and AI (Google Gemini) extracts date, amount (in NGN), description, and category \u2014 then logs it to Google Sheets with the image uploaded to Google Drive.\n\nAsk natural language questions like \"How much did I spend last month?\" or \"Total on food this month?\" and get AI-powered summaries, breakdowns, and insights using your logged data.\n\nPerfect for effortless expense tracking without manual entry!\n\n## How it works\n- Telegram Trigger detects incoming messages/photos/documents.\n- Switch routes: images/PDFs \u2192 OCR/analysis/upload \u2192 AI parsing \u2192 log to Sheets.\n- Text queries \u2192 AI agent queries Sheets data + calculator for answers.\n- Confirmation/summary replies sent back to Telegram.\n\n## Setup steps\n1. Connect credentials: Telegram API, Google Sheets (OAuth2), Google Drive, Google Gemini API.\n2. Update Google Sheets node with your spreadsheet ID (pre-filled, but verify).\n3. Update Google Drive upload nodes with your folder ID for receipts.\n4. Activate the workflow and send a test message/receipt to your bot.\n\nLive Google Sheet (Template)\nYou can make a copy of the exact sheet the bot uses:\nhttps://docs.google.com/spreadsheets/d/1kwWJquPpwL9vt9U06a4f4phXq5jZjaGazvh2V69FGoc/edit?usp=sharing\n\nJust click File \u2192 Make a copy and use your copy\u2019s ID in the workflow.\n\n## Customization tips\n- Edit AI Agent prompts to add/remove categories or refine parsing.\n- Adjust memory window or add more tools for advanced queries."
},
"typeVersion": 1
}
],
"active": false,
"settings": {
"availableInMCP": false,
"executionOrder": "v1"
},
"versionId": "41e6aa4f-29be-40b5-b621-320fb3f9226f",
"connections": {
"If": {
"main": [
[
{
"node": "Aggregate1",
"type": "main",
"index": 0
}
],
[
{
"node": "Aggregate1",
"type": "main",
"index": 0
}
]
]
},
"Merge": {
"main": [
[
{
"node": "If",
"type": "main",
"index": 0
}
]
]
},
"Merge1": {
"main": [
[
{
"node": "If",
"type": "main",
"index": 0
}
]
]
},
"Switch": {
"main": [
[
{
"node": "Get a file1",
"type": "main",
"index": 0
}
],
[
{
"node": "Get a file2",
"type": "main",
"index": 0
}
],
[
{
"node": "AI Agent1",
"type": "main",
"index": 0
}
]
]
},
"AI Agent": {
"main": [
[
{
"node": "Append row in sheet",
"type": "main",
"index": 0
}
]
]
},
"AI Agent1": {
"main": [
[
{
"node": "Send a text message1",
"type": "main",
"index": 0
}
]
]
},
"Aggregate1": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
},
"Calculator": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Calculator1": {
"ai_tool": [
[
{
"node": "AI Agent1",
"type": "ai_tool",
"index": 0
}
]
]
},
"Get a file1": {
"main": [
[
{
"node": "Code in JavaScript",
"type": "main",
"index": 0
}
]
]
},
"Get a file2": {
"main": [
[
{
"node": "Upload file1",
"type": "main",
"index": 0
},
{
"node": "Extract from File",
"type": "main",
"index": 0
}
]
]
},
"Upload file": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 0
}
]
]
},
"Upload file1": {
"main": [
[
{
"node": "Merge1",
"type": "main",
"index": 1
}
]
]
},
"Simple Memory": {
"ai_memory": [
[
{
"node": "AI Agent",
"type": "ai_memory",
"index": 0
}
]
]
},
"Simple Memory1": {
"ai_memory": [
[
{
"node": "AI Agent1",
"type": "ai_memory",
"index": 0
}
]
]
},
"Analyze an image": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 1
}
]
]
},
"Telegram Trigger": {
"main": [
[
{
"node": "Switch",
"type": "main",
"index": 0
}
]
]
},
"Extract from File": {
"main": [
[
{
"node": "Merge1",
"type": "main",
"index": 0
}
]
]
},
"Code in JavaScript": {
"main": [
[
{
"node": "Upload file",
"type": "main",
"index": 0
},
{
"node": "Analyze an image",
"type": "main",
"index": 0
}
]
]
},
"Append row in sheet": {
"main": [
[
{
"node": "Send a text message",
"type": "main",
"index": 0
}
]
]
},
"Send a text message": {
"main": [
[]
]
},
"Send a text message1": {
"main": [
[]
]
},
"Google Gemini Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Structured Output Parser": {
"ai_outputParser": [
[
{
"node": "AI Agent",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"Google Gemini Chat Model1": {
"ai_languageModel": [
[
{
"node": "AI Agent1",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Get row(s) in sheet in Google Sheets": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Get row(s) in sheet in Google Sheets1": {
"ai_tool": [
[
{
"node": "AI Agent1",
"type": "ai_tool",
"index": 0
}
]
]
}
}
}
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
googleSheetsOAuth2ApitelegramApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
A fully automated Telegram-based personal finance tracker that: Accepts receipts as images, PDFs, or plain text Uses Google Gemini Vision for OCR & intelligent extraction Logs every expense into Google Sheets Stores receipt images/PDFs in Google Drive Answers natural-language…
Source: https://n8n.io/workflows/10871/ — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
Generate AI viral videos with NanoBanana & VEO3, shared on socials via Blotato 2. Uses @blotato/n8n-nodes-blotato, googleSheets, lmChatOpenAi, toolThink. Event-driven trigger; 94 nodes.
This project is a template for building a complete academic virtual assistant using n8n. It connects to Telegram, answers frequently asked questions by querying MongoDB, keeps the community informed a
Telegram Trigger receives incoming messages (text, voice, photo, document). Switch routes by message type to appropriate processors: Text → forwarded as-is. Voice → downloaded and sent to Transcribe a
Transform your Telegram messenger into a powerful, multi-modal personal or team assistant. This n8n workflow creates an intelligent agent that can understand text, voice, images, and documents, and ta
A comprehensive n8n workflow demonstrating advanced AI agent orchestration, stateful conversation management, and multi-modal input processing for nutrition tracking applications.