{
  "name": "Automate workflow execution with Telegram Bot Command Center",
  "nodes": [
    {
      "id": "1f10be35-1365-41cf-a310-d3b3a4a6f2d0",
      "name": "Telegram Trigger",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        -224,
        -768
      ]
    },
    {
      "id": "5c258bb2-3ba3-44cf-bad0-7ed9c83754e0",
      "name": "format_output_as_json",
      "type": "n8n-nodes-base.code",
      "position": [
        1456,
        -384
      ]
    },
    {
      "id": "c2d15090-96f3-46f3-a39a-3d6b880feeaa",
      "name": "Generic Output",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1680,
        -816
      ]
    },
    {
      "id": "10b63b94-03f5-4728-9d9d-36b333eaa1fa",
      "name": "Processing has finished",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1680,
        -1040
      ]
    },
    {
      "id": "2ddf08dd-759d-4dad-81fd-4e7fad69a628",
      "name": "Instagram post",
      "type": "n8n-nodes-base.executeWorkflow",
      "position": [
        1248,
        -816
      ]
    },
    {
      "id": "1b33a651-c6a9-4f4a-aa69-0a123866c0e7",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -272,
        -1024
      ],
      "parameters": {
        "width": 448,
        "height": 736,
        "content": "1. Telegram message Trigger\n2. If permission granted workflow proceed unless send permission denid message to the user with his ID."
      }
    },
    {
      "id": "079c8a6b-0f36-4439-baf2-6e2e5fde033a",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        208,
        -1024
      ],
      "parameters": {
        "width": 656,
        "height": 736,
        "content": "1. Seperate Command and Paremeter\n1. Set list command reply\n1. Route the flow based on command"
      }
    },
    {
      "id": "57fdb67c-d3ce-4620-b9a7-1de296f15534",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        896,
        -1296
      ],
      "parameters": {
        "width": 1120,
        "height": 1088,
        "content": "Define behaviour for each command.\n1. Switch will route command to the right flow,\n1. you can call the sub workflow for relevant action, by useing sub-workflow node (just update the node)\n1. you have "
      }
    },
    {
      "id": "52b5bcbc-75a8-4aba-9686-1b1d7cfb02f2",
      "name": "Command not found",
      "type": "n8n-nodes-base.telegram",
      "position": [
        640,
        -464
      ]
    },
    {
      "id": "663ebfab-5033-4483-a6e4-ab6d38be4413",
      "name": "Access Denied",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -16,
        -496
      ]
    },
    {
      "id": "86c74341-8166-48bd-8e86-d4a694fe7ed4",
      "name": "Access Control",
      "type": "n8n-nodes-base.if",
      "position": [
        -16,
        -768
      ]
    },
    {
      "id": "317f4da6-707f-48c3-910a-4e50693b636a",
      "name": "Seperate command and Parameter",
      "type": "n8n-nodes-base.code",
      "position": [
        448,
        -784
      ]
    },
    {
      "id": "a9a338a4-2814-422c-b529-1d74edb1ecef",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -64,
        -864
      ],
      "parameters": {
        "width": 224,
        "height": 80,
        "content": "1.Add Account ID here enable access for the user"
      }
    },
    {
      "id": "1f9f977c-3c06-404f-8c72-347afbd5255a",
      "name": "Valid Commands",
      "type": "n8n-nodes-base.set",
      "position": [
        240,
        -784
      ]
    },
    {
      "id": "9aa0c015-27a3-4911-8c2e-3d863c031171",
      "name": "Switch to the Command",
      "type": "n8n-nodes-base.switch",
      "position": [
        640,
        -832
      ]
    },
    {
      "id": "91779d6a-b7ac-4d77-8211-0528614147c9",
      "name": "Social Analysis",
      "type": "n8n-nodes-base.executeWorkflow",
      "position": [
        1248,
        -384
      ]
    },
    {
      "id": "0f762bb5-6a18-42eb-8528-ab39bbde3686",
      "name": "Social Analysis Output",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1680,
        -384
      ]
    },
    {
      "id": "aa73de3b-23e0-4f78-8cc6-3e79bd836294",
      "name": "sentimental_analysis",
      "type": "n8n-nodes-base.executeWorkflow",
      "position": [
        1248,
        -1040
      ]
    },
    {
      "id": "06fa30d0-7d38-41da-9edd-1c685ef8cc97",
      "name": "Generic Output1",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1680,
        -592
      ]
    },
    {
      "id": "541b48b2-1b86-4535-858c-5d4de3bde7ab",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -928,
        -1136
      ],
      "parameters": {
        "width": 624,
        "height": 848,
        "content": "# Telegram Command Center\n\n## ℹ️ What is this workflow\nThis workflow is using Telegram chat as a command center. Simple interface for user to run wokflows and receive answers by Telgram message or oth"
      }
    },
    {
      "id": "e4c26f0f-deac-4f71-958a-15a4d44dc02e",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        224,
        -624
      ],
      "parameters": {
        "width": 224,
        "height": 80,
        "content": "2.Update you available command here"
      }
    },
    {
      "id": "5fb4ea46-0f49-4b7f-be52-c7323a556337",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        608,
        -928
      ],
      "parameters": {
        "width": 224,
        "height": 80,
        "content": "3.Update list of commands here"
      }
    },
    {
      "id": "911c5ead-a29b-4c72-8f40-e12ab10ce3f4",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1008,
        -624
      ],
      "parameters": {
        "width": 224,
        "height": 80,
        "content": "4.Connect to relevant Sub-Wokflow and use message to reply back"
      }
    }
  ],
  "connections": {
    "Access Control": {
      "main": [
        [
          {
            "node": "Valid Commands",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Access Denied",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Instagram post": {
      "main": [
        [
          {
            "node": "Generic Output",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Valid Commands": {
      "main": [
        [
          {
            "node": "Seperate command and Parameter",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Social Analysis": {
      "main": [
        [
          {
            "node": "format_output_as_json",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Telegram Trigger": {
      "main": [
        [
          {
            "node": "Access Control",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "sentimental_analysis": {
      "main": [
        [
          {
            "node": "Processing has finished",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch to the Command": {
      "main": [
        [
          {
            "node": "sentimental_analysis",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Instagram post",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Generic Output1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Social Analysis",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Command not found",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "format_output_as_json": {
      "main": [
        [
          {
            "node": "Social Analysis Output",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Processing has finished": {
      "main": [
        []
      ]
    },
    "Seperate command and Parameter": {
      "main": [
        [
          {
            "node": "Switch to the Command",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}