{
  "name": "Control your n8n instance remotely with Telegram bot commands",
  "nodes": [
    {
      "id": "7e8112a5-41a0-4e2e-b2ee-bef7b4a2a2c0",
      "name": "Telegram Trigger",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        40,
        -180
      ]
    },
    {
      "id": "2ea34661-3183-4e5b-876b-7d823b15b6e2",
      "name": "Cmd Parse",
      "type": "n8n-nodes-base.set",
      "position": [
        260,
        -180
      ]
    },
    {
      "id": "ac92629e-1a7c-45ed-88e5-cb399ccb97fd",
      "name": "Cmd Switch",
      "type": "n8n-nodes-base.switch",
      "position": [
        480,
        -320
      ]
    },
    {
      "id": "3982240a-01cf-4e67-b342-3d93db95823e",
      "name": "Execute Arg",
      "type": "n8n-nodes-base.if",
      "position": [
        840,
        -160
      ]
    },
    {
      "id": "89cd3673-334b-48dd-9a7c-cf75fb057731",
      "name": "Activate Workflow",
      "type": "n8n-nodes-base.n8n",
      "position": [
        2440,
        20
      ]
    },
    {
      "id": "21192505-acee-40cf-9919-f45ad47889d1",
      "name": "Deactivate Workflow",
      "type": "n8n-nodes-base.n8n",
      "position": [
        2440,
        200
      ]
    },
    {
      "id": "c20275b8-d100-4337-8c3e-4a14753a65e0",
      "name": "Activate Arg",
      "type": "n8n-nodes-base.if",
      "position": [
        840,
        20
      ]
    },
    {
      "id": "0b7ae6dc-20bf-49ef-80cc-811f9c403654",
      "name": "Deactivate Arg",
      "type": "n8n-nodes-base.if",
      "position": [
        840,
        200
      ]
    },
    {
      "id": "16672e7a-0c6d-4c16-b908-de68ce41d686",
      "name": "Arg Error",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1140,
        660
      ]
    },
    {
      "id": "f512c74c-e552-472f-ba4f-aa02a4bed45c",
      "name": "Cmd Error",
      "type": "n8n-nodes-base.telegram",
      "position": [
        840,
        660
      ]
    },
    {
      "id": "409139e8-69b0-48c9-9e79-0d46a3f8b538",
      "name": "Executed",
      "type": "n8n-nodes-base.telegram",
      "position": [
        2740,
        -160
      ]
    },
    {
      "id": "a3065a7d-3306-46a4-948f-2b055ed7705b",
      "name": "Activated",
      "type": "n8n-nodes-base.telegram",
      "position": [
        2740,
        20
      ]
    },
    {
      "id": "8fb19383-e6de-4f59-a780-11c8092a9240",
      "name": "Deactivated",
      "type": "n8n-nodes-base.telegram",
      "position": [
        2740,
        200
      ]
    },
    {
      "id": "4dba4e0e-e012-4cbf-8a44-aadb0e27240a",
      "name": "Workflow Name Error",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1920,
        660
      ]
    },
    {
      "id": "b9aec466-d089-443c-b282-4c1892eebc32",
      "name": "List Workflows 1",
      "type": "n8n-nodes-base.n8n",
      "position": [
        1140,
        -160
      ]
    },
    {
      "id": "773f2140-a5c9-4744-9874-92fb3da5c7c8",
      "name": "List Workflows 2",
      "type": "n8n-nodes-base.n8n",
      "position": [
        1140,
        20
      ]
    },
    {
      "id": "e752a9b4-dda9-4ed9-be63-8c47f376fabe",
      "name": "List Workflows 3",
      "type": "n8n-nodes-base.n8n",
      "position": [
        1140,
        200
      ]
    },
    {
      "id": "efb0a48f-5ab8-4e2a-afc4-8508f557e3f6",
      "name": "If Inactive",
      "type": "n8n-nodes-base.if",
      "position": [
        1920,
        20
      ]
    },
    {
      "id": "b4392db6-84e2-46c5-9e0b-0d8aae707e05",
      "name": "If Active",
      "type": "n8n-nodes-base.if",
      "position": [
        1920,
        200
      ]
    },
    {
      "id": "3f700f24-d9fb-4e9d-81b9-51941dbd865f",
      "name": "Workflow Active Error",
      "type": "n8n-nodes-base.telegram",
      "position": [
        2220,
        660
      ]
    },
    {
      "id": "a078cf85-7ae3-41ca-8707-ea2732ebc683",
      "name": "Workflow Inactive Error",
      "type": "n8n-nodes-base.telegram",
      "position": [
        2220,
        840
      ]
    },
    {
      "id": "0d111278-5067-4340-933f-8aca588fd880",
      "name": "List Workflows ",
      "type": "n8n-nodes-base.n8n",
      "position": [
        840,
        -340
      ]
    },
    {
      "id": "39d952ee-0a7e-4c3b-b5a1-1e2a27dd8abc",
      "name": "Help",
      "type": "n8n-nodes-base.telegram",
      "position": [
        840,
        -900
      ]
    },
    {
      "id": "eb4ef3de-ac0d-4387-9066-3d5297409158",
      "name": "Workflow List",
      "type": "n8n-nodes-base.set",
      "position": [
        1380,
        -340
      ]
    },
    {
      "id": "b9153d0c-24fe-44d7-9d6a-ad4f235d304c",
      "name": "Workflows",
      "type": "n8n-nodes-base.telegram",
      "position": [
        2740,
        -340
      ]
    },
    {
      "id": "02e0030f-743f-4491-bf86-c5c39e4db4ba",
      "name": "Workflow Found 1",
      "type": "n8n-nodes-base.if",
      "position": [
        1620,
        -160
      ]
    },
    {
      "id": "6dd81360-e878-4ee3-b73f-8f078824f536",
      "name": "Workflow Found 2",
      "type": "n8n-nodes-base.if",
      "position": [
        1620,
        20
      ]
    },
    {
      "id": "4c2aad63-9d8a-4f45-8633-92b9742b0029",
      "name": "Workflow Found 3",
      "type": "n8n-nodes-base.if",
      "position": [
        1620,
        200
      ]
    },
    {
      "id": "bdce9b81-d4a0-4be3-9abe-df48b2e8d633",
      "name": "Not Archived",
      "type": "n8n-nodes-base.filter",
      "position": [
        1140,
        -340
      ]
    },
    {
      "id": "2fb0bf45-2f2f-4c3a-a6ef-4077c5f1a0de",
      "name": "Find Workflow 1",
      "type": "n8n-nodes-base.filter",
      "position": [
        1380,
        -160
      ]
    },
    {
      "id": "e6532b4b-5791-4469-add8-49a23076d63e",
      "name": "Find Workflow 2",
      "type": "n8n-nodes-base.filter",
      "position": [
        1380,
        20
      ]
    },
    {
      "id": "17f4b9aa-c855-4a40-9364-3c71db43c48c",
      "name": "Find Workflow 3",
      "type": "n8n-nodes-base.filter",
      "position": [
        1380,
        200
      ]
    },
    {
      "id": "6b8abadf-6bbf-4332-bd95-c1f2b8b29e62",
      "name": "Executions Arg",
      "type": "n8n-nodes-base.if",
      "position": [
        840,
        380
      ]
    },
    {
      "id": "3ee440a3-db15-4398-b337-246dccda4032",
      "name": "List Workflows 4",
      "type": "n8n-nodes-base.n8n",
      "position": [
        1140,
        380
      ]
    },
    {
      "id": "8391a4ec-b382-4062-92b5-0e174c606fd5",
      "name": "Find Workflow 4",
      "type": "n8n-nodes-base.filter",
      "position": [
        1380,
        380
      ]
    },
    {
      "id": "e6f15777-a0d8-4f2b-a086-f97887b1844a",
      "name": "Workflow Found 4",
      "type": "n8n-nodes-base.if",
      "position": [
        1620,
        380
      ]
    },
    {
      "id": "1527438a-4600-4255-9034-0e5af7bd5581",
      "name": "List Workflow Executions",
      "type": "n8n-nodes-base.n8n",
      "position": [
        1920,
        380
      ]
    },
    {
      "id": "d9d7c222-ea4c-412a-98da-cd35f86f10f2",
      "name": "Executions Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        2220,
        380
      ]
    },
    {
      "id": "589ffd48-f9d6-464d-93ff-a0bed5ccf528",
      "name": "Executions",
      "type": "n8n-nodes-base.telegram",
      "position": [
        2740,
        380
      ]
    },
    {
      "id": "00bf4b6a-ec2f-4adb-a14c-38bafe69d7f2",
      "name": "Executions Message",
      "type": "n8n-nodes-base.code",
      "position": [
        2440,
        380
      ]
    },
    {
      "id": "ec1c2591-4733-4057-9b0c-066b48514df8",
      "name": "Workflows Message",
      "type": "n8n-nodes-base.code",
      "position": [
        2440,
        -340
      ]
    },
    {
      "id": "003b5a55-64e4-4cf6-9f8a-8cf94a8e515b",
      "name": "Execute Workflow",
      "type": "n8n-nodes-base.executeWorkflow",
      "position": [
        2440,
        -160
      ]
    },
    {
      "id": "9687696c-62ec-4df1-a693-2da19675e6f1",
      "name": "Execution Error",
      "type": "n8n-nodes-base.telegram",
      "position": [
        2740,
        840
      ]
    },
    {
      "id": "6af5662a-61dc-430c-8508-d910b2dc5617",
      "name": "Activation Error",
      "type": "n8n-nodes-base.telegram",
      "position": [
        2740,
        1020
      ]
    },
    {
      "id": "77ab60c5-a1ef-4db7-8432-aece8a15ff17",
      "name": "Deactivation Error",
      "type": "n8n-nodes-base.telegram",
      "position": [
        2740,
        1200
      ]
    },
    {
      "id": "d969f0a8-3589-4087-87b6-9404fec6a231",
      "name": "List Archived",
      "type": "n8n-nodes-base.n8n",
      "position": [
        840,
        -520
      ]
    },
    {
      "id": "ef67572a-b733-4c5b-9783-a71638ebc597",
      "name": "Only Archived",
      "type": "n8n-nodes-base.filter",
      "position": [
        1140,
        -520
      ]
    },
    {
      "id": "937ee3d9-3604-454b-86f6-ab069bdc3caf",
      "name": "Archived Message",
      "type": "n8n-nodes-base.code",
      "position": [
        2440,
        -520
      ]
    },
    {
      "id": "d344e304-fb23-4d2f-8bec-def3cab224e9",
      "name": "Cleanup",
      "type": "n8n-nodes-base.telegram",
      "position": [
        2740,
        -520
      ]
    },
    {
      "id": "f9dfff04-c969-4198-b541-9f7f1d00fd2c",
      "name": "Archived List",
      "type": "n8n-nodes-base.set",
      "position": [
        1380,
        -520
      ]
    },
    {
      "id": "b21a04cc-93d2-418f-84d3-e1b48c3b3e8d",
      "name": "Delete Archived",
      "type": "n8n-nodes-base.n8n",
      "position": [
        1620,
        -520
      ]
    },
    {
      "id": "fa38c779-7c83-442b-a5d0-7b69890abab9",
      "name": "Backup Workflows",
      "type": "n8n-nodes-base.executeCommand",
      "position": [
        840,
        -700
      ]
    },
    {
      "id": "0313329a-6d7a-41fa-a34c-7267f20a1e60",
      "name": "Backup Credentials",
      "type": "n8n-nodes-base.executeCommand",
      "position": [
        1140,
        -700
      ]
    },
    {
      "id": "153ce344-c050-4ff9-a012-d69e7b80006d",
      "name": "Backup Tarball",
      "type": "n8n-nodes-base.executeCommand",
      "position": [
        1380,
        -700
      ]
    },
    {
      "id": "91b1718a-197e-409d-b564-0618d271bb6b",
      "name": "Backup",
      "type": "n8n-nodes-base.telegram",
      "position": [
        2740,
        -700
      ]
    },
    {
      "id": "dd089984-95f3-4093-8a42-679534411186",
      "name": "Cleanup Files",
      "type": "n8n-nodes-base.executeCommand",
      "position": [
        2740,
        -860
      ]
    },
    {
      "id": "62dc0a94-036e-4872-b571-9e850dcb29c7",
      "name": "Read File",
      "type": "n8n-nodes-base.readWriteFile",
      "position": [
        2440,
        -700
      ]
    },
    {
      "id": "f715531e-cd42-41c3-92c7-4a6d9230f84c",
      "name": "Backup Error",
      "type": "n8n-nodes-base.telegram",
      "position": [
        2740,
        660
      ]
    },
    {
      "id": "0d647969-f6e8-4e48-86dd-a359a1797609",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -100,
        -1280
      ],
      "parameters": {
        "width": 680,
        "height": 940,
        "content": "# Telegram n8n Commander\nRemotely manage and operate your n8n instance from Telegram with powerful admin commands.\n\nThis workflow connects your n8n instance with a Telegram Bot, giving you remote cont"
      }
    },
    {
      "id": "2b6e98a5-1197-4d5c-b589-220bce2ecd3e",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -100,
        140
      ],
      "parameters": {
        "width": 680,
        "height": 1260,
        "content": "# Setup\nTo set up this workflow you will need credentials for your Telegram bot and for your n8n API. You will need to edit all Telegram Nodes and n8n Nodes.\n\n## Credentials\nFirst of all, let's create"
      }
    },
    {
      "id": "6685b9d2-0a0e-4d4c-8312-6efe066fafab",
      "name": "Telegram Nodes",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -60,
        1100
      ]
    },
    {
      "id": "1ec533a1-ce20-4dd8-90fd-b983ca3bc9b8",
      "name": "n8n Nodes",
      "type": "n8n-nodes-base.n8n",
      "position": [
        -60,
        840
      ]
    },
    {
      "id": "b871b30b-eb03-4e95-b0ae-49ad574e1262",
      "name": "Error Trigger",
      "type": "n8n-nodes-base.errorTrigger",
      "position": [
        840,
        1020
      ]
    },
    {
      "id": "1dda43c6-2762-4a52-b012-f1e718e52f2b",
      "name": "If not manual exec",
      "type": "n8n-nodes-base.if",
      "position": [
        1060,
        1020
      ]
    },
    {
      "id": "de2db9a3-4070-470f-b72d-f0fc74abc43a",
      "name": "n8n Started Trigger",
      "type": "n8n-nodes-base.n8nTrigger",
      "position": [
        840,
        1200
      ]
    },
    {
      "id": "09f5a744-1292-4b8b-a042-ce9a0818863f",
      "name": "Workflow Error Msg",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1320,
        1020
      ]
    },
    {
      "id": "28847e14-5313-42cf-9c08-512c34118264",
      "name": "n8n Started Msg",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1320,
        1200
      ]
    }
  ],
  "connections": {
    "Cmd Parse": {
      "main": [
        [
          {
            "node": "Cmd Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If Active": {
      "main": [
        [
          {
            "node": "Deactivate Workflow",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Workflow Inactive Error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read File": {
      "main": [
        [
          {
            "node": "Backup",
            "type": "main",
            "index": 0
          },
          {
            "node": "Cleanup Files",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Backup Error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Cmd Switch": {
      "main": [
        [
          {
            "node": "Help",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Help",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Backup Workflows",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "List Archived",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "List Workflows ",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Execute Arg",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Activate Arg",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Deactivate Arg",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Executions Arg",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Cmd Error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Execute Arg": {
      "main": [
        [
          {
            "node": "List Workflows 1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Arg Error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If Inactive": {
      "main": [
        [
          {
            "node": "Activate Workflow",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Workflow Active Error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Activate Arg": {
      "main": [
        [
          {
            "node": "List Workflows 2",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Arg Error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Not Archived": {
      "main": [
        [
          {
            "node": "Workflow List",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Archived List": {
      "main": [
        [
          {
            "node": "Delete Archived",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Error Trigger": {
      "main": [
        [
          {
            "node": "If not manual exec",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "List Archived": {
      "main": [
        [
          {
            "node": "Only Archived",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Only Archived": {
      "main": [
        [
          {
            "node": "Archived List",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Workflow List": {
      "main": [
        [
          {
            "node": "Workflows Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Backup Tarball": {
      "main": [
        [
          {
            "node": "Read File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Deactivate Arg": {
      "main": [
        [
          {
            "node": "List Workflows 3",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Arg Error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Executions Arg": {
      "main": [
        [
          {
            "node": "List Workflows 4",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Arg Error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Delete Archived": {
      "main": [
        [
          {
            "node": "Archived Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Find Workflow 1": {
      "main": [
        [
          {
            "node": "Workflow Found 1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Find Workflow 2": {
      "main": [
        [
          {
            "node": "Workflow Found 2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Find Workflow 3": {
      "main": [
        [
          {
            "node": "Workflow Found 3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Find Workflow 4": {
      "main": [
        [
          {
            "node": "Workflow Found 4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "List Workflows ": {
      "main": [
        [
          {
            "node": "Not Archived",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Archived Message": {
      "main": [
        [
          {
            "node": "Cleanup",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Backup Workflows": {
      "main": [
        [
          {
            "node": "Backup Credentials",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Execute Workflow": {
      "main": [
        [
          {
            "node": "Executed",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Execution Error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "List Workflows 1": {
      "main": [
        [
          {
            "node": "Find Workflow 1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "List Workflows 2": {
      "main": [
        [
          {
            "node": "Find Workflow 2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "List Workflows 3": {
      "main": [
        [
          {
            "node": "Find Workflow 3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "List Workflows 4": {
      "main": [
        [
          {
            "node": "Find Workflow 4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Telegram Trigger": {
      "main": [
        [
          {
            "node": "Cmd Parse",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Workflow Found 1": {
      "main": [
        [
          {
            "node": "Execute Workflow",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Workflow Name Error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Workflow Found 2": {
      "main": [
        [
          {
            "node": "If Inactive",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Workflow Name Error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Workflow Found 3": {
      "main": [
        [
          {
            "node": "If Active",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Workflow Name Error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Workflow Found 4": {
      "main": [
        [
          {
            "node": "List Workflow Executions",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Workflow Name Error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Activate Workflow": {
      "main": [
        [
          {
            "node": "Activated",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Activation Error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Executions Fields": {
      "main": [
        [
          {
            "node": "Executions Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Workflows Message": {
      "main": [
        [
          {
            "node": "Workflows",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Backup Credentials": {
      "main": [
        [
          {
            "node": "Backup Tarball",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Executions Message": {
      "main": [
        [
          {
            "node": "Executions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If not manual exec": {
      "main": [
        [
          {
            "node": "Workflow Error Msg",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Deactivate Workflow": {
      "main": [
        [
          {
            "node": "Deactivated",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Deactivation Error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "n8n Started Trigger": {
      "main": [
        [
          {
            "node": "n8n Started Msg",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "List Workflow Executions": {
      "main": [
        [
          {
            "node": "Executions Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}