{
  "name": "(De)activate n8n workflows using Telegram commands",
  "nodes": [
    {
      "id": "814ab819-7a0d-4647-a8e2-56d90616b4b2",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        962,
        306
      ],
      "parameters": {
        "width": 307,
        "height": 1003.1537835638735,
        "content": "### Switch depending on content\n0 = if command contains the word \"marketing\"\n1 = if command contains the word \"sales\""
      }
    },
    {
      "id": "0c263242-1369-4cd5-83b7-4e2e8ffe99bb",
      "name": "Keep only messages from a specific chat id",
      "type": "n8n-nodes-base.filter",
      "position": [
        480,
        520
      ]
    },
    {
      "id": "8dd8b974-bfdc-4a80-bb94-3d5994872f70",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        660,
        311
      ],
      "parameters": {
        "width": null,
        "height": 382,
        "content": "### Switch depending on command\n0 = /stop\n1 = /start"
      }
    },
    {
      "id": "fd76d706-01df-453d-b8ad-d3ad1b379fb4",
      "name": "Deactivate the marketing workflow",
      "type": "n8n-nodes-base.n8n",
      "position": [
        1380,
        480
      ]
    },
    {
      "id": "b2c976ca-e78f-4b0a-8337-45c66939d30c",
      "name": "Deactivate the sales workflow",
      "type": "n8n-nodes-base.n8n",
      "position": [
        1380,
        680
      ]
    },
    {
      "id": "8187bb9d-685b-4955-b7e0-3375a9461bc8",
      "name": "Activate the marketing workflow",
      "type": "n8n-nodes-base.n8n",
      "position": [
        1380,
        940
      ]
    },
    {
      "id": "87d219be-77d0-4e29-9137-d55bdfae4aa7",
      "name": "Switch depending on content (activate)",
      "type": "n8n-nodes-base.switch",
      "position": [
        1040,
        960
      ]
    },
    {
      "id": "fa5f346d-5ad2-4ef3-b715-e45ffb7dfd29",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        60,
        740
      ],
      "parameters": {
        "width": 846,
        "height": 575.2554922701386,
        "content": "# Telegram N8N workflow (de)activator\n\n## What does it do?\nThis workflow helps you to quickly activate or deactivate a workflow through Telegram. Sometimes we are not able to access a PC to resolve an"
      }
    },
    {
      "id": "d16753af-c1d7-4b60-89da-82432a0b06c1",
      "name": "Receive commands from Telegram",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        260,
        520
      ]
    },
    {
      "id": "83a5dc1b-00c9-46b2-9941-78f42d2e06e5",
      "name": "Activate the sales workflow",
      "type": "n8n-nodes-base.n8n",
      "position": [
        1380,
        1160
      ]
    },
    {
      "id": "2bf6ebf2-f94e-4359-bea8-a041bf669644",
      "name": "Switch depending on command",
      "type": "n8n-nodes-base.switch",
      "position": [
        720,
        520
      ]
    },
    {
      "id": "a6888317-39b5-4b3d-97a8-c9bf0e90eddb",
      "name": "Switch depending on content (deactivate)",
      "type": "n8n-nodes-base.switch",
      "position": [
        1040,
        500
      ]
    }
  ],
  "connections": {
    "Switch depending on command": {
      "main": [
        [
          {
            "node": "Switch depending on content (deactivate)",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Switch depending on content (activate)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Receive commands from Telegram": {
      "main": [
        [
          {
            "node": "Keep only messages from a specific chat id",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch depending on content (activate)": {
      "main": [
        [
          {
            "node": "Activate the marketing workflow",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Activate the sales workflow",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch depending on content (deactivate)": {
      "main": [
        [
          {
            "node": "Deactivate the marketing workflow",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Deactivate the sales workflow",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Keep only messages from a specific chat id": {
      "main": [
        [
          {
            "node": "Switch depending on command",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}