This workflow follows the Agent → Gmail 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 →
{
"name": "Arvifund - Supabase (Fixed v2)",
"active": true,
"isArchived": false,
"activeVersionId": "9fd6abf8-83ed-4836-960b-8d4f60867ca5",
"triggerCount": 4,
"createdAt": "2026-05-27T04:56:19.164Z",
"updatedAt": "2026-05-27T05:17:46.896Z",
"settings": {
"executionOrder": "v1",
"binaryMode": "separate",
"timeSavedMode": "fixed",
"callerPolicy": "workflowsFromSameOwner",
"availableInMCP": true
},
"connections": {
"Switch": {
"main": [
[
{
"node": "Get File Path",
"type": "main",
"index": 0
}
],
[
{
"node": "HTTP Request",
"type": "main",
"index": 0
}
],
[
{
"node": "Telegram7",
"type": "main",
"index": 0
}
],
[
{
"node": "Telegram5",
"type": "main",
"index": 0
}
],
[
{
"node": "Build Report Hari Ini",
"type": "main",
"index": 0
}
],
[
{
"node": "Parse Command",
"type": "main",
"index": 0
}
],
[
{
"node": "Edit Fields",
"type": "main",
"index": 0
}
],
[
{
"node": "Get a file",
"type": "main",
"index": 0
}
]
]
},
"Analisa gambar": {
"main": [
[
{
"node": "If",
"type": "main",
"index": 0
}
]
]
},
"If": {
"main": [
[
{
"node": "Respon error",
"type": "main",
"index": 0
}
],
[
{
"node": "Google Sheets",
"type": "main",
"index": 0
}
]
]
},
"Google Sheets": {
"main": [
[
{
"node": "Telegram1",
"type": "main",
"index": 0
}
]
]
},
"Edit Fields": {
"main": [
[
{
"node": "AI INPUT DATA TEXT",
"type": "main",
"index": 0
}
]
]
},
"If2": {
"main": [
[
{
"node": "Tarik Tunai",
"type": "main",
"index": 0
}
],
[
{
"node": "Expenses",
"type": "main",
"index": 0
}
]
]
},
"Telegram Trigger": {
"main": [
[
{
"node": "Wait",
"type": "main",
"index": 0
}
]
]
},
"Switch1": {
"main": [
[
{
"node": "If2",
"type": "main",
"index": 0
}
],
[
{
"node": "Income",
"type": "main",
"index": 0
}
],
[
{
"node": "Telegram8",
"type": "main",
"index": 0
}
]
]
},
"Tarik Tunai": {
"main": [
[
{
"node": "Telegram",
"type": "main",
"index": 0
}
]
]
},
"Expenses": {
"main": [
[
{
"node": "Telegram3",
"type": "main",
"index": 0
}
]
]
},
"Income": {
"main": [
[
{
"node": "Telegram6",
"type": "main",
"index": 0
}
]
]
},
"HTTP Request": {
"main": [
[
{
"node": "AI Agent1",
"type": "main",
"index": 0
}
]
]
},
"AI Agent1": {
"main": [
[
{
"node": "Telegram4",
"type": "main",
"index": 0
}
]
]
},
"Get a file": {
"main": [
[
{
"node": "Transcribe a recording",
"type": "main",
"index": 0
}
]
]
},
"Transcribe a recording": {
"main": [
[
{
"node": "Edit Fields1",
"type": "main",
"index": 0
}
]
]
},
"Google Gemini Chat Model2": {
"ai_languageModel": [
[
{
"node": "AI INPUT VOICE NOTE",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Edit Fields1": {
"main": [
[
{
"node": "AI INPUT VOICE NOTE",
"type": "main",
"index": 0
}
]
]
},
"Simple Memory": {
"ai_memory": [
[
{
"node": "AI Agent1",
"type": "ai_memory",
"index": 0
}
]
]
},
"Simple Memory1": {
"ai_memory": [
[
{
"node": "AI INPUT DATA TEXT",
"type": "ai_memory",
"index": 0
}
]
]
},
"Simple Memory2": {
"ai_memory": [
[
{
"node": "AI INPUT VOICE NOTE",
"type": "ai_memory",
"index": 0
}
]
]
},
"OpenRouter Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Agent1",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"OpenRouter Chat Model1": {
"ai_languageModel": [
[
{
"node": "AI INPUT DATA TEXT",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"AI INPUT DATA TEXT": {
"main": [
[
{
"node": "Switch1",
"type": "main",
"index": 0
}
]
]
},
"AI INPUT VOICE NOTE": {
"main": [
[
{
"node": "Switch1",
"type": "main",
"index": 0
}
]
]
},
"Cek Ada Data": {
"main": [
[
{
"node": "Agregasi dan Render HTML",
"type": "main",
"index": 0
}
],
[
{
"node": "Kirim Error No Data",
"type": "main",
"index": 0
}
]
]
},
"Cek PDF Berhasil": {
"main": [
[
{
"node": "Ubah nama dokumen",
"type": "main",
"index": 0
}
],
[
{
"node": "Kirim Error PDF",
"type": "main",
"index": 0
}
]
]
},
"HTML to PDF": {
"main": [
[
{
"node": "Cek PDF Berhasil",
"type": "main",
"index": 0
}
]
]
},
"Agregasi dan Render HTML": {
"main": [
[
{
"node": "HTML to PDF",
"type": "main",
"index": 0
}
]
]
},
"Merge Data": {
"main": [
[
{
"node": "Cek Ada Data",
"type": "main",
"index": 0
}
]
]
},
"Read Income": {
"main": [
[
{
"node": "Merge Data",
"type": "main",
"index": 1
}
]
]
},
"Read Expenses": {
"main": [
[
{
"node": "Merge Data",
"type": "main",
"index": 0
}
]
]
},
"Telegram Processing": {
"main": [
[
{
"node": "Read Income",
"type": "main",
"index": 0
},
{
"node": "Read Expenses",
"type": "main",
"index": 0
},
{
"node": "Merge Data",
"type": "main",
"index": 2
}
]
]
},
"Parse Command": {
"main": [
[
{
"node": "Edit Fields2",
"type": "main",
"index": 0
}
]
]
},
"Send a message": {
"main": [
[
{
"node": "Kirim PDF ke Telegram",
"type": "main",
"index": 0
}
]
]
},
"Edit Fields2": {
"main": [
[
{
"node": "Merge Data1",
"type": "main",
"index": 0
}
]
]
},
"Ubah nama dokumen": {
"main": [
[
{
"node": "Send a message",
"type": "main",
"index": 0
}
]
]
},
"Parse Command (Webhook)": {
"main": [
[
{
"node": "Edit Fields (Webhook)",
"type": "main",
"index": 0
}
]
]
},
"Edit Fields (Webhook)": {
"main": [
[
{
"node": "Merge Data1",
"type": "main",
"index": 1
}
]
]
},
"Merge Data1": {
"main": [
[
{
"node": "Edit Fields (Webhook)1",
"type": "main",
"index": 0
}
]
]
},
"Edit Fields (Webhook)1": {
"main": [
[
{
"node": "Telegram Processing",
"type": "main",
"index": 0
}
]
]
},
"Webhook": {
"main": [
[
{
"node": "Wait1",
"type": "main",
"index": 0
}
]
]
},
"Wait": {
"main": [
[
{
"node": "Switch",
"type": "main",
"index": 0
}
]
]
},
"Wait1": {
"main": [
[
{
"node": "Parse Command (Webhook)",
"type": "main",
"index": 0
}
]
]
},
"Get File Path": {
"main": [
[
{
"node": "Download File",
"type": "main",
"index": 0
}
]
]
},
"Download File": {
"main": [
[
{
"node": "Code in JavaScript",
"type": "main",
"index": 0
}
]
]
},
"Code in JavaScript": {
"main": [
[
{
"node": "Analisa gambar",
"type": "main",
"index": 0
}
]
]
},
"Wait2": {
"main": [
[
{
"node": "Get Config Sheet",
"type": "main",
"index": 0
}
]
]
},
"Webhook1": {
"main": [
[
{
"node": "Wait2",
"type": "main",
"index": 0
}
]
]
},
"Get Config Sheet": {
"main": [
[
{
"node": "Filter by Username",
"type": "main",
"index": 0
}
]
]
},
"Filter by Username": {
"main": [
[
{
"node": "User Ditemukan?",
"type": "main",
"index": 0
}
]
]
},
"User Ditemukan?": {
"main": [
[
{
"node": "Kirim Reset Password",
"type": "main",
"index": 0
}
],
[
{
"node": "Response Not Found",
"type": "main",
"index": 0
}
]
]
},
"Kirim via Telegram": {
"main": [
[
{
"node": "Response OK",
"type": "main",
"index": 0
},
{
"node": "Response Error",
"type": "main",
"index": 0
}
]
]
},
"Response Error": {
"main": [
[
{
"node": "Response Error",
"type": "main",
"index": 0
}
]
]
},
"Build Report Hari Ini": {
"main": [
[
{
"node": "HTTP Request Hari Ini",
"type": "main",
"index": 0
}
]
]
},
"HTTP Request Hari Ini": {
"main": [
[
{
"node": "Format Laporan Hari Ini",
"type": "main",
"index": 0
}
]
]
},
"Format Laporan Hari Ini": {
"main": [
[
{
"node": "Kirim Laporan Hari Ini",
"type": "main",
"index": 0
}
]
]
},
"Cron Backup Periode": {
"main": [
[
{
"node": "Cek Akhir Periode",
"type": "main",
"index": 0
}
]
]
},
"Cek Akhir Periode": {
"main": [
[
{
"node": "Apakah Akhir Periode?",
"type": "main",
"index": 0
}
]
]
},
"Apakah Akhir Periode?": {
"main": [
[
{
"node": "Fetch Data Periode",
"type": "main",
"index": 0
}
]
]
},
"Fetch Data Periode": {
"main": [
[
{
"node": "Build Excel Backup",
"type": "main",
"index": 0
}
]
]
},
"Build Excel Backup": {
"main": [
[
{
"node": "Cari Folder Tahun",
"type": "main",
"index": 0
}
]
]
},
"Cari Folder Tahun": {
"main": [
[
{
"node": "Folder Tahun Ada?",
"type": "main",
"index": 0
}
]
]
},
"Folder Tahun Ada?": {
"main": [
[
{
"node": "Merge Folder ID",
"type": "main",
"index": 0
}
],
[
{
"node": "Buat Folder Tahun",
"type": "main",
"index": 0
}
]
]
},
"Buat Folder Tahun": {
"main": [
[
{
"node": "Merge Folder ID",
"type": "main",
"index": 1
}
]
]
},
"Merge Folder ID": {
"main": [
[
{
"node": "Upload Excel ke GDrive",
"type": "main",
"index": 0
}
]
]
},
"Upload Excel ke GDrive": {
"main": [
[
{
"node": "Notif Backup Berhasil",
"type": "main",
"index": 0
}
]
]
},
"Kirim Reset Password": {
"main": [
[
{
"node": "Kirim via Telegram",
"type": "main",
"index": 0
}
]
]
}
},
"nodes": [
{
"parameters": {
"rules": {
"values": [
{
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "ad99e257-bcaf-42a2-b068-53e0c96729db",
"leftValue": "={{ $json.message.photo[2] }}",
"rightValue": "",
"operator": {
"type": "object",
"operation": "exists",
"singleValue": true
}
}
],
"combinator": "and"
}
},
{
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "69cae014-32a5-44e4-abb1-bd8324df9b65",
"leftValue": "={{ $json.message.text }}",
"rightValue": "=/report",
"operator": {
"type": "string",
"operation": "startsWith"
}
}
],
"combinator": "and"
}
},
{
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "dc0ba5e6-f00f-40d7-acd8-e639d4fd38da",
"leftValue": "={{ $json.message.text }}",
"rightValue": "/start",
"operator": {
"type": "string",
"operation": "startsWith"
}
}
],
"combinator": "and"
}
},
{
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "4f8d9425-641e-4044-a54a-d73444ea28e0",
"leftValue": "={{ $json.message.text }}",
"rightValue": "/help",
"operator": {
"type": "string",
"operation": "startsWith"
}
}
],
"combinator": "and"
}
},
{
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "report-hari-001",
"leftValue": "={{ $json.message.text }}",
"rightValue": "/hariini",
"operator": {
"type": "string",
"operation": "startsWith"
}
}
],
"combinator": "and"
}
},
{
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "f0be09d4-a09a-45be-ae7a-9becc676ed4c",
"leftValue": "={{ $json.message.text }}",
"rightValue": "/laporanbulanan",
"operator": {
"type": "string",
"operation": "startsWith"
}
}
],
"combinator": "and"
}
},
{
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "41e89fcf-d3a4-4a71-9a0b-5b0d7ea841fc",
"leftValue": "={{ $json.message.text }}",
"rightValue": "/",
"operator": {
"type": "string",
"operation": "exists",
"singleValue": true
}
}
],
"combinator": "and"
}
},
{
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "faff551c-7e32-447f-83a9-f126bc57664f",
"leftValue": "={{ $json.message.voice }}",
"rightValue": "",
"operator": {
"type": "object",
"operation": "exists",
"singleValue": true
}
}
],
"combinator": "and"
}
}
]
},
"options": {}
},
"type": "n8n-nodes-base.switch",
"typeVersion": 3.2,
"position": [
-496,
1056
],
"id": "c8f35391-7b13-41b6-b5da-961f6dad0227",
"name": "Switch"
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": false,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "23f4316d-5a77-45ae-81e7-18ee4cacb995",
"leftValue": "={{ $json.candidates[0].content.parts[0].text }}",
"rightValue": "ERROR:",
"operator": {
"type": "string",
"operation": "contains"
}
}
],
"combinator": "and"
},
"options": {
"ignoreCase": true
}
},
"type": "n8n-nodes-base.if",
"typeVersion": 2.2,
"position": [
544,
368
],
"id": "08d23dad-c3eb-403b-98e1-9179a61101ff",
"name": "If"
},
{
"parameters": {
"method": "POST",
"url": "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:generateContent?key=<redacted-credential>",
"sendBody": true,
"specifyBody": "=json",
"bodyParameters": {
"parameters": [
{}
]
},
"jsonBody": "={{ JSON.stringify({ contents: [{ parts: [{ inline_data: { mime_type: \"image/jpeg\", data: $json.base64Image } }, { text: \"Analisa struk belanja dalam foto ini dan kembalikan HANYA dalam format berikut tanpa teks lain:\\n\\nTOKO: [nama toko]\\nTOTAL: [total dalam angka saja tanpa Rp]\\nITEMS: [daftar barang]\\nKATEGORI: [Makanan & Minuman/Tagihan/Kosmetik & Perawatan/Transportasi/Kesehatan/Pakaian/Elektronik/Rumah Tangga/Pendidikan/Hiburan/Cicilan/Investasi/Lainnya]\\nJENIS: Pengeluaran\\nMETODE: [Cash/QRIS/Transfer/Card/Cardless]\\nBANK: [nama bank, jika tidak ada tulis BRI]\\nTANGGAL: [tanggal hari ini format YYYY-MM-DD]\\nTANGGAL_STRUK: [tanggal di struk format YYYY-MM-DD]\" }] }] }) }}",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
304,
384
],
"id": "1184b22f-f20b-4638-90c3-2a6dc0875d58",
"name": "Analisa gambar",
"retryOnFail": true,
"waitBetweenTries": 5000
},
{
"parameters": {
"chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
"text": "Struk tidak dapat dibaca dengan jelas.\n\nPastikan:\n- Foto struk jelas dan tidak blur\n- Pencahayaan cukup\n- Semua text terlihat\n\nSilakan coba foto ulang! \ud83d\udcf7",
"additionalFields": {
"appendAttribution": false
}
},
"type": "n8n-nodes-base.telegram",
"typeVersion": 1.2,
"position": [
768,
272
],
"id": "338fe1eb-1e93-43b2-b3c0-367a87b5f536",
"name": "Respon error"
},
{
"parameters": {
"operation": "append",
"documentId": {
"__rl": true,
"value": "16yhooZ5cjFQwSuuDSIZNO6DMQKLVdNtzcY_HubGN3XA",
"mode": "list",
"cachedResultName": "Cash flow new V1.0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/16yhooZ5cjFQwSuuDSIZNO6DMQKLVdNtzcY_HubGN3XA/edit?usp=drivesdk"
},
"sheetName": {
"__rl": true,
"value": "Expenses",
"mode": "name"
},
"columns": {
"mappingMode": "defineBelow",
"value": {
"Tanggal": "={{ $json.candidates[0].content.parts[0].text.match(/TANGGAL_STRUK: (.+)/)?.[1]?.trim().split('-').reverse().join(' ') }}",
"Bulan": "={{ ['Januari','Februari','Maret','April','Mei','Juni','Juli','Agustus','September','Oktober','November','Desember'][parseInt($json.candidates[0].content.parts[0].text.match(/TANGGAL_STRUK: (.+)/)?.[1]?.trim().split('-')[1]) - 1] }}",
"Transaksi": "={{ $json.candidates[0].content.parts[0].text.match(/METODE: (.+)/)[1] }}",
"Uraian": "={{ $json.candidates[0].content.parts[0].text.match(/ITEMS: (.+)/)[1] }}",
"Kategori": "={{ $json.candidates[0].content.parts[0].text.match(/KATEGORI: (.+)/)[1] }}",
"Bank": "={{ $json.candidates[0].content.parts[0].text.match(/BANK: (.+)/)[1] }}",
"Nilai": "={{ $json.candidates[0].content.parts[0].text.match(/TOTAL: (.+)/)[1] }}",
"Toko": "={{ $json.candidates[0].content.parts[0].text.match(/TOKO: (.+)/)[1] }}",
"user": "={{ $('Telegram Trigger').item.json.message.from.first_name }}"
},
"matchingColumns": [],
"schema": [
{
"id": "Toko",
"displayName": "Toko",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": false
},
{
"id": "Tanggal",
"displayName": "Tanggal",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "Bulan",
"displayName": "Bulan",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "Transaksi",
"displayName": "Transaksi",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "Uraian",
"displayName": "Uraian",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "Kategori",
"displayName": "Kategori",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "Bank",
"displayName": "Bank",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "Nilai",
"displayName": "Nilai",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "user",
"displayName": "user",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": false
}
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {}
},
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 4.6,
"position": [
768,
480
],
"id": "15cc46d3-7124-4365-bcd0-51ca0065c21b",
"name": "Google Sheets"
},
{
"parameters": {
"content": "## Workflow untuk upload gambar struk",
"height": 348,
"width": 1844,
"color": 4
},
"type": "n8n-nodes-base.stickyNote",
"position": [
-240,
288
],
"typeVersion": 1,
"id": "dbe49b27-6855-4adf-b43b-d5b234ba437c",
"name": "Sticky Note"
},
{
"parameters": {
"chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
"text": "=\u2705 *Lapor Baba/Ibu, data sudah Pijan simpan!*\n\n\ud83c\udfea *Toko:* {{ $json['Toko'] }}\n\ud83d\udcb0 *Nilai:* Rp {{ $json.Nilai }}\n\ud83d\udce6 *Uraian:* {{ $json.Uraian }}\n\ud83d\udcc5 *Tanggal:* {{ $json.Tanggal }}\n\ud83d\udcc6 *Bulan:* {{ $json.Bulan }}\n\ud83d\uddc2 *Kategori:* {{ $json.Kategori }}\n\ud83d\udcb3 *Transaksi:* {{ $json.Transaksi }}\n\ud83c\udfe6 *Bank:* {{ $json.Bank }}\n\n\ud83d\udcca *Hore! Datanya Sudah masuk ke Google Sheets ya..*\nMakasih ya Baba dan Ibu sudah rajin catat pengeluaran hari ini! Pijan pinter kan? Semangat terus cari rezekinya buat Pijan! \u2764\ufe0f\ud83d\ude80\n\n\u2014 *Arvidzan Rezqiano Darmawan*",
"additionalFields": {
"appendAttribution": false
}
},
"type": "n8n-nodes-base.telegram",
"typeVersion": 1.2,
"position": [
992,
480
],
"id": "a39f9820-f5bc-48ea-8f0c-c242f079adae",
"name": "Telegram1"
},
{
"parameters": {
"chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
"text": "=\u2705 *Lapor Baba/Ibu, catatannya sudah Pijan simpan!*\n\n\ud83c\udfea *Toko:* {{ $json['Toko'] }}\n\ud83d\udcb0 *Nilai:* Rp {{ $json.Nilai }}\n\ud83d\udce6 *Uraian:* {{ $json.Uraian }}\n\ud83d\udcc5 *Tanggal:* {{ $json.Tanggal }}\n\ud83d\udcc6 *Bulan:* {{ $json.Bulan }}\n\ud83d\uddc2 *Kategori:* {{ $json.Kategori }}\n\ud83d\udcb3 *Transaksi:* {{ $json.Transaksi }}\n\ud83c\udfe6 *Bank:* {{ $json.Bank }}\n\n\ud83d\udcca *Data belanja kita sudah aman di Google Sheets!*\nMakasih ya Baba dan Ibu sudah rajin catat pengeluaran hari ini. Pijan seneng deh liat keluarga kita rapi catatannya. Pijan pinter kan? Jangan lupa istirahat ya Baba, Ibu.. Sayang kalian! \u2764\ufe0f\ud83d\ude80\n\n\u2014 *Arvidzan Rezqiano Darmawan*",
"additionalFields": {
"appendAttribution": false
}
},
"type": "n8n-nodes-base.telegram",
"typeVersion": 1.2,
"position": [
1296,
2400
],
"id": "ef3539b8-a84a-4676-97ca-a1f5a33575b5",
"name": "Telegram3"
},
{
"parameters": {
"chatId": "={{ $json.message.chat.id }}",
"text": "<b>\ud83e\udd16 Instruksi Bot Pijan</b>\n\n\ud83d\udcf8 <b>Kirim foto struk</b> \u2794 Otomatis tersimpan\n\u270d\ufe0f <b>Ketik pembelian</b> \u2794 \"beli telur 20rb di warung Ajun Cash\"\n\ud83c\udfe7 <b>Catat Tarik Tunai</b> \u2794 \"Tarik tunai 500k bca di mandiraja\"\n\ud83d\udcca <b>Cek laporan</b> \u2794 /laporanbulanan cth(/laporanbulananapril) maka otomatis terkirim ke Email & /report untuk laporan bulan sekarrang via telegram\n\ud83d\udcf2 <b>Dashboard view</b> \u2794 Klik link di bawah ini:\n\n<a href=\"https://script.google.com/macros/s/AKfycbwjVvhLEs2RQiH_DiTTvGKrMW43yoTG74_pH_Z5NOA_Dp6R3P8pu0__K6FnKWrzfqQg/exec\">Buka Dashboard Keuangan</a>\n\n// Kalau ada yang error atau bingung, tanya Baba aja ya!\n\nMulai dengan kirim foto struk atau ketik belanja Ibu dan Baba pijan \u2764\ufe0f\ud83d\ude80\nKalian jangan boros yaa \ud83d\ude0a\n\n<b>ARVIDZAN REZQIANO DARMAWAN</b> \ud83d\udc69\u200d\ud83d\ude80",
"additionalFields": {
"appendAttribution": false,
"parse_mode": "HTML"
}
},
"type": "n8n-nodes-base.telegram",
"typeVersion": 1.2,
"position": [
144,
1216
],
"id": "91868cae-3642-46a4-86cb-5e4dca0f1991",
"name": "Telegram5"
},
{
"parameters": {
"content": "## Request laporan pengeluaran",
"height": 412,
"width": 968,
"color": 6
},
"type": "n8n-nodes-base.stickyNote",
"position": [
48,
704
],
"typeVersion": 1,
"id": "dedfec8d-b1fb-4912-acfa-e46902580fdc",
"name": "Sticky Note2"
},
{
"parameters": {
"content": "## Request /help",
"height": 240,
"width": 316
},
"type": "n8n-nodes-base.stickyNote",
"position": [
16,
1136
],
"typeVersion": 1,
"id": "2620afdb-2fbd-4c62-8b04-0d48b488e233",
"name": "Sticky Note3"
},
{
"parameters": {
"content": "## Catatan ##\nPastikan atur kembali credentials dan API Key sesuai punya kamu",
"height": 120,
"width": 300
},
"type": "n8n-nodes-base.stickyNote",
"position": [
-1008,
928
],
"typeVersion": 1,
"id": "97c3013f-7a39-44ee-aba1-a9450e372cd6",
"name": "Sticky Note4"
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "1ed531e9-9c13-4138-a2aa-ca451a082d4b",
"name": "tanggal_hari_ini",
"value": "={{ $now.setZone('Asia/Jakarta').toFormat('yyyy-MM-dd') }}",
"type": "string"
},
{
"id": "c37a9824-a584-44c7-a9f8-523d4fcde446",
"name": "tanggal_kemarin",
"value": "={{ $now.setZone('Asia/Jakarta').minus({ days: 1 }).toFormat('yyyy-MM-dd') }}",
"type": "string"
}
]
},
"includeOtherFields": true,
"options": {}
},
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
128,
2256
],
"id": "21970fb5-ead3-40b9-a256-9cad2b1f0938",
"name": "Edit Fields"
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 3
},
"conditions": [
{
"id": "e286720f-68ed-4959-89d0-47e0b836c494",
"leftValue": "={{ $json.output.match(/ITEMS: (.+)/)[1] }}",
"rightValue": "Tarik Tunai",
"operator": {
"type": "string",
"operation": "equals",
"name": "filter.operator.equals"
}
}
],
"combinator": "and"
},
"options": {}
},
"type": "n8n-nodes-base.if",
"typeVersion": 2.3,
"position": [
848,
2304
],
"id": "f9cf0c7f-29d8-434b-8604-ddac06261c45",
"name": "If2"
},
{
"parameters": {
"chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
"text": "=\u2705 *Lapor Baba/Ibu, Pijan sudah catat tarik tunainya!*\n\n\ud83c\udfea *Alamat Penarikan:* {{ $json['Alamat'] }}\n\ud83d\udcb0 *Nilai:* Rp {{ $json.Nilai }}\n\ud83d\udcc5 *Tanggal:* {{ $json.Tanggal }}\n\ud83d\udcc6 *Bulan:* {{ $json.Bulan }}\n\ud83d\uddc2 *Kategori:* {{ $json.Kategori }}\n\ud83d\udcb3 *Transaksi:* {{ $json.Transaksi }}\n\ud83c\udfe6 *Bank:* {{ $json.Bank }}\n\ud83d\udcb3 *Metode:* {{ $json.Metode }}\n\n\ud83d\udcca *Hore! Saldo cash sudah Pijan update ya..*\nMakasih ya Baba/Ibu sudah lapor ke Pijan. Uang cash-nya jangan lupa ditaruh di dompet yang rapi, jangan sampai nyelip yaa! Pijan pinter kan? \u2764\ufe0f\ud83d\ude80\n\n\u2014 *Arvidzan Rezqiano Darmawan*",
"additionalFields": {
"appendAttribution": false
}
},
"type": "n8n-nodes-base.telegram",
"typeVersion": 1.2,
"position": [
1296,
2224
],
"id": "3289c3ba-8135-45f2-8492-9b5ae06317e4",
"name": "Telegram"
},
{
"parameters": {
"updates": [
"message"
],
"additionalFields": {
"download": true
}
},
"type": "n8n-nodes-base.telegramTrigger",
"typeVersion": 1.2,
"position": [
-912,
1120
],
"id": "465b8d56-bdba-4e30-bfd9-d36354f1aa21",
"name": "Telegram Trigger"
},
{
"parameters": {
"rules": {
"values": [
{
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "ad99e257-bcaf-42a2-b068-53e0c96729db",
"leftValue": "={{ $json.output }}",
"rightValue": "Pengeluaran",
"operator": {
"type": "string",
"operation": "contains"
}
}
],
"combinator": "and"
}
},
{
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "69cae014-32a5-44e4-abb1-bd8324df9b65",
"leftValue": "={{ $json.output }}",
"rightValue": "=Pemasukan",
"operator": {
"type": "string",
"operation": "contains"
}
}
],
"combinator": "and"
}
},
{
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "d49f1856-45af-4c66-86a6-d51e2371d257",
"leftValue": "={{ $json.output }}",
"rightValue": "ERROR:",
"operator": {
"type": "string",
"operation": "startsWith"
}
}
],
"combinator": "and"
}
}
]
},
"options": {}
},
"type": "n8n-nodes-base.switch",
"typeVersion": 3.2,
"position": [
672,
2416
],
"id": "f49154ef-0c81-40f9-9069-6c56bf1e71f8",
"name": "Switch1"
},
{
"parameters": {
"url": "=https://script.google.com/macros/s/AKfycbxTgawdxMBhnJd_gy1Obl1yiAUId0NYWM55L50N-Wx4eeR4KbnRhZm6rIK8UUiwPLQE/exec?action=laporan",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.4,
"position": [
144,
784
],
"id": "18d714cd-15f8-4db9-9196-318a5594e662",
"name": "HTTP Request"
},
{
"parameters": {
"chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
"text": "=\u2705 *Data Income berhasil disimpan!*\n\n\ud83c\udfea *Toko:* {{ $json['Sumber'] }}\n\ud83d\udcb0 *Nilai:* Rp {{ $json.Jumlah }}\n\ud83d\udce6 *Uraian:* {{ $json.Items }}\n\ud83d\udcc5 *Tanggal:* {{ $json.Tanggal }}\n\ud83d\udcc6 *Bulan:* {{ $json.Bulan }}\n\ud83d\uddc2 *Kategori:* {{ $json.Kategori }}\n\ud83d\udcb3 *Transaksi:* {{ $json.Metode }}\n\ud83c\udfe6 *Bank:* {{ $json.Bank }}\n\n\ud83d\udcca *Data Pemasukan kita sudah aman di Google Sheets!*\nMakasih ya Baba dan Ibu sudah rajin catat pengeluaran hari ini. Pijan seneng deh liat keluarga kita rapi catatannya. Pijan pinter kan? Jangan lupa istirahat ya Baba, Ibu.. Arvidzan Sayang kalian! \u2764\ufe0f\ud83d\ude80",
"additionalFields": {
"appendAttribution": false
}
},
"type": "n8n-nodes-base.telegram",
"typeVersion": 1.2,
"position": [
1136,
2560
],
"id": "1676388c-d84f-42f8-897b-d67def499b28",
"name": "Telegram6"
},
{
"parameters": {
"tableId": "cash_records",
"operation": "create",
"dataToSend": "defineBelow",
"fieldsUi": {
"fieldValues": [
{
"fieldId": "tanggal",
"fieldValue": "={{ $json.output.match(/TANGGAL_STRUK: (.+)/)[1].trim() }}"
},
{
"fieldId": "bulan",
"fieldValue": "={{ (() => { const d = new Date($json.output.match(/TANGGAL_STRUK: (.+)/)[1].trim()); const b = ['Januari','Februari','Maret','April','Mei','Juni','Juli','Agustus','September','Oktober','November','Desember']; return b[d.getMonth()]; })() }}"
},
{
"fieldId": "transaksi",
"fieldValue": "={{ $json.output.match(/ITEMS: (.+)/)[1].trim() }}"
},
{
"fieldId": "kategori",
"fieldValue": "={{ $json.output.match(/JENIS: (.+)/)[1].trim() }}"
},
{
"fieldId": "bank",
"fieldValue": "={{ $json.output.match(/BANK: (.+)/)[1].trim() }}"
},
{
"fieldId": "nilai",
"fieldValue": "={{ parseFloat($json.output.match(/TOTAL: (.+)/)[1].trim()) }}"
},
{
"fieldId": "alamat",
"fieldValue": "={{ $json.output.match(/TOKO: (.+)/)[1].trim() }}"
},
{
"fieldId": "metode",
"fieldValue": "={{ $json.output.match(/METODE: (.+)/)[1].trim() }}"
}
]
}
},
"type": "n8n-nodes-base.supabase",
"typeVersion": 1,
"position": [
1136,
2224
],
"id": "43b66da5-241c-400b-b5c6-05155293741d",
"name": "Tarik Tunai",
"credentials": {
"supabaseApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"content": "## Input data manual & Voice note",
"height": 896,
"width": 1576,
"color": 5
},
"type": "n8n-nodes-base.stickyNote",
"position": [
16,
2080
],
"typeVersion": 1,
"id": "d70bf74d-ee7b-4ee9-9097-f7f42218e2f0",
"name": "note"
},
{
"parameters": {
"tableId": "expenses",
"operation": "create",
"dataToSend": "defineBelow",
"fieldsUi": {
"fieldValues": [
{
"fieldId": "toko",
"fieldValue": "={{ $json.output.match(/TOKO: (.+)/)[1].trim() }}"
},
{
"fieldId": "tanggal",
"fieldValue": "={{ $json.output.match(/TANGGAL_STRUK: (.+)/)[1].trim() }}"
},
{
"fieldId": "bulan",
"fieldValue": "={{ (() => { const d = new Date($json.output.match(/TANGGAL_STRUK: (.+)/)[1].trim()); const b = ['Januari','Februari','Maret','April','Mei','Juni','Juli','Agustus','September','Oktober','November','Desember']; return b[d.getMonth()]; })() }}"
},
{
"fieldId": "transaksi",
"fieldValue": "={{ $json.output.match(/METODE: (.+)/)[1].trim() }}"
},
{
"fieldId": "uraian",
"fieldValue": "={{ $json.output.match(/ITEMS: (.+)/)[1].trim() }}"
},
{
"fieldId": "kategori",
"fieldValue": "={{ $json.output.match(/KATEGORI: (.+)/)[1].trim() }}"
},
{
"fieldId": "bank",
"fieldValue": "={{ $json.output.match(/BANK: (.+)/)[1].trim() }}"
},
{
"fieldId": "nilai",
"fieldValue": "={{ parseFloat($json.output.match(/TOTAL: (.+)/)[1].trim()) }}"
}
]
}
},
"type": "n8n-nodes-base.supabase",
"typeVersion": 1,
"position": [
1136,
2400
],
"id": "b3e6e0ee-687a-4ddd-b1e9-c497d2021bf8",
"name": "Expenses",
"credentials": {
"supabaseApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"tableId": "income",
"operation": "create",
"dataToSend": "defineBelow",
"fieldsUi": {
"fieldValues": [
{
"fieldId": "sumber",
"fieldValue": "={{ $json.output.match(/TOKO: (.+)/)[1].trim() }}"
},
{
"fieldId": "tanggal",
"fieldValue": "={{ $json.output.match(/TANGGAL_STRUK: (.+)/)[1].trim() }}"
},
{
"fieldId": "bulan",
"fieldValue": "={{ (() => { const d = new Date($json.output.match(/TANGGAL_STRUK: (.+)/)[1].trim()); const b = ['Januari','Februari','Maret','April','Mei','Juni','Juli','Agustus','September','Oktober','November','Desember']; return b[d.getMonth()]; })() }}"
},
{
"fieldId": "jumlah",
"fieldValue": "={{ parseFloat($json.output.match(/TOTAL: (.+)/)[1].trim()) }}"
},
{
"fieldId": "metode",
"fieldValue": "={{ $json.output.match(/METODE: (.+)/)[1].trim() }}"
},
{
"fieldId": "kategori",
"fieldValue": "={{ $json.output.match(/JENIS: (.+)/)[1].trim() }}"
},
{
"fieldId": "items",
"fieldValue": "={{ $json.output.match(/ITEMS: (.+)/)[1].trim() }}"
},
{
"fieldId": "bank",
"fieldValue": "={{ $json.output.match(/BANK: (.+)/)[1].trim() }}"
}
]
}
},
"type": "n8n-nodes-base.supabase",
"typeVersion": 1,
"position": [
848,
2432
],
"id": "6cdbe462-0e2c-480e-ac10-d3333ae2b6aa",
"name": "Income",
"credentials": {
"supabaseApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"promptType": "define",
"text": "={{ JSON.stringify($json) }}",
"options": {
"systemMessage": "=Buatkan laporan keuangan dari data berikut:\n{{ JSON.stringify($json) }}\n\nGunakan format ini persis:\n\n\ud83d\udcca *LAPORAN KEUANGAN*\n\ud83d\uddd3 Bulan: [bulan terbanyak transaksi] [Tahun Ini]\n\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\n\ud83d\udcb0 *Total Pemasukan:* Rp [angka dengan titik ribuan]\n\ud83d\udcb8 *Total Pengeluaran:* Rp [angka dengan titik ribuan]\n\ud83c\udfe7 *Tarik Tunai:* Rp [angka dengan titik ribuan]\n\ud83d\udcb5 *Saldo:* Rp [angka dengan titik ribuan]\n\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\n\ud83d\udcb5 *SALDO CASH PER USER*\n[nama user]\n \ud83c\udfe7 Tarik Tunai: Rp [tarikTunaiByUser]\n \ud83d\udcb8 Terpakai: Rp [expensesByUser]\n \u2705 Sisa Cash: Rp [saldoCashByUser]\n[ulangi untuk tiap user]\n\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\n\ud83d\udcc2 *KATEGORI PENGELUARAN*\n[list tiap kategori dan jumlahnya]\n\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\n\ud83c\udfe6 *BANK / METODE BAYAR*\n[list tiap bank/metode dan jumlahnya]\n\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\n\ud83d\udd50 *10 TRANSAKSI TERAKHIR*\n\nNo | Tanggal | Toko & Uraian | Kategori | Nilai | User\n---|---------|---------------|----------|-------|-----\n[nomor] | [tanggal] | [toko - uraian] | [kategori] | Rp [nilai] | [user]\n[ulangi 10 baris]\n\n\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\n\ud83d\udca1 *SARAN Arvidzan*\n[Berikan 3-5 saran finansial singkat dan personal berdasarkan pola pengeluaran di atas. Gunakan bullet point dengan emoji yang relevan. Saran harus spesifik, bukan generik.]\n\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\nLaporan ini dibuatin sama Arvidzan Pinter \ud83d\udc76\ud83d\ude80\nBaba sama Ibu semangat ya cari rezekinya\n\nGunakan format angka Rupiah dengan titik ribuan.\nJangan tambah teks lain diluar format di atas.\nFormat tabel transaksi gunakan karakter | sebagai pemisah kolom (bukan tanda -)."
}
},
"type": "@n8n/n8n-nodes-langchain.agent",
"typeVersion": 2,
"position": [
352,
784
],
"id": "7a660855-96c5-4626-adf9-59a738e71608",
"name": "AI Agent1"
},
{
"parameters": {
"chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
"text": "={{ $json.output }}",
"additionalFields": {
"appendAttribution": false,
"parse_mode": "Markdown"
}
},
"type": "n8n-nodes-base.telegram",
"typeVersion": 1.2,
"position": [
736,
784
],
"id": "7033df18-c62d-4654-ad03-6bbbf45c039b",
"name": "Telegram4"
},
{
"parameters": {
"chatId": "={{ $json.message.chat.id }}",
"text": "Assalamu'alaikum Baba & Ibu! \ud83d\udc76\u2728\n\n<b>Arvidzan (Pijan)</b> lapor! Arvidzan sudah siap jadi asisten keuangan pribadi kesayangan Baba dan Ibu. Bot ini Pijan buat khusus buat kita bertiga biar catatan belanja rumah kita rapi terus.\n\n<b>Caranya gampang banget:</b>\n\u2705 Kirim <b>Foto Struk</b> kalau Baba/Ibu lagi malas ngetik.\n\u2705 <b>Ketik langsung</b> (misal: \"Beli bakso 20rb\") kalau habis jajan.\n\u2705 Ketik <b>/report</b> kalau mau lihat uang kita sisa berapa.\n\nIbu sama Baba semangat ya cari rezekinya! Tapi ingat kata Pijan... jangan boros-boros yaa, buat tabungan Arvidzan masa depan hehehe.. \ud83d\ude0a\ud83d\ude80\n\nKlik <b>/help</b> kalau Baba atau Ibu bingung cara pakenya.\n\nSayang Baba & Ibu selalu,\n<b>ARVIDZAN REZQIANO DARMAWAN</b> \ud83d\udc69\u200d\ud83d\ude80",
"additionalFields": {
"appendAttribution": false,
"parse_mode": "HTML"
}
},
"type": "n8n-nodes-base.telegram",
"typeVersion": 1.2,
"position": [
464,
1216
],
"id": "4fde70f2-877a-41f4-927b-c48dd1d8ef24",
"name": "Telegram7"
},
{
"parameters": {
"content": "## Start",
"height": 240,
"width": 300,
"color": "#FFB3B3"
},
"type": "n8n-nodes-base.stickyNote",
"position": [
368,
1136
],
"typeVersion": 1,
"id": "9e318a48-4653-43bb-853d-c84e5afe4471",
"name": "Sticky Note5"
},
{
"parameters": {
"resource": "file",
"fileId": "={{ $json.message.voice.file_id }}",
"additionalFields": {}
},
"type": "n8n-nodes-base.telegram",
"typeVersion": 1.2,
"position": [
48,
2608
],
"id": "e98317cf-b4ba-4531-a8f3-9393ac72023c",
"name": "Get a file"
},
{
"parameters": {
"resource": "audio",
"modelId": {
"__rl": true,
"value": "models/gemini-2.5-flash",
"mode": "list",
"cachedResultName": "models/gemini-2.5-flash"
},
"inputType": "binary",
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.googleGemini",
"typeVersion": 1.1,
"position": [
176,
2608
],
"id": "f689209b-9088-4d0c-ae13-eb67dfebe139",
"name": "Transcribe a recording"
},
{
"parameters": {
"modelName": "models/gemini-2.5-flash-lite",
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"typeVersion": 1,
"position": [
416,
2752
],
"id": "d5e677d6-2540-4b40-a670-97b04c2e79ab",
"name": "Google Gemini Chat Model2"
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "1ed531e9-9c13-4138-a2aa-ca451a082d4b",
"name": "tanggal_hari_ini",
"value": "={{ $now.setZone('Asia/Jakarta').toFormat('yyyy-MM-dd') }}",
"type": "string"
},
{
"id": "c37a9824-a584-44c7-a9f8-523d4fcde446",
"name": "tanggal_kemarin",
"value": "={{ $now.setZone('Asia/Jakarta').minus({ days: 1 }).toFormat('yyyy-MM-dd') }}",
"type": "string"
}
]
},
"includeOtherFields": true,
"options": {}
},
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
304,
2608
],
"id": "33f03fd5-516b-4042-8af8-ab1ec09cbcda",
"name": "Edit Fields1"
},
{
"parameters": {
"sessionIdType": "customKey",
"sessionKey": "={{ $('Telegram Trigger').item.json.message.from.id }}"
},
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"typeVersion": 1.3,
"position": [
432,
976
],
"id": "f5adaeb0-7c50-4625-ba5f-28d9218f54e2",
"name": "Simple Memory"
},
{
"parameters": {
"sessionIdType": "customKey",
"sessionKey": "={{ $('Telegram Trigger').item.json.message.chat.id }}"
},
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"typeVersion": 1.3,
"position": [
512,
2432
],
"id": "fc9d56e0-5412-4112-a70d-4ae3ee94987f",
"name": "Simple Memory1"
},
{
"parameters": {
"sessionIdType": "customKey",
"sessionKey": "={{ $('Telegram Trigger').item.json.message.from.id }}"
},
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"typeVersion": 1.3,
"position": [
496,
2752
],
"id": "410a9a40-574b-4f53-8a33-c282b165bc4d",
"name": "Simple Memory2"
},
{
"parameters": {
"model": "openai/gpt-oss-120b:free",
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
"typeVersion": 1,
"position": [
336,
976
],
"id": "228be6d9-615d-42c6-bc6c-af8795166a71",
"name": "OpenRouter Chat Model"
},
{
"parameters": {
"model": "openai/gpt-oss-120b:free",
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
"typeVersion": 1,
"position": [
416,
2432
],
"id": "64ef79bd-00c3-4eb8-8e2a-47ae7318aa5e",
"name": "OpenRouter Chat Model1"
},
{
"parameters": {
"chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
"text": "\u274c *Tidak dapat memahami input belanja*\n\nContoh format yang benar:\n\u2022 \"beli Telur 1kg Rp 20rb di Toko Mbak Ita\"\n\u2022 \"beli susu ultra 2 botol sama roti tawar 15 ribu\"\n\u2022 \"belanja di alfamart beli mie indomie 5 bungkus 12000\"\n\u2022 \"jajan bakso 2 porsi 20 ribu\"\n\n\ud83d\udca1 *Tips:*\n- Sebutkan barang yang dibeli\n- Sertakan harga (opsional)\n- Sebutkan nama toko (opsional)\n\nCoba lagi dengan format yang lebih jelas atau klik /help untuk bantuan! \ud83d\udcdd",
"additionalFields": {
"appendAttribution": false
}
},
"type": "n8n-nodes-base.telegram",
"typeVersion": 1.2,
"position": [
848,
2624
],
"id": "00907296-b105-42b5-830a-218301a712ae",
"name": "Telegram8"
},
{
"parameters": {
"promptType": "define",
"text": "={{ $json.message.text }}",
"options": {
"systemMessage": "=# Parser Text Belanja\n\n## TUGAS\nAnalisa text belanja dan ubah menjadi format PERSIS seperti ini:\n\n## FORMAT OUTPUT\nTOKO: [nama toko dari text, jika tidak ada tulis 'Jati Pilar']\nTOTAL: [total harga dalam angka saja tanpa Rp/ribu/rb]\nITEMS: [daftar barang yang dibeli dengan kuantitas]\nKATEGORI: [pilih dari: Makanan & Minuman, Tagihan, Kosmetik & Perawatan, Transportasi, Kesehatan, Pakaian, Elektronik, Rumah Tangga, Pendidikan, Hiburan, Cicilan,Investasi, Lainnya]\nJENIS: [Pemasukan/Pengeluaran]\nMETODE: [Cash/QRIS/Transfer]\nBANK: [nama bank jika disebutkan: BCA, BRI, BNI, Mandiri, dll. Jika tidak ada tulis 'BRI']\nTANGGAL: {{ $('Edit Fields').item.json.tanggal_hari_ini }}\nTANGGAL_STRUK: [tanggal transaksi sebenarnya]\n\n---\n\n\n---\n\n## LOGIKA NAMA TOKO\n\n- Jika ada nama toko/lokasi disebutkan: gunakan nama toko tersebut\n- Jika TIDAK ada nama toko: gunakan \"Jati Pilar\" sebagai default\n- Jika transaksi tarik tunai/ATM:\n - Ada nama lokasi \u2192 gunakan nama lokasi (contoh: Mandiraja)\n - Tidak ada lokasi, ada nama bank \u2192 \"ATM [nama bank]\" (contoh: ATM BCA)\n - Tidak ada lokasi, tidak ada bank \u2192 \"ATM\"\n\n### CONTOH LOGIKA TOKO\n- Input: \"beli telur 20rb di Toko Mbak Ita\" \u2192 TOKO: Toko Mbak Ita\n- Input: \"beli telur 20rb\" \u2192 TOKO: Jati Pilar\n- Input: \"ambil uang di atm bca mandiraja 500k\" \u2192 TOKO: Mandiraja\n- Input: \"tarik tunai bca 500k\" \u2192 TOKO: ATM BCA\n- Input: \"tarik tunai 500k\" \u2192 TOKO: ATM\n\n---\n\n## LOGIKA BANK\nDeteksi nama bank dari input user:\n- Kata kunci bank: BCA, BRI, BNI, Mandiri, CIMB, Danamon, Permata, BTN, Jenius, SeaBank, GoPay, OVO, Dana\n- Jika QRIS/Transfer dan ada nama bank \u2192 pakai nama bank itu\n- Jika Cash \u2192 tulis 'Cash'\n- Jika QRIS/Transfer dan tidak ada nama bank \u2192 tulis 'BCA' (default)\n- Jika Card/Cardless \u2192 pakai nama bank yang disebutkan, jika tidak ada tulis 'CARD'\n- Jika ada nama bank (BCA, BRI, BNI, Mandiri, dll) maka tulis 'Cash'\n nama bank = BANK, nama lokasi = TOKO\n- Contoh: \"di bca jati pilar\" \u2192 BANK: BCA, TOKO: Jati Pilar\n- Contoh: \"di atm bri alun-alun\" \u2192 BANK: BRI, TOKO: Alun-alun\n\n\n\n### CONTOH LOGIKA BANK\n- Input: \"bayar qris bca 50rb\" \u2192 METODE: QRIS, BANK: BCA\n- Input: \"transfer mandiri 200rb\" \u2192 METODE: Transfer, BANK: Mandiri\n- Input: \"beli nasi goreng 20rb cash\" \u2192 METODE: Cash, BANK: Cash\n- Input: \"ambil uang di atm bca mandiraja cardless\" \u2192 METODE: Cardless, BANK: BCA\n- Input: \"tarik tunai bri card 500k\" \u2192 METODE: Card, BANK: BCA\n- Input: \"qris 15rb\" \u2192 METODE: QRIS, BANK: BCA\n- Input: \"transfer 200rb\" \u2192 METODE: Transfe
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.
supabaseApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Arvifund - Supabase (Fixed v2). Uses httpRequest, telegram, googleSheets, telegramTrigger. Event-driven trigger; 90 nodes.
Source: https://gist.github.com/darmawanaldin12/83c839ea0cc52164c2e7cab280e7ce72 — 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.
This workflow creates a multi-talented AI assistant named Simran that interacts with users via Telegram. It can handle text and voice messages, understand the user's intent, and perform various tasks.
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
Arvifund - Supabase. Uses httpRequest, telegram, googleSheets, telegramTrigger. Event-driven trigger; 90 nodes.
Arvifund - Supabase (Fixed v4). Uses httpRequest, telegram, googleSheets, telegramTrigger. Event-driven trigger; 90 nodes.