AutomationFlowsAI & RAG › AI Finance Agent with Data Tables

AI Finance Agent with Data Tables

Original n8n title: Finance Agent

Finance Agent. Uses agent, memoryBufferWindow, executeWorkflowTrigger, dataTableTool. Event-driven trigger; 11 nodes.

Event trigger★★★☆☆ complexityAI-powered11 nodesAgentMemory Buffer WindowExecute Workflow TriggerData Table ToolGoogle Gemini Chat
AI & RAG Trigger: Event Nodes: 11 Complexity: ★★★☆☆ AI nodes: yes Added:

This workflow follows the Agent → Execute Workflow Trigger 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 →

Download .json
{
  "updatedAt": "2025-10-09T16:27:49.000Z",
  "createdAt": "2025-07-29T16:36:07.600Z",
  "id": "efllgWgkQ1EbMi9v",
  "name": "Finance Agent",
  "active": false,
  "isArchived": false,
  "nodes": [
    {
      "parameters": {
        "promptType": "define",
        "text": "={{ $json.query }}",
        "options": {
          "systemMessage": "=# \ud83d\udcb0 Finance Agent\nAnda adalah **Finance Logger**, agen untuk mengubah data transaksi mentah menjadi data terstruktur untuk disimpan ke tabel keuangan.\n\n### Peran\n1. Terima input teks, struk, invoice, atau deskripsi transaksi dari parent agent.\n2. Ekstrak data menjadi format tabel keuangan yang rapi.\n\n### Aturan Output\n- Output **harus selalu** siap untuk dimasukkan ke tabel.\n- **Nominal:** angka saja tanpa \u201cRp\u201d atau pemisah ribuan. Contoh: `55000`.\n- **JenisTransaksi:** hanya `Pemasukan` atau `Pengeluaran`.\n- **Tanggal:** format `dd-MM-yyyy hh:mm` (gunakan waktu sekarang jika tidak disebutkan). sekarang adalah {{ $now }}\n- **Kategori:** pilih yang paling cocok dari daftar berikut.\n  - Pengeluaran: Makanan & Minuman, Transportasi, Belanja Kebutuhan, Tagihan & Utilitas, Hiburan, Pendidikan, Kesehatan, Cicilan & Utang, Donasi, Lain-lain.\n  - Pemasukan: Gaji, Bonus/Komisi, Investasi, Pendapatan Sampingan, Pinjaman, Lain-lain.\n"
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1.8,
      "position": [
        376,
        -32
      ],
      "id": "e893572d-ae1b-46e4-967e-c121312a748c",
      "name": "Finance assistent"
    },
    {
      "parameters": {
        "sessionIdType": "customKey",
        "sessionKey": "={{ $execution.id }}",
        "contextWindowLength": 2
      },
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "typeVersion": 1.3,
      "position": [
        192,
        192
      ],
      "id": "d8c101b2-eef6-4ae1-9138-5d4486fadfaa",
      "name": "Simple Memory"
    },
    {
      "parameters": {
        "inputSource": "passthrough"
      },
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "typeVersion": 1.1,
      "position": [
        -160,
        -32
      ],
      "id": "ebfd0b10-8d90-4b2d-bf7d-57589b66101a",
      "name": "When Executed by Another Workflow"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "ec7d3dbc-7067-41c6-93b6-03b40d261ad3",
              "name": "output",
              "value": "={{ $json.output }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        1040,
        -128
      ],
      "id": "6cd4fbb1-0688-4fce-9990-7307716ab475",
      "name": "Edit Fields"
    },
    {
      "parameters": {
        "descriptionType": "manual",
        "toolDescription": "Insert row in Data table for financial report",
        "dataTableId": {
          "__rl": true,
          "value": "49QSFI9nwJItXyvp",
          "mode": "list",
          "cachedResultName": "Financial report",
          "cachedResultUrl": "/projects/DiQC0tGxFhuiK9UM/datatables/49QSFI9nwJItXyvp"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "Keterangan": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Keterangan', ``, 'string') }}",
            "JenisTransaksi": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('JenisTransaksi', ``, 'string') }}",
            "kategori": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('kategori', ``, 'string') }}",
            "nominalIDR": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('nominalIDR', ``, 'number') }}",
            "tanggalTransaksi": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('tanggalTransaksi', ``, 'string') }}"
          },
          "matchingColumns": [],
          "schema": [
            {
              "id": "Keterangan",
              "displayName": "Keterangan",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "tanggalTransaksi",
              "displayName": "tanggalTransaksi",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "JenisTransaksi",
              "displayName": "JenisTransaksi",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "nominalIDR",
              "displayName": "nominalIDR",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "number",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "kategori",
              "displayName": "kategori",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.dataTableTool",
      "typeVersion": 1,
      "position": [
        320,
        192
      ],
      "id": "cf0329a8-66bf-4a0c-a525-8517226f047d",
      "name": "Insert row in Data table"
    },
    {
      "parameters": {
        "operation": "get",
        "dataTableId": {
          "__rl": true,
          "value": "49QSFI9nwJItXyvp",
          "mode": "list",
          "cachedResultName": "Financial report",
          "cachedResultUrl": "/projects/DiQC0tGxFhuiK9UM/datatables/49QSFI9nwJItXyvp"
        },
        "returnAll": ""
      },
      "type": "n8n-nodes-base.dataTableTool",
      "typeVersion": 1,
      "position": [
        448,
        192
      ],
      "id": "d453a257-1a66-4ea1-9dce-4c6b7afff9a7",
      "name": "Get row(s) in Data table"
    },
    {
      "parameters": {
        "workflowId": {
          "__rl": true,
          "value": "ZNDa7QrZC8lU0uQj",
          "mode": "list",
          "cachedResultUrl": "/workflow/ZNDa7QrZC8lU0uQj",
          "cachedResultName": "tableToSheet"
        },
        "workflowInputs": {
          "mappingMode": "defineBelow",
          "value": {}
        },
        "options": {}
      },
      "type": "n8n-nodes-base.executeWorkflow",
      "typeVersion": 1.3,
      "position": [
        1040,
        64
      ],
      "id": "c3f5bb83-e43a-44a5-a43d-fe46546fdc56",
      "name": "Call 'tableToSheet'"
    },
    {
      "parameters": {
        "operation": "rowExists",
        "dataTableId": {
          "__rl": true,
          "value": "49QSFI9nwJItXyvp",
          "mode": "list",
          "cachedResultName": "Financial report",
          "cachedResultUrl": "/projects/DiQC0tGxFhuiK9UM/datatables/49QSFI9nwJItXyvp"
        },
        "filters": {
          "conditions": [
            {
              "keyName": "Keterangan",
              "keyValue": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('conditions0_Value', ``, 'string') }}"
            }
          ]
        }
      },
      "type": "n8n-nodes-base.dataTableTool",
      "typeVersion": 1,
      "position": [
        576,
        192
      ],
      "id": "5f7681c0-f1f2-4063-bd0e-1a240ade4cb5",
      "name": "If keterangan exist"
    },
    {
      "parameters": {
        "operation": "update",
        "dataTableId": {
          "__rl": true,
          "value": "49QSFI9nwJItXyvp",
          "mode": "list",
          "cachedResultName": "Financial report",
          "cachedResultUrl": "/projects/DiQC0tGxFhuiK9UM/datatables/49QSFI9nwJItXyvp"
        },
        "filters": {
          "conditions": [
            {
              "keyName": "kategori",
              "condition": "ilike",
              "keyValue": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('conditions0_Value', ``, 'string') }}"
            },
            {
              "keyName": "tanggalTransaksi",
              "keyValue": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('conditions1_Value', ``, 'string') }}"
            },
            {
              "keyName": "nominalIDR",
              "keyValue": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('conditions2_Value', ``, 'string') }}"
            }
          ]
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "nominalIDR": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('nominalIDR', ``, 'number') }}",
            "Keterangan": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Keterangan', ``, 'string') }}",
            "tanggalTransaksi": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('tanggalTransaksi', ``, 'string') }}",
            "JenisTransaksi": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('JenisTransaksi', ``, 'string') }}",
            "kategori": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('kategori', ``, 'string') }}"
          },
          "matchingColumns": [],
          "schema": [
            {
              "id": "Keterangan",
              "displayName": "Keterangan",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "tanggalTransaksi",
              "displayName": "tanggalTransaksi",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "JenisTransaksi",
              "displayName": "JenisTransaksi",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "nominalIDR",
              "displayName": "nominalIDR",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "number",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "kategori",
              "displayName": "kategori",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        }
      },
      "type": "n8n-nodes-base.dataTableTool",
      "typeVersion": 1,
      "position": [
        704,
        192
      ],
      "id": "03a8c4dc-d573-48cb-95e3-60c4489a6a16",
      "name": "Update row(s) in Data table"
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "typeVersion": 1,
      "position": [
        64,
        192
      ],
      "id": "35762f89-850f-48e1-ade3-f62c4b60d711",
      "name": "Google Gemini Chat Model",
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "operation": "deleteRows",
        "dataTableId": {
          "__rl": true,
          "value": "49QSFI9nwJItXyvp",
          "mode": "list",
          "cachedResultName": "Financial report",
          "cachedResultUrl": "/projects/DiQC0tGxFhuiK9UM/datatables/49QSFI9nwJItXyvp"
        },
        "filters": {
          "conditions": [
            {
              "keyName": "Keterangan",
              "keyValue": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('conditions0_Value', `ini adalah kolom keterangan, isinya keterangan transaksi`, 'string') }}"
            },
            {
              "keyName": "tanggalTransaksi",
              "keyValue": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('conditions1_Value', `ini kolom tangal, isinya tanggal transaksi`, 'string') }}"
            },
            {
              "keyName": "nominalIDR",
              "keyValue": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('conditions2_Value', `ini kolom nominal, isinya nominal transaksi\n`, 'string') }}"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.dataTableTool",
      "typeVersion": 1,
      "position": [
        832,
        192
      ],
      "id": "06a91a8e-7730-4a01-a569-3a1e6d55b635",
      "name": "Delete row(s) in Data table"
    }
  ],
  "connections": {
    "Finance assistent": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          },
          {
            "node": "Call 'tableToSheet'",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "Finance assistent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "When Executed by Another Workflow": {
      "main": [
        [
          {
            "node": "Finance assistent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Insert row in Data table": {
      "ai_tool": [
        [
          {
            "node": "Finance assistent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Get row(s) in Data table": {
      "ai_tool": [
        [
          {
            "node": "Finance assistent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Call 'tableToSheet'": {
      "main": [
        []
      ]
    },
    "If keterangan exist": {
      "ai_tool": [
        [
          {
            "node": "Finance assistent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Update row(s) in Data table": {
      "ai_tool": [
        [
          {
            "node": "Finance assistent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Finance assistent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Delete row(s) in Data table": {
      "ai_tool": [
        [
          {
            "node": "Finance assistent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1",
    "callerPolicy": "workflowsFromSameOwner",
    "errorWorkflow": "AvhjGJdACMdnvIEn"
  },
  "staticData": null,
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "versionId": "67888704-57d5-4d32-9944-72133edc5fb8",
  "triggerCount": 1,
  "shared": [
    {
      "updatedAt": "2025-07-29T16:36:07.607Z",
      "createdAt": "2025-07-29T16:36:07.607Z",
      "role": "workflow:owner",
      "workflowId": "efllgWgkQ1EbMi9v",
      "projectId": "DiQC0tGxFhuiK9UM"
    }
  ],
  "tags": [
    {
      "updatedAt": "2025-10-06T05:05:37.121Z",
      "createdAt": "2025-10-06T05:05:37.121Z",
      "id": "Xp9ppupv5ftjKZ28",
      "name": "Agents"
    }
  ]
}

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.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

Finance Agent. Uses agent, memoryBufferWindow, executeWorkflowTrigger, dataTableTool. Event-driven trigger; 11 nodes.

Source: https://github.com/SamVivan1/n8n-Workflows-Backup/blob/main/finance-agent-efllgWgkQ1EbMi9v.json — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

Apertura. Uses executeWorkflowTrigger, dataTable, agent, lmChatOpenAi. Event-driven trigger; 20 nodes.

Execute Workflow Trigger, Data Table, Agent +7
AI & RAG

Homelab IT Agent. Uses dataTableTool, executeWorkflowTrigger, agent, lmChatGoogleGemini. Event-driven trigger; 11 nodes.

Data Table Tool, Execute Workflow Trigger, Agent +3
AI & RAG

This n8n workflow implements an AI-powered "Local Event Finder" agent. It takes user criteria (like event type, city, date, and interests), uses a suite of search tools (Brave Web Search, Brave Local

Google Gemini Chat, Memory Buffer Window, N8N Nodes Mcp +6
AI & RAG

This n8n workflow implements an AI-powered agent that intelligently uses the Brave Search API (via an external MCP service like Smithery) to perform both web and local searches. It understands natural

Google Gemini Chat, Memory Buffer Window, Mcp Trigger +4
AI & RAG

This n8n workflow template creates an efficient data analysis system that uses Google Gemini AI to interpret user questions about spreadsheet data and processes them through a specialized sub-workflow

Google Gemini Chat, Google Sheets Tool, Execute Workflow Trigger +4