{
  "name": "Route Telegram channel posts to X, Threads, and LinkedIn using @mentions",
  "nodes": [
    {
      "id": "b097f1fd-9c00-4381-9393-847f22a13200",
      "name": "Create Tweet",
      "type": "n8n-nodes-base.twitter",
      "position": [
        992,
        656
      ]
    },
    {
      "id": "a7b433d3-9c39-4b13-8efd-b7696bd888c5",
      "name": "Create a post",
      "type": "n8n-nodes-base.linkedIn",
      "position": [
        992,
        848
      ]
    },
    {
      "id": "7b1717b3-00be-48c4-a970-38a3e1699bdd",
      "name": "Parse Telegram Message",
      "type": "n8n-nodes-base.code",
      "position": [
        544,
        560
      ]
    },
    {
      "id": "b2a98159-897e-470a-8210-3f4ad50c7b19",
      "name": "Switch",
      "type": "n8n-nodes-base.switch",
      "position": [
        768,
        512
      ]
    },
    {
      "id": "50e9685c-eb81-4c75-8648-2f9035eb184f",
      "name": "Send Error Notification",
      "type": "n8n-nodes-base.telegram",
      "position": [
        992,
        464
      ]
    },
    {
      "id": "b45974ec-a615-4756-ac70-edf640ff9d79",
      "name": "Telegram Trigger",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        320,
        560
      ]
    },
    {
      "id": "b79bfc60-b00c-4e11-bbe3-bbc27c12314b",
      "name": "X Success Notification",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1216,
        656
      ]
    },
    {
      "id": "18b98a23-c652-481a-8bf4-90d1bef874dd",
      "name": "LinkedIn Success Notification",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1216,
        848
      ]
    },
    {
      "id": "5e8bf4c8-41fc-4832-9121-c409ffb6e8a4",
      "name": "Threads Success Notification",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1664,
        272
      ]
    },
    {
      "id": "9693e043-2e43-443e-bc6a-51eee9e847e0",
      "name": "When clicking 'Execute workflow'",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        320,
        48
      ]
    },
    {
      "id": "6fd5014d-7359-427a-b78f-d8c6e8dbfce4",
      "name": "Threads Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        544,
        48
      ]
    },
    {
      "id": "dfff7d63-ede6-47ee-8e0d-07424136d7eb",
      "name": "Threads Fields Copy",
      "type": "n8n-nodes-base.set",
      "position": [
        992,
        272
      ]
    },
    {
      "id": "1bc8844c-9cda-4a50-9e97-d20aa502bc58",
      "name": "Create Thread",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1216,
        272
      ]
    },
    {
      "id": "87d3e18d-4078-4a34-bee7-c6d482f6f6e2",
      "name": "Publish Thread",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1440,
        272
      ]
    },
    {
      "id": "4bbddb71-9a20-4873-b16d-42f9addf60d9",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        192,
        -96
      ],
      "parameters": {
        "width": 800,
        "height": 304,
        "content": "## Get Access Token\n**Double click** for guide to get access token. [Guide](https://www.youtube.com/watch?v=nC1-KZabm6U)\n\nThis gets your the access token that lasts for 2 months so you can publish thr"
      }
    },
    {
      "id": "58a96e44-915a-4e3c-b6b3-bd4cc04c3703",
      "name": "Get Threads Long-Lived Token",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        768,
        48
      ]
    },
    {
      "id": "d9a5dfcc-233c-4927-8322-4f2be2410640",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1024,
        -272
      ],
      "parameters": {
        "width": 736,
        "height": 480,
        "content": "## How it works\n\nThis workflow automates cross-posting from Telegram to multiple social media platforms. When you send a message in your Telegram channel with specific tags (@x, @threads, @linkedin, o"
      }
    },
    {
      "id": "4d59c067-b936-4df4-99bb-4f14d2907d88",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        240,
        720
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": "Trigger & Parsing\n\nReceives messages from Telegram channel and parses @mentions to determine target platforms using binary flags."
      }
    },
    {
      "id": "7ec7e93e-5571-4246-9c26-d2fd920e363f",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        928,
        1008
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": "Social Media Posting\n\nPosts cleaned message content to selected platforms (X, LinkedIn, Threads) based on parsed flags."
      }
    },
    {
      "id": "4e180c33-2f28-4864-9e34-c864b4f06446",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1184,
        1008
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": "Notifications\n\nSends confirmation messages back to Telegram with post status and IDs."
      }
    },
    {
      "id": "bdf5cf17-77d0-479e-84e6-49455b805ebc",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        736,
        240
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": "  Threads Token Setup\n   \n   One-time setup: Run manually to refresh your Threads long-lived access token (valid for 60 days)."
      }
    }
  ],
  "connections": {
    "Switch": {
      "main": [
        [
          {
            "node": "Send Error Notification",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Create Tweet",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Threads Fields Copy",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Create a post",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Create Tweet",
            "type": "main",
            "index": 0
          },
          {
            "node": "Create a post",
            "type": "main",
            "index": 0
          },
          {
            "node": "Threads Fields Copy",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Create Tweet",
            "type": "main",
            "index": 0
          },
          {
            "node": "Threads Fields Copy",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Tweet": {
      "main": [
        [
          {
            "node": "X Success Notification",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Thread": {
      "main": [
        [
          {
            "node": "Publish Thread",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create a post": {
      "main": [
        [
          {
            "node": "LinkedIn Success Notification",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Publish Thread": {
      "main": [
        [
          {
            "node": "Threads Success Notification",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Threads Fields": {
      "main": [
        [
          {
            "node": "Get Threads Long-Lived Token",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Telegram Trigger": {
      "main": [
        [
          {
            "node": "Parse Telegram Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Threads Fields Copy": {
      "main": [
        [
          {
            "node": "Create Thread",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse Telegram Message": {
      "main": [
        [
          {
            "node": "Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking 'Execute workflow'": {
      "main": [
        [
          {
            "node": "Threads Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}