AutomationFlowsSlack & Telegram › Track Multi-broker Investment Portfolio with Google Sheets and Telegram Alerts

Track Multi-broker Investment Portfolio with Google Sheets and Telegram Alerts

ByAkash Kankariya @akash25 on n8n.io

Take control of all your investments—across multiple brokers and platforms—in one place, with live updates sent directly to your Telegram! 🌍💸 This n8n template brings together Google Sheets and Telegram so you can track your complete finance portfolio with ease, whether you’re…

Event trigger★★★★☆ complexity14 nodesGoogle SheetsTelegram TriggerTelegram
Slack & Telegram Trigger: Event Nodes: 14 Complexity: ★★★★☆ Added:

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

This workflow follows the Google Sheets → Telegram 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
{
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "6cc81650-0473-4b2a-bd23-abae6e3c81a7",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        -840,
        60
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "loose"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "376b39de-acc5-49d3-b618-4419a2aa8a25",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $('Telegram Trigger').item.json.body.message.chat.id }}",
              "rightValue": "={{ $json.myId }}"
            }
          ]
        },
        "looseTypeValidation": true
      },
      "typeVersion": 2.2
    },
    {
      "id": "a038f750-3464-4143-b8a7-e4d244c556c5",
      "name": "Get row(s) in sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -260,
        260
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 580349873,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1dakq9EhU8GrDgBsk82KvAen0N1P3FySAwNHFtG2lsLI/edit#gid=580349873",
          "cachedResultName": "Dashboard"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1dakq9EhU8GrDgBsk82KvAen0N1P3FySAwNHFtG2lsLI",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1dakq9EhU8GrDgBsk82KvAen0N1P3FySAwNHFtG2lsLI/edit?usp=drivesdk",
          "cachedResultName": "Track Finances"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "7f066010-4fd1-4ccf-a407-05694051e4f7",
      "name": "Get row(s) in sheet2",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -260,
        -40
      ],
      "parameters": {
        "options": {},
        "filtersUI": {
          "values": [
            {
              "lookupValue": "={{ $('Telegram Trigger').item.json.body.message.text.replaceAll(\"/\", \"\") }}",
              "lookupColumn": "Platform"
            }
          ]
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 580349873,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1dakq9EhU8GrDgBsk82KvAen0N1P3FySAwNHFtG2lsLI/edit#gid=580349873",
          "cachedResultName": "Dashboard"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1dakq9EhU8GrDgBsk82KvAen0N1P3FySAwNHFtG2lsLI",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1dakq9EhU8GrDgBsk82KvAen0N1P3FySAwNHFtG2lsLI/edit?usp=drivesdk",
          "cachedResultName": "Track Finances"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "1874c3d2-02e7-4faf-b592-af7c1b392d78",
      "name": "Switch",
      "type": "n8n-nodes-base.switch",
      "position": [
        -580,
        40
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "outputKey": "Specific Platform",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "6447e8ed-a64e-4d77-8b81-9716d971439d",
                    "operator": {
                      "type": "string",
                      "operation": "notEquals"
                    },
                    "leftValue": "={{ $('Telegram Trigger').item.json.body.message.text }}",
                    "rightValue": "/total"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "Total",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "3aef81cf-04a3-4eb3-9c12-accc41dd19f3",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $('Telegram Trigger').item.json.body.message.text }}",
                    "rightValue": "/total"
                  }
                ]
              },
              "renameOutput": true
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 3.2
    },
    {
      "id": "e019c20d-4f7f-447a-9b24-0b3c7d1840d5",
      "name": "Aggregate",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        -40,
        260
      ],
      "parameters": {
        "options": {},
        "aggregate": "aggregateAllItemData"
      },
      "typeVersion": 1
    },
    {
      "id": "f8e95cdd-7020-4d9e-970f-ec9013be3268",
      "name": "Code",
      "type": "n8n-nodes-base.code",
      "position": [
        220,
        260
      ],
      "parameters": {
        "jsCode": "const data = items[0].json.data;\n\nlet message = '\ud83d\udcca *Daily P&L Report*\\n\\n';\n\nconst formatCurrency = (value) =>\n  `\u20b9${value.toLocaleString('en-IN', { minimumFractionDigits: 2 })}`;\n\nconst formatPercent = (value) => `${(value * 100).toFixed(2)}%`;\n\nfor (const row of data) {\n  if (row.Platform === 'Total') continue; // Skip Total for now\n\n  message += `*\ud83d\udd39 ${row.Platform}*\\n`;\n  message += `- Invested: ${formatCurrency(row[\"Invested Amount\"])}\\n`;\n  message += `- P&L: ${formatCurrency(row[\"PNL\"])} (${formatPercent(row[\"PNL %\"])})\\n`;\n  message += `- Change: ${formatCurrency(row[\"PNL Change\"])} (*${formatPercent(row[\"PNL Change %\"]) }*)\\n`;\n  message += `- Current Value: ${formatCurrency(row[\"Invested Amount\"] + row[\"PNL\"])}\\n\\n`;\n}\n\n// Add Total Portfolio section\nconst total = data.find((d) => d.Platform === 'Total');\nif (total) {\n  message += `*\ud83d\udcc8 Total Portfolio*\\n`;\n  message += `- Total Invested: ${formatCurrency(total[\"Invested Amount\"])}\\n`;\n  message += `- Total P&L: ${formatCurrency(total[\"PNL\"])} (${formatPercent(total[\"PNL %\"])})\\n`;\n  message += `- Today's Change: ${formatCurrency(total[\"PNL Change\"])} (*${formatPercent(total[\"PNL Change %\"]) }*)\\n\\n`;\n  message += `\ud83d\udcb0 *Overall Value*: ${formatCurrency(total[\"Invested Amount\"] + total[\"PNL\"])}\\n`;\n  message += `\ud83d\udcc8 *Overall Return*: *${formatPercent(total[\"PNL %\"])}*\\n`;\n  message += `\ud83d\udcb8 *Overall P&L*: ${formatCurrency(total[\"PNL\"])}\\n`;\n}\n\nreturn [{\n  json: {\n    chat_id:$('Edit Fields').first().json.myId ,\n    text: message,\n    parse_mode: \"Markdown\"\n  }\n}];\n"
      },
      "typeVersion": 2
    },
    {
      "id": "c37ddc50-eec3-4a8e-a0b1-b5216f0dfe99",
      "name": "Code1",
      "type": "n8n-nodes-base.code",
      "position": [
        -40,
        -40
      ],
      "parameters": {
        "jsCode": "const row = items[0].json;\n\nconst formatCurrency = (value) =>\n  `\u20b9${value.toLocaleString('en-IN', { minimumFractionDigits: 2 }) }`;\n\nconst formatPercent = (value) =>\n  `${(value * 100).toFixed(2)}%`;\n\nconst invested = row[\"Invested Amount\"];\nconst pnl = row[\"PNL\"];\nconst change = row[\"PNL Change\"];\nconst pnlPercent = row[\"PNL %\"];\nconst changePercent = row[\"PNL Change %\"];\nconst currentValue = invested + pnl;\nconst platform = row[\"Platform\"].charAt(0).toUpperCase() + row[\"Platform\"].slice(1).toLowerCase();\n\nconst message = \n`\ud83d\udcca *Daily P&L Report*\\n\\n` +\n`*\ud83d\udd39 ${platform}*\\n` +\n`- Invested: ${formatCurrency(invested)}\\n` +\n`- P&L: ${formatCurrency(pnl)} (${formatPercent(pnlPercent)})\\n` +\n`- Change: ${formatCurrency(change)} (*${formatPercent(changePercent)}*)\\n` +\n`- Current Value: ${formatCurrency(currentValue)}`;\n\nreturn [{\n  json: {\n    chat_id: $('Edit Fields').first().json.myId,\n    text: message,\n    parse_mode: \"Markdown\"\n  }\n}];\n"
      },
      "typeVersion": 2
    },
    {
      "id": "61c27425-c7f1-44e2-b36a-386076e9abfd",
      "name": "Telegram Trigger",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        -1300,
        60
      ],
      "parameters": {
        "updates": [
          "message"
        ],
        "additionalFields": {
          "chatIds": "[telegram-id]"
        }
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "bc3603aa-cb9d-49f3-a9cb-83dd90b4d0b5",
      "name": "Broker PNL Update",
      "type": "n8n-nodes-base.telegram",
      "position": [
        180,
        -40
      ],
      "parameters": {
        "text": "={{ $json.text }}",
        "chatId": "={{ $json.chat_id }}",
        "additionalFields": {
          "appendAttribution": false
        }
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "61c9441a-f243-49ab-824f-2148d3d9c48f",
      "name": "Auto Update at 10AM and 4PM",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -560,
        260
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 16
            },
            {
              "triggerAtHour": 10
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "9d2f23f4-5371-45fb-8a03-f7d261f2a0dd",
      "name": "Edit Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        -1060,
        60
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "619c3c76-c797-454c-8995-3cb0c39b20d7",
              "name": "myId",
              "type": "string",
              "value": "=[telegram-id]"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "32f61af1-faea-4148-adb9-fd00ec437810",
      "name": "Total PNL Update",
      "type": "n8n-nodes-base.telegram",
      "position": [
        440,
        260
      ],
      "parameters": {
        "text": "={{ $json.text }}",
        "chatId": "={{ $json.chat_id }}",
        "additionalFields": {
          "appendAttribution": false
        }
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "948fc47b-8d28-4358-9c69-bda130e026af",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2180,
        -340
      ],
      "parameters": {
        "color": 4,
        "width": 840,
        "height": 1520,
        "content": "## **All-in-One Portfolio Tracker & Telegram Finance Updates Workflow for n8n: Multi-Broker, Real-Time, Global \ud83d\ude80**\n\n### Overview\n\nTake control of all your investments\u2014across multiple brokers and platforms\u2014in one place, with live updates sent directly to your Telegram! \ud83c\udf0d\ud83d\udcb8 This n8n template brings together Google Sheets and Telegram so you can track your complete finance portfolio with ease, whether you\u2019re in the US market, India, or anywhere in the world.\n\n### How This Workflow Works\n\n- **Tracks your investments** across multiple brokers, platforms, or asset types.\n- **Automatically sends updates to your Telegram account**\u2014see daily Profit & Loss (P&L), changes, and total returns in a rich, emoji-filled report.\n- **Works globally**, with a sample provided for the US market, but can be configured for any country and broker.\n- **Schedule automated updates** (e.g., market close/open) or get real-time insights on demand with Telegram commands.\n\n### Highlights & Features\n\n- \ud83d\udcca **Unified Dashboard**: Integrate all your broker data in one Google Sheet for effortless monitoring (Google Sheet Link - https://docs.google.com/spreadsheets/d/1dakq9EhU8GrDgBsk82KvAen0N1P3FySAwNHFtG2lsLI/edit?usp=sharing)\n- \ud83e\udd16 **Interactive Telegram Bot**: Send `/total` or a specific broker\u2019s name in the Telegram chat to get instant, formatted portfolio summaries.\n- \u23f0 **Automatic Notifications**: Receive scheduled P&L summaries at market open and close.\n- \ud83d\uddc2\ufe0f **Customizable for Any Region or Broker**: Just update your Google Sheet with the platforms or brokers you use\u2014including those in the US, Europe, Asia, etc.\n- \ud83d\udd10 **Secure and Private**: Only your pre-set Telegram user or chat receives the sensitive financial update.\n\n### Example (For US Market)\n\nLet\u2019s imagine you have portfolios with **Robinhood**, **E*TRADE**, and **Charles Schwab**. Every day at 10AM and 4PM Eastern Time, or whenever you send the `/total` command, you get this on Telegram:\n\n```\n\ud83d\udcca Daily P&L Report\n\n\ud83d\udd39 Robinhood\n- Invested: $5,000.00\n- P&L: $250.00 (5.00%)\n- Change: $30.00 (0.60%)\n- Current Value: $5,250.00\n\n\ud83d\udd39 E*TRADE\n- Invested: $8,000.00\n- P&L: $400.00 (5.00%)\n- Change: $45.00 (0.56%)\n- Current Value: $8,400.00\n\n\ud83d\udcc8 Total Portfolio\n- Total Invested: $13,000.00\n- Total P&L: $650.00 (5.00%)\n- Today's Change: $75.00 (0.58%)\n\n\ud83d\udcb0 Overall Value: $13,650.00\n\ud83d\udcc8 Overall Return: 5.00%\n\ud83d\udcb8 Overall P&L: $650.00\n```\n\n### Who Is This For?\n\n- Investors managing accounts across several brokers.\n- Traders seeking real-time daily summaries.\n- Portfolio managers wanting one consolidated, secure view.\n- Users in any country, for any major market.\n\n\n### Make It Yours! \ud83c\udf0f\n\nCustomize the sheet and workflow for your unique blend of accounts, currencies, and platforms\u2014track mutual funds, stocks, ETFs, cryptos, or more. Get peace of mind with every notification, organized and delivered just for you!\n\n**Start tracking smarter, not harder. Transform your finance workflow with n8n + Telegram today! \ud83d\ude80**"
      },
      "typeVersion": 1
    },
    {
      "id": "90280429-7ef1-4fa2-b7dc-5a777faa0b91",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1320,
        -340
      ],
      "parameters": {
        "color": 3,
        "width": 780,
        "height": 300,
        "content": "\n### Easy Setup Steps\n\n1. **Copy the Template to Your n8n Instance**: Just import the provided workflow JSON.\n2. **Configure Your Google Sheet**:  \n   - List all your brokers/platforms as rows (US, EU, or any other market).\n   - Update your credentials in n8n for Google Sheets and Telegram.\n3. **Set Your Telegram Chat ID**: Secure, so only you or your group receive updates.\n4. **Customize Schedules**: Change times for your local market hours or as you prefer.\n5. **Send Commands in Telegram**:  \n   - `/total` for overall summary\n   - `/Robinhood`, `/ETRADE`, etc., for individual broker updates"
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code": {
      "main": [
        [
          {
            "node": "Total PNL Update",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code1": {
      "main": [
        [
          {
            "node": "Broker PNL Update",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch": {
      "main": [
        [
          {
            "node": "Get row(s) in sheet2",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Get row(s) in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate": {
      "main": [
        [
          {
            "node": "Code",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Telegram Trigger": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Broker PNL Update": {
      "main": [
        []
      ]
    },
    "Get row(s) in sheet": {
      "main": [
        [
          {
            "node": "Aggregate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get row(s) in sheet2": {
      "main": [
        [
          {
            "node": "Code1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Auto Update at 10AM and 4PM": {
      "main": [
        [
          {
            "node": "Get row(s) in sheet",
            "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

Take control of all your investments—across multiple brokers and platforms—in one place, with live updates sent directly to your Telegram! 🌍💸 This n8n template brings together Google Sheets and Telegram so you can track your complete finance portfolio with ease, whether you’re…

Source: https://n8n.io/workflows/6317/ — original creator credit. Request a take-down →

More Slack & Telegram workflows → · Browse all categories →

Related workflows

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

Slack & Telegram

This workflow provides a complete solution for handling Telegram Stars payments, invoicing and refunds using n8n. It automates the process of sending invoices, managing pre-checkout approvals, recordi

HTTP Request, Execute Workflow Trigger, Google Sheets +2
Slack & Telegram

clients kept booking meetings during my prayer times. i'd either miss a prayer or scramble to reschedule. the problem wasn't the clients — it was that my calendar had no blocked windows for salah. i n

Telegram Trigger, HTTP Request, Google Calendar +3
Slack & Telegram

This workflow is a powerful reputation management tool designed to proactively filter customer reviews. It helps you encourage positive reviews on Google while capturing negative feedback privately be

Telegram Trigger, Google Sheets, Telegram
Slack & Telegram

This workflow is designed to automate your e-commerce order processing by instantly syncing new Jotform submissions with your internal systems and immediately notifying the customer on Telegram.

Jot Form Trigger, Telegram, Data Table +3
Slack & Telegram

This template is perfect for freelancers, small business owners, or financial assistants who want to record and approve financial transactions like income and expenses directly from Telegram, without

Telegram Trigger, Telegram, Google Sheets