Tesseract - Assistant financier X
Ceci est unFinance, AIworkflow d'automatisation du domainecontenant 27 nœuds.Utilise principalement des nœuds comme If, Set, Code, Telegram, HttpRequest, combinant la technologie d'intelligence artificielle pour une automatisation intelligente. viaTelegramutilisationTesseractetLlamade收据中extraction详细信息
- •Token Bot Telegram
- •Peut nécessiter les informations d'identification d'authentification de l'API cible
Nœuds utilisés (27)
Catégorie
{
"id": "V2s5idMq9qNtiMP9",
"meta": {
"instanceId": "c2650793f644091dc80fb900fe63448ad1f4b774008de9608064d67294f8307c",
"templateCredsSetupCompleted": true
},
"name": "Tesseract - Money MateX",
"tags": [],
"nodes": [
{
"id": "42a12e32-36e3-40c1-9f33-9947c0e263a1",
"name": "Formater le message récapitulatif",
"type": "n8n-nodes-base.code",
"position": [
120,
200
],
"parameters": {
"jsCode": "// Get input data from Parser node\nconst inputData = $input.all()[0].json.output || {};\n\n// Default values if data is incomplete\nconst store = inputData.store || { store_name: 'not available', store_location: 'not available' };\nconst transaction = inputData.transaction || { date: 'not available', time: 'not available' };\nconst items = inputData.items || [];\nconst summary = inputData.summary || { total: 'not available', payment_method: 'not available', expense_category: 'not available' };\n\n// Create message with available information\nlet message = '';\n\nif (store.store_name !== 'not available') {\n message += `📋 Store: ${store.store_name}\\n`;\n}\nif (store.store_location !== 'not available') {\n message += `📍 Location: ${store.store_location}\\n`;\n}\nif (transaction.date !== 'not available' || transaction.time !== 'not available') {\n message += `📅 Date: ${transaction.date} ${transaction.time}\\n`;\n}\n\nif (items.length > 0) {\n message += `\\n🛒 Items:\\n`;\n items.forEach(item => {\n message += `- ${item.description || 'not available'}: ${item.total_price || 'not available'}\\n`;\n });\n}\n\nif (summary.total !== 'not available') {\n if (parseFloat(summary.total) === 0) {\n message = 'Looks like an input error, total is 0? Did you get this for free? Please check again.';\n } else {\n message += `\\n💸 Total: Rp ${summary.total}\\n`;\n }\n}\n\nif (summary.expense_category !== 'not available' && parseFloat(summary.total) !== 0) {\n message += `📌 Category: ${summary.expense_category}\\n`;\n}\n\n// Default message if no information is available\nif (!message) {\n message = 'No information available from the input.';\n}\n\n// Return message as output\nreturn [\n {\n json: {\n message: message\n }\n }\n];"
},
"typeVersion": 2
},
{
"id": "4078e97c-debf-4216-8c18-c9e1d8b76fd5",
"name": "Obtenir le fichier Telegram",
"type": "n8n-nodes-base.httpRequest",
"position": [
-600,
-180
],
"parameters": {
"url": "=https://api.telegram.org/bot<your_bot_token_here>/getFile?file_id={{ $json.message.photo[3].file_id }}",
"options": {}
},
"typeVersion": 4.2
},
{
"id": "819b724d-7ab5-4a59-b3d0-52a77013c311",
"name": "Télécharger l'image",
"type": "n8n-nodes-base.httpRequest",
"position": [
-300,
-180
],
"parameters": {
"url": "=https://api.telegram.org/file/bot<your_bot_token_here>/{{ $node['Get Telegram File'].json['result']['file_path'] }}",
"options": {
"response": {
"response": {
"responseFormat": "file"
}
}
}
},
"typeVersion": 4.2
},
{
"id": "9e7d33c8-42d1-4870-8626-087aae8375c6",
"name": "Déclencheur Telegram",
"type": "n8n-nodes-base.telegramTrigger",
"position": [
-1280,
0
],
"webhookId": "56161a53-5b4d-46fb-9a9b-d65cdd9a7070",
"parameters": {
"updates": [
"message"
],
"additionalFields": {}
},
"credentials": {
"telegramApi": {
"id": "UAvyFVvuZ3qtAjBR",
"name": "motun8nmoney"
}
},
"typeVersion": 1.2
},
{
"id": "094293ee-dcdc-4a19-b33a-5361e12177db",
"name": "Sticky - Déclencheur Telegram",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1280,
-140
],
"parameters": {
"color": null,
"width": 260,
"height": 180,
"content": "## 📲 **Telegram Trigger**\nReceives user messages (text or photo) from Telegram to start the expense tracking flow."
},
"typeVersion": 1
},
{
"id": "49a51aa2-0a1c-417e-868e-d6a5f9284846",
"name": "Catégoriseur IA",
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"position": [
-200,
200
],
"parameters": {
"text": "={{ $json.text }}",
"messages": {
"messageValues": [
{
"message": "=You are a financial planner expert with a robust parser algorithm. Category options are:\n- Income\n- Expense\n\nExpense options are:\n- Food & Beverages\n- Household\n- Transport\n\nInput may be in English, or Bahasa Indonesia. Always generate output in Input Language.\n\nAnalyze the input. If no expenses or income detected, return 'not found' and 0 for the total. If date is not specified, use {{ $('Telegram Trigger').item.json.message.date}}. For relative dates (e.g., yesterday, tomorrow), use {{ $('Telegram Trigger').item.json.message.date}} as the base. Example: yesterday is {{ $('Telegram Trigger').item.json.message.date}} - 1."
}
]
},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 1.6
},
{
"id": "15feb90d-e82f-4c45-8785-2fa9a26e98b7",
"name": "Vérifier l'entrée invalide",
"type": "n8n-nodes-base.if",
"position": [
380,
200
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "b8408eb5-502b-48bf-b85d-3cea897f60b9",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.message }}",
"rightValue": "Looks like an input error, total is 0? Did you get this for free? Please check again."
}
]
}
},
"typeVersion": 2.2
},
{
"id": "cc4cf545-6ef9-455b-a5b6-9876bc2e3866",
"name": "Extraire le texte de l'entrée",
"type": "n8n-nodes-base.set",
"position": [
-600,
200
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "aa52b49e-1087-4623-83cb-905500c36d3c",
"name": "message",
"type": "string",
"value": "={{ $json.message.text }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "b6dc7831-994c-4539-a456-cbfde3c009a8",
"name": "Vérifier la présence d'une image",
"type": "n8n-nodes-base.if",
"position": [
-980,
0
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "loose"
},
"combinator": "and",
"conditions": [
{
"id": "c5999c0e-853d-45e6-bec6-f446defe909d",
"operator": {
"type": "string",
"operation": "exists",
"singleValue": true
},
"leftValue": "={{ $json.message.photo }}",
"rightValue": "="
}
]
},
"looseTypeValidation": true
},
"typeVersion": 2.2
},
{
"id": "ea0c351f-8cae-4252-a3b9-34a1d03d3ef2",
"name": "Sticky - Vérifier la présence d'une image",
"type": "n8n-nodes-base.stickyNote",
"position": [
-980,
-140
],
"parameters": {
"color": null,
"height": 180,
"content": "## 🔍 **Check for Image**\nDetermines whether the input is an image or text to route accordingly."
},
"typeVersion": 1
},
{
"id": "0e3d255e-69e7-4b78-82c4-1077a3ea91f4",
"name": "Analyseur de reçu",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
-40,
380
],
"parameters": {
"jsonSchemaExample": "{\n \"store\": {\n \"store_name\": \"Store A\",\n \"store_location\": \"Store location\"\n },\n \"transaction\": {\n \"date\": \"Transaction date\",\n \"time\": \"Transaction time\",\n \"receipt_number\": \"Receipt number\"\n },\n \"items\": [\n {\n \"description\": \"Item name\",\n \"quantity\": \"Quantity\",\n \"unit_price\": \"Unit price\",\n \"total_price\": \"Item total price\"\n }\n ],\n \"summary\": {\n \"total\": \"Total (number)\",\n \"payment_method\": \"Payment method\",\n \"expense_category\": \"Household\"\n }\n}"
},
"typeVersion": 1.2
},
{
"id": "675093cf-68b1-47b1-a2c5-aeda2e1b5360",
"name": "Analyseur IA",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
"position": [
-200,
380
],
"parameters": {
"options": {}
},
"credentials": {
"openRouterApi": {
"id": "DPrHlBN0s5WFDxi9",
"name": "OpenRouter account"
}
},
"typeVersion": 1
},
{
"id": "ffed21ef-2aed-4d63-b17e-df83bd4e6c9d",
"name": "Envoyer le message d'erreur",
"type": "n8n-nodes-base.telegram",
"position": [
700,
180
],
"webhookId": "6c7df749-2bb0-4dff-95f8-8980325158e1",
"parameters": {
"text": "=hello {{ $('Telegram Trigger').item.json.message.from.first_name }}\n\n{{ $json.message }}",
"chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
"additionalFields": {}
},
"credentials": {
"telegramApi": {
"id": "UAvyFVvuZ3qtAjBR",
"name": "motun8nmoney"
}
},
"typeVersion": 1.2
},
{
"id": "af0f7caa-f746-4eb3-bf57-4c345e448c23",
"name": "Envoyer le récapitulatif des dépenses",
"type": "n8n-nodes-base.telegram",
"position": [
700,
460
],
"webhookId": "f7a56f02-1aa8-4caa-9ccb-e4006a98db69",
"parameters": {
"text": "=hello {{ $('Telegram Trigger').item.json.message.from.first_name }}\n\nIni Rekap Belanjamu\n{{ $json.message }}",
"chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
"additionalFields": {}
},
"credentials": {
"telegramApi": {
"id": "UAvyFVvuZ3qtAjBR",
"name": "motun8nmoney"
}
},
"typeVersion": 1.2
},
{
"id": "9ebee364-9df5-4e05-acee-dad2e3f02d07",
"name": "Sticky - Analyser les données du reçu1",
"type": "n8n-nodes-base.stickyNote",
"position": [
680,
-300
],
"parameters": {
"color": 4,
"width": 360,
"height": 200,
"content": "## **MoneyMate is free to use!**\nGot feedback, ideas, or just wanna chat? Find me at [khmuhtadin.com](https://khmuhtadin.com). \n\nWanna buy me a coffee to fuel more workflows? Head to [buymeacoffee.com/khmuhtadin](https://buymeacoffee.com/khmuhtadin)! ☕"
},
"typeVersion": 1
},
{
"id": "13a31b33-3ccc-4680-a2c6-cd8255a827e0",
"name": "Extraire la valeur de l'image",
"type": "n8n-nodes-tesseractjs.tesseractNode",
"position": [
20,
-180
],
"parameters": {
"options": {}
},
"typeVersion": 1
},
{
"id": "297c9837-890b-42a2-9234-3d808ada6850",
"name": "Sticky - Envoyer le récapitulatif des dépenses1",
"type": "n8n-nodes-base.stickyNote",
"position": [
700,
360
],
"parameters": {
"color": null,
"width": 340,
"content": "## 📬 **Send Expense Summary**\nSends a summary of the recognized receipt or input to the user's Telegram chat."
},
"typeVersion": 1
},
{
"id": "32f7368a-cac0-4b4e-b944-9a3453a78118",
"name": "Sticky - Extraire le texte de l'entrée1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-600,
100
],
"parameters": {
"color": null,
"width": 260,
"content": "## 📝 **Extract Text Input**\nHandles plain text inputs when no image is provided by the user."
},
"typeVersion": 1
},
{
"id": "c7c9d1cd-368b-4374-9533-e3e76fb48c08",
"name": "Sticky - Analyser les données du reçu2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-60,
500
],
"parameters": {
"color": null,
"width": 300,
"content": "## 📊 **Parse Receipt Data**\nConverts AI output into structured JSON with store, transaction, items, and totals."
},
"typeVersion": 1
},
{
"id": "4b3b0887-e3a7-4365-a41b-6773d2009d71",
"name": "Sticky - Obtenir le fichier Telegram1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-600,
-280
],
"parameters": {
"color": null,
"width": 260,
"content": "## 📦 **Get Telegram File**\nFetches the file ID of a receipt image uploaded via Telegram."
},
"typeVersion": 1
},
{
"id": "b1edb77f-6425-47f3-ba63-ed1b00dd6219",
"name": "Sticky - Télécharger l'image2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-300,
-280
],
"parameters": {
"color": null,
"width": 260,
"content": "## ⬇️ **Download Image**\nDownloads the receipt photo and prepares it for text extraction."
},
"typeVersion": 1
},
{
"id": "d7437f5c-276d-46b5-956b-72d89809ebc9",
"name": "Sticky - Télécharger l'image3",
"type": "n8n-nodes-base.stickyNote",
"position": [
0,
-280
],
"parameters": {
"color": null,
"width": 260,
"content": "## 🖼️ **Text Extractor**\nExtract text from given image "
},
"typeVersion": 1
},
{
"id": "a381a022-9675-4e22-8bb5-b27992cfc3b8",
"name": "Sticky - Formater le message récapitulatif1",
"type": "n8n-nodes-base.stickyNote",
"position": [
100,
80
],
"parameters": {
"color": null,
"width": 260,
"content": "## 🧾 **Format Message**\nCreates a clear summary of expenses with store, date, items, total, and category."
},
"typeVersion": 1
},
{
"id": "5234e9fe-0202-460a-8a26-4dbf64ef3141",
"name": "Sticky - Catégoriseur IA1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-200,
80
],
"parameters": {
"color": null,
"width": 280,
"content": "## 🧠 **AI Categorizer**\nUses AI to classify input into categories like income or expenses, handling dates and languages."
},
"typeVersion": 1
},
{
"id": "1a7c3a49-a08c-4260-a393-04803a96aa02",
"name": "Sticky - Envoyer le message d'erreur1",
"type": "n8n-nodes-base.stickyNote",
"position": [
700,
80
],
"parameters": {
"color": null,
"width": 340,
"content": "## ❗ **Send Error Message**\nSends a warning to the user if the input is invalid or incomplete."
},
"typeVersion": 1
},
{
"id": "912961cb-4ce1-41ea-9007-876ad3478a09",
"name": "Sticky - Vérifier l'entrée invalide1",
"type": "n8n-nodes-base.stickyNote",
"position": [
380,
80
],
"parameters": {
"color": null,
"width": 280,
"content": "## 🚫 **Check Invalid Input**\nDetects and flags incorrect or zero-value entries before sending a response."
},
"typeVersion": 1
},
{
"id": "56dfbcb7-b04c-41ba-b1e8-c7ad273a8bb4",
"name": "Sticky - Modèle IA OpenRouter1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-400,
500
],
"parameters": {
"color": null,
"width": 300,
"content": "## 🤖 **OpenRouter AI Model**\nConfigures the language model to extract structured information from natural language input."
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "3c1c7a80-0901-4dcb-a8ce-caa9331ca8c3",
"connections": {
"675093cf-68b1-47b1-a2c5-aeda2e1b5360": {
"ai_languageModel": [
[
{
"node": "49a51aa2-0a1c-417e-868e-d6a5f9284846",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"49a51aa2-0a1c-417e-868e-d6a5f9284846": {
"main": [
[
{
"node": "42a12e32-36e3-40c1-9f33-9947c0e263a1",
"type": "main",
"index": 0
}
]
]
},
"819b724d-7ab5-4a59-b3d0-52a77013c311": {
"main": [
[
{
"node": "13a31b33-3ccc-4680-a2c6-cd8255a827e0",
"type": "main",
"index": 0
}
]
]
},
"0e3d255e-69e7-4b78-82c4-1077a3ea91f4": {
"ai_outputParser": [
[
{
"node": "49a51aa2-0a1c-417e-868e-d6a5f9284846",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"b6dc7831-994c-4539-a456-cbfde3c009a8": {
"main": [
[
{
"node": "4078e97c-debf-4216-8c18-c9e1d8b76fd5",
"type": "main",
"index": 0
}
],
[
{
"node": "cc4cf545-6ef9-455b-a5b6-9876bc2e3866",
"type": "main",
"index": 0
}
]
]
},
"9e7d33c8-42d1-4870-8626-087aae8375c6": {
"main": [
[
{
"node": "b6dc7831-994c-4539-a456-cbfde3c009a8",
"type": "main",
"index": 0
}
]
]
},
"4078e97c-debf-4216-8c18-c9e1d8b76fd5": {
"main": [
[
{
"node": "819b724d-7ab5-4a59-b3d0-52a77013c311",
"type": "main",
"index": 0
}
]
]
},
"cc4cf545-6ef9-455b-a5b6-9876bc2e3866": {
"main": [
[
{
"node": "49a51aa2-0a1c-417e-868e-d6a5f9284846",
"type": "main",
"index": 0
}
]
]
},
"15feb90d-e82f-4c45-8785-2fa9a26e98b7": {
"main": [
[
{
"node": "ffed21ef-2aed-4d63-b17e-df83bd4e6c9d",
"type": "main",
"index": 0
}
],
[
{
"node": "af0f7caa-f746-4eb3-bf57-4c345e448c23",
"type": "main",
"index": 0
}
]
]
},
"42a12e32-36e3-40c1-9f33-9947c0e263a1": {
"main": [
[
{
"node": "15feb90d-e82f-4c45-8785-2fa9a26e98b7",
"type": "main",
"index": 0
}
]
]
},
"13a31b33-3ccc-4680-a2c6-cd8255a827e0": {
"main": [
[
{
"node": "49a51aa2-0a1c-417e-868e-d6a5f9284846",
"type": "main",
"index": 0
}
]
]
}
}
}Comment utiliser ce workflow ?
Copiez le code de configuration JSON ci-dessus, créez un nouveau workflow dans votre instance n8n et sélectionnez "Importer depuis le JSON", collez la configuration et modifiez les paramètres d'authentification selon vos besoins.
Dans quelles scénarios ce workflow est-il adapté ?
Avancé - Finance, Intelligence Artificielle
Est-ce payant ?
Ce workflow est entièrement gratuit et peut être utilisé directement. Veuillez noter que les services tiers utilisés dans le workflow (comme l'API OpenAI) peuvent nécessiter un paiement de votre part.
Workflows recommandés
Khairul Muhtadin
@khmuhtadinPartager ce workflow