AutomationFlowsAI & RAG › Automate Financial Transaction Tracking with Gmail, Gpt, Notion & Telegram…

Automate Financial Transaction Tracking with Gmail, Gpt, Notion & Telegram…

Original n8n title: Automate Financial Transaction Tracking with Gmail, Gpt, Notion & Telegram Alerts

ByAnoop @anoop on n8n.io

This workflow is for individuals or entrepreneurs who receive bank alerts, invoices, and payment emails in Gmail and want them to be automatically organized in Notion — while also receiving quick Telegram notifications for each transaction.

Event trigger★★★★☆ complexityAI-powered21 nodesGmail TriggerText ClassifierTelegramNotion ToolAgentOpenRouter Chat
AI & RAG Trigger: Event Nodes: 21 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow corresponds to n8n.io template #10428 — we link there as the canonical source.

This workflow follows the Agent → Gmail 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
{
  "id": "AWrjo9rRQdLaH6oQ",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Logging invoice/transaction records in Notion directly from your gmail accounts",
  "tags": [],
  "nodes": [
    {
      "id": "0cedf57b-fd46-4aa1-8f1b-6ffa36a79e96",
      "name": "forwarding",
      "type": "n8n-nodes-base.gmailTrigger",
      "position": [
        1600,
        80
      ],
      "parameters": {
        "filters": {},
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        }
      },
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "8a483cc2-9ec3-4b3c-9713-4968b9e956ef",
      "name": "Classify",
      "type": "@n8n/n8n-nodes-langchain.textClassifier",
      "position": [
        2080,
        224
      ],
      "parameters": {
        "options": {},
        "inputText": "=Subject: {{ $json.Subject }}\n\n{{ $json.snippet }}\n",
        "categories": {
          "categories": [
            {
              "category": "Debit Invoice",
              "description": "=If it is an invoice of future payment or a pre debit notification and not a debit transaction"
            },
            {
              "category": "Debit Transaction",
              "description": "=If some amount has been debited from your account"
            },
            {
              "category": "Credit Transaction",
              "description": "=If some amount has been credited to your account"
            },
            {
              "category": "Credit Invoice",
              "description": "=If it is an invoice of future receival of funds to your account and not a credit transaction to your bank account"
            }
          ]
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "cb53694f-f9ce-441e-a7ef-ca6639d0b7a7",
      "name": "support@bayesian-labs",
      "type": "n8n-nodes-base.gmailTrigger",
      "position": [
        1600,
        464
      ],
      "parameters": {
        "filters": {},
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        }
      },
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "32f75b58-2b41-4cfc-b06b-7d6e24a221f7",
      "name": "anoop.karnik@bayesian-labs",
      "type": "n8n-nodes-base.gmailTrigger",
      "position": [
        1600,
        272
      ],
      "parameters": {
        "filters": {},
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        }
      },
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "4cd774d6-960d-4598-91bb-4af218121049",
      "name": "Send Message",
      "type": "n8n-nodes-base.telegram",
      "position": [
        2976,
        96
      ],
      "parameters": {
        "text": "=This transaction email is from {{ $('Set Email Data').item.json.From }} to {{ $('Set Email Data').item.json.To }}\n\nSubject: {{ $('Set Email Data').item.json.Subject }}\n\n{{ $('Set Email Data').item.json.snippet }}",
        "chatId": "={{chat_id}}",
        "additionalFields": {
          "appendAttribution": false
        }
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "3374d3d1-f916-4dfd-827e-4678b697830e",
      "name": "Create Invoice Tool",
      "type": "n8n-nodes-base.notionTool",
      "position": [
        2704,
        256
      ],
      "parameters": {
        "title": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Title', ``, 'string') }}",
        "options": {},
        "resource": "databasePage",
        "databaseId": {
          "__rl": true,
          "mode": "list",
          "value": "82d3a838-5c66-4efe-97f6-c415dd0c62ef",
          "cachedResultUrl": "https://www.notion.so/82d3a8385c664efe97f6c415dd0c62ef",
          "cachedResultName": "Financial Transaction"
        },
        "propertiesUi": {
          "propertyValues": [
            {
              "key": "Type|select",
              "selectValue": "={{ \"Invoice\" }}"
            },
            {
              "key": "Cost|number",
              "numberValue": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('propertyValues1_Number', ``, 'number') }}"
            },
            {
              "key": "Transaction Description|rich_text",
              "textContent": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('propertyValues2_Text', ``, 'string') }}"
            }
          ]
        }
      },
      "credentials": {
        "notionApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "4f3acda7-3c4e-4f36-9044-cff3f405e510",
      "name": "Accountant Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        2560,
        32
      ],
      "parameters": {
        "text": "=Subject: {{ $json.Subject }}\n\nMessage: {{ $json.snippet }}",
        "options": {
          "systemMessage": "=You are a Accountant Agent.\n\nFor every incoming email, use the subject and message to determine if it describes a invoice for a debit transaction for the future\n\n    Create a notion database page using the \u201cCreate Invoice Tool\u201d tool.\n\n    If the amount is in dollars (USD), automatically convert it to rupees (INR) using the latest available exchange rate (or \u20b988/USD if none given).\n\n    For every created invoice, add a clear title, the INR cost, and a concise description based on the email\u2019s subject and message."
        },
        "promptType": "define"
      },
      "typeVersion": 2.1
    },
    {
      "id": "2190e9fd-0caa-45d2-ba62-79aec69058a0",
      "name": "Accountant Agent1",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        2560,
        432
      ],
      "parameters": {
        "text": "=Subject: {{ $json.Subject }}\n\nMessage: {{ $json.snippet }}",
        "options": {
          "systemMessage": "=You are a Accountant Agent.\n\nFor every incoming email, use the subject and message to determine if it describes a debit transaction.\n\n    Create a notion database page using the \u201cCreate Transaction Tool\u201d tool.\n\n    If the amount is in dollars (USD), automatically convert it to rupees (INR) using the latest available exchange rate (or \u20b988/USD if none given).\n\n    For every created debit transaction, add a clear title, the INR cost, and a concise description based on the email\u2019s subject and message."
        },
        "promptType": "define"
      },
      "typeVersion": 2.1
    },
    {
      "id": "208f9201-fb04-4789-b5f0-e0b19a8e1812",
      "name": "Accountant Agent2",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        2560,
        832
      ],
      "parameters": {
        "text": "=Subject: {{ $json.Subject }}\n\nMessage: {{ $json.snippet }}",
        "options": {
          "systemMessage": "=You are a Accountant Agent.\n\nFor every incoming email, use the subject and message to determine if it describes a credit to your account or credit transaction.\n\n    Create a notion database page using the \u201cCreate Income Tool\u201d tool.\n\n    If the amount is in dollars (USD), automatically convert it to rupees (INR) using the latest available exchange rate (or \u20b988/USD if none given).\n\n    For every created credit transaction, add a clear title, the INR cost, and a concise description based on the email\u2019s subject and message."
        },
        "promptType": "define"
      },
      "typeVersion": 2.1
    },
    {
      "id": "257d35a6-d0d6-4f94-85e4-26e617139512",
      "name": "Create Transction Tool",
      "type": "n8n-nodes-base.notionTool",
      "position": [
        2656,
        656
      ],
      "parameters": {
        "title": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Title', ``, 'string') }}",
        "options": {},
        "resource": "databasePage",
        "databaseId": {
          "__rl": true,
          "mode": "list",
          "value": "82d3a838-5c66-4efe-97f6-c415dd0c62ef",
          "cachedResultUrl": "https://www.notion.so/82d3a8385c664efe97f6c415dd0c62ef",
          "cachedResultName": "Financial Transaction"
        },
        "propertiesUi": {
          "propertyValues": [
            {
              "key": "Type|select",
              "selectValue": "={{ \"Debit\" }}"
            },
            {
              "key": "Cost|number",
              "numberValue": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('propertyValues1_Number', ``, 'number') }}"
            },
            {
              "key": "Transaction Description|rich_text",
              "textContent": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('propertyValues2_Text', ``, 'string') }}"
            }
          ]
        }
      },
      "credentials": {
        "notionApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "dce36af5-9b57-42c0-b4a3-272a9b88a5e9",
      "name": "Create Income Tool",
      "type": "n8n-nodes-base.notionTool",
      "position": [
        2640,
        1056
      ],
      "parameters": {
        "title": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Title', ``, 'string') }}",
        "options": {},
        "resource": "databasePage",
        "databaseId": {
          "__rl": true,
          "mode": "list",
          "value": "2501d3fa-a0a0-80c5-b74e-d64686678b0f",
          "cachedResultUrl": "https://www.notion.so/2501d3faa0a080c5b74ed64686678b0f",
          "cachedResultName": "Income"
        },
        "propertiesUi": {
          "propertyValues": [
            {
              "key": "Received Amount|number",
              "numberValue": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('propertyValues1_Number', ``, 'number') }}"
            },
            {
              "key": "Description|rich_text",
              "textContent": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('propertyValues2_Text', ``, 'string') }}"
            },
            {
              "key": "Type|select",
              "selectValue": "={{ \"Credit\" }}"
            }
          ]
        }
      },
      "credentials": {
        "notionApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "e0378b46-f792-4727-9b15-40e0f9e5e50d",
      "name": "Set Email Data",
      "type": "n8n-nodes-base.set",
      "position": [
        1904,
        256
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "fffd75f0-e629-4e35-8ec6-0949df5ac639",
              "name": "snippet",
              "type": "string",
              "value": "={{ $json.snippet }}"
            },
            {
              "id": "bf222711-42a2-4dd9-be79-5e72631e9a61",
              "name": "To",
              "type": "string",
              "value": "={{ $json.To }}"
            },
            {
              "id": "40d42775-cf86-4d5d-93a2-79dac83c79b6",
              "name": "From",
              "type": "string",
              "value": "={{ $json.From }}"
            },
            {
              "id": "1d4e0cd9-d13e-45f1-911e-2762c98140f5",
              "name": "Subject",
              "type": "string",
              "value": "={{ $json.Subject }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "c0a1d0e4-b8d1-406d-bbad-c9a950d667a1",
      "name": "Accountant Agent3",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        2560,
        1344
      ],
      "parameters": {
        "text": "=Subject: {{ $json.Subject }}\n\nMessage: {{ $json.snippet }}",
        "options": {
          "systemMessage": "=You are a Accountant Agent.\n\nFor every incoming email, use the subject and message to determine if it describes a credit invoice.\n\n    Create a notion database page using the \u201cCreate Income Tool 1\u201d tool.\n\n    If the amount is in dollars (USD), automatically convert it to rupees (INR) using the latest available exchange rate (or \u20b988/USD if none given).\n\n    For every created credit transaction, add a clear title, the INR cost, and a concise description based on the email\u2019s subject and message."
        },
        "promptType": "define"
      },
      "typeVersion": 2.1
    },
    {
      "id": "1dae2491-a946-4294-a1bf-d06453d5bddf",
      "name": "Create Income Tool1",
      "type": "n8n-nodes-base.notionTool",
      "position": [
        2640,
        1568
      ],
      "parameters": {
        "title": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Title', ``, 'string') }}",
        "options": {},
        "resource": "databasePage",
        "databaseId": {
          "__rl": true,
          "mode": "list",
          "value": "2501d3fa-a0a0-80c5-b74e-d64686678b0f",
          "cachedResultUrl": "https://www.notion.so/2501d3faa0a080c5b74ed64686678b0f",
          "cachedResultName": "Income"
        },
        "propertiesUi": {
          "propertyValues": [
            {
              "key": "Received Amount|number",
              "numberValue": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('propertyValues1_Number', ``, 'number') }}"
            },
            {
              "key": "Description|rich_text",
              "textContent": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('propertyValues2_Text', ``, 'string') }}"
            },
            {
              "key": "Type|select",
              "selectValue": "={{ \"Invoice\" }}"
            }
          ]
        }
      },
      "credentials": {
        "notionApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "cb1b70b9-41ef-4707-a151-77c4395e45e8",
      "name": "gpt-5",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        2576,
        256
      ],
      "parameters": {
        "model": "openai/gpt-5",
        "options": {}
      },
      "credentials": {
        "openRouterApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "f0ce6083-37cb-4997-a2d2-17a8878aff55",
      "name": "gpt-5-nano",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        2064,
        480
      ],
      "parameters": {
        "model": "openai/gpt-5-nano",
        "options": {}
      },
      "credentials": {
        "openRouterApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "f1153d7e-4b76-49cc-a809-de1a19c55177",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        128,
        -48
      ],
      "parameters": {
        "width": 1200,
        "height": 896,
        "content": "# Logging invoice/transaction records in Notion directly from your gmail accounts\n\n### How it works\nThe workflow acts as an **AI-powered Accountant Agent** that reads incoming Gmail messages and decides whether each email represents a **Debit Transaction, Credit Transaction, Debit Invoice, or Credit Invoice**.  \n\n- The **Gmail Trigger** watches your selected inboxes (like `forwarding@bayesian-labs.com`, `support@bayesian-labs`, `anoop.karnik@bayesian-labs`).  \n- The **Classifier (GPT-5-nano)** determines the correct transaction type.  \n- The appropriate **Agent (GPT-5)** then extracts amount, currency, and description details.  \n- The Agent uses Notion API tools to log structured data into your **Personal Finance System** Notion template (Financial Transactions & Income databases).  \n- Finally, a **Telegram notification** is sent summarizing the entry (From, To, Subject, Snippet).  \n\nIn short: every time your bank emails you \u2014 Notion gets updated, and you get notified.\n\n### How to set up\n1. **Duplicate the [Personal Finance System Notion template](https://www.notion.so/templates/personal-finance-system)** into your workspace.  \n2. Create a **Telegram Bot** with BotFather \u2192 copy the bot token and your chat ID.  \n3. Generate an **OpenRouter API key** for GPT-5 / GPT-5-nano.  \n4. Create a **Notion Integration Token** and connect it to your duplicated finance databases.  \n5. Add your **Gmail accounts** (`forwarding@`, `support@`, and/or personal Gmail) under **Gmail OAuth2 credentials** in n8n.  \n6. Import the workflow JSON into n8n \u2192 fill in the credential names as listed below:  \n   - `n8n_cloud_regular_usage` \u2192 OpenRouter  \n   - `Notion account` \u2192 Notion API  \n   - `Accountant AI` \u2192 Telegram Bot  \n   - Gmail OAuth2 for each inbox trigger  \n\nOnce active, n8n polls Gmail every minute, classifies emails, updates Notion, and sends Telegram updates.\n\n### Customization\nYou can extend this workflow to:  \n- Track **credit card statements**, **subscriptions**, or **payroll notifications**.  \n- Add **Slack or WhatsApp** alerts alongside Telegram.  \n- Include **live FX rates** for USD\u2192INR conversion using an API node.  \n- Connect **Google Sheets** as a backup ledger or export target.  \n- Add **error-handling branches** to mark Gmail messages as processed or label them \u201cLogged to Notion\u201d."
      },
      "typeVersion": 1
    },
    {
      "id": "7b761225-99d9-43f5-be3d-223b504aa415",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1520,
        -32
      ],
      "parameters": {
        "color": 7,
        "height": 656,
        "content": "## Step 1 - Trigger"
      },
      "typeVersion": 1
    },
    {
      "id": "28a922f0-a013-49ec-9a0d-a496cccee865",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1840,
        -32
      ],
      "parameters": {
        "color": 7,
        "width": 544,
        "height": 688,
        "content": "## Step 2 - Classification"
      },
      "typeVersion": 1
    },
    {
      "id": "4896bc94-9960-4ecf-be5d-9813dcf6d47d",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2464,
        -32
      ],
      "parameters": {
        "color": 7,
        "width": 368,
        "height": 1776,
        "content": "## Step 3 - Agent"
      },
      "typeVersion": 1
    },
    {
      "id": "0fe5c44e-f02d-4458-94ef-aead2890bcc6",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2912,
        -32
      ],
      "parameters": {
        "color": 7,
        "height": 352,
        "content": "## Step 4 - Send Message"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "c517f750-d802-48ee-bc9d-d0b6f6d770d0",
  "connections": {
    "gpt-5": {
      "ai_languageModel": [
        [
          {
            "node": "Accountant Agent",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Accountant Agent1",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Accountant Agent2",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Accountant Agent3",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Classify": {
      "main": [
        [
          {
            "node": "Accountant Agent",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Accountant Agent1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Accountant Agent2",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Accountant Agent3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "forwarding": {
      "main": [
        [
          {
            "node": "Set Email Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "gpt-5-nano": {
      "ai_languageModel": [
        [
          {
            "node": "Classify",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Set Email Data": {
      "main": [
        [
          {
            "node": "Classify",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Accountant Agent": {
      "main": [
        [
          {
            "node": "Send Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Accountant Agent1": {
      "main": [
        [
          {
            "node": "Send Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Accountant Agent2": {
      "main": [
        [
          {
            "node": "Send Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Accountant Agent3": {
      "main": [
        [
          {
            "node": "Send Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Income Tool": {
      "ai_tool": [
        [
          {
            "node": "Accountant Agent2",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Create Income Tool1": {
      "ai_tool": [
        [
          {
            "node": "Accountant Agent3",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Create Invoice Tool": {
      "ai_tool": [
        [
          {
            "node": "Accountant Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "support@bayesian-labs": {
      "main": [
        [
          {
            "node": "Set Email Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Transction Tool": {
      "ai_tool": [
        [
          {
            "node": "Accountant Agent1",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "anoop.karnik@bayesian-labs": {
      "main": [
        [
          {
            "node": "Set Email Data",
            "type": "main",
            "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.

Pro

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

About this workflow

This workflow is for individuals or entrepreneurs who receive bank alerts, invoices, and payment emails in Gmail and want them to be automatically organized in Notion — while also receiving quick Telegram notifications for each transaction.

Source: https://n8n.io/workflows/10428/ — 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

ITfest. Uses telegramTrigger, telegram, textClassifier, agent. Event-driven trigger; 70 nodes.

Telegram Trigger, Telegram, Text Classifier +6
AI & RAG

This workflow contains community nodes that are only compatible with the self-hosted version of n8n.

Agent, OpenAI Chat, OpenAI +8
AI & RAG

Use cases are many: Manage your Gmail inbox, schedule calendar events, and handle contact details — all from one central AI-powered assistant. Perfect for freelancers managing clients, agency owners w

Agent, Gmail Tool, Google Gemini Chat +10
AI & RAG

This workflow automatically transforms your messy inbox into a neatly organized space while ensuring you never miss a critical message. It connects to your Gmail account and triggers for every new ema

Gmail Trigger, Output Parser Structured, Gmail Tool +8
AI & RAG

Automate admin tasks for manufacturing companies by processing emails, extracting key data from invoices & purchase orders, and delivering instant alerts via Gmail and Telegram.

Gmail Trigger, Gmail, Agent +4