AutomationFlowsSocial Media › Twitter to Tg

Twitter to Tg

Twitter To TG. Uses start, twitter, telegram. Manual trigger; 7 nodes.

Manual trigger★★★★☆ complexity7 nodesStartTwitterTelegram
Social Media Trigger: Manual Nodes: 7 Complexity: ★★★★☆ Added:

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
{
  "name": "Twitter To TG",
  "nodes": [
    {
      "parameters": {},
      "name": "Start",
      "type": "n8n-nodes-base.start",
      "typeVersion": 1,
      "position": [
        240,
        300
      ]
    },
    {
      "parameters": {
        "operation": "search",
        "searchText": "from:pseudo_yu",
        "additionalFields": {
          "resultType": "recent"
        }
      },
      "name": "Twitter",
      "type": "n8n-nodes-base.twitter",
      "position": [
        560,
        -40
      ],
      "typeVersion": 1,
      "credentials": {
        "twitterOAuth1Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "functionCode": "const new_items = [];\nconst data = this.getWorkflowStaticData('node');\n\ndata.ids = data.ids || [];\n\n\nif (data.ids.length === 0) {\n  // only first item\n  const firstItem = items[0]\n  new_items.push(firstItem)\n} else {\n  for (var i=0; i<items.length; i++) {\n    if (data.ids.includes(items[i].json.id)) {\n      break;\n    } else {\n      new_items.push({json: items[i].json});\n    }\n  }\n}\n\ndata.ids = items.map(item => item.json.id)\nreturn new_items.reverse();\n"
      },
      "name": "Function",
      "type": "n8n-nodes-base.function",
      "position": [
        1040,
        -20
      ],
      "typeVersion": 1
    },
    {
      "parameters": {
        "keepOnlySet": true,
        "values": {
          "number": [
            {
              "name": "id",
              "value": "={{$json[\"id\"]}}"
            }
          ],
          "string": [
            {
              "name": "url",
              "value": "=https://twitter.com/{{$json[\"user\"][\"screen_name\"]}}/status/{{$json[\"id_str\"]}}"
            },
            {
              "name": "tweet",
              "value": "={{$json[\"text\"]}}"
            },
            {
              "name": "username",
              "value": "={{$node[\"Twitter\"].json[\"user\"][\"screen_name\"]}}"
            },
            {
              "name": "photo",
              "value": "={{$json[\"user\"][\"profile_image_url_https\"]}}"
            },
            {
              "name": "name",
              "value": "={{$json[\"user\"][\"name\"]}}"
            },
            {
              "name": "color",
              "value": "={{$json[\"user\"][\"profile_link_color\"]}}"
            },
            {
              "name": "retweetedUrl",
              "value": "=https://twitter.com/{{$json[\"retweeted_status\"][\"user\"][\"screen_name\"]}}/status/{{$json[\"id_str\"]}}"
            }
          ],
          "boolean": [
            {
              "name": "retweeted",
              "value": "={{$json[\"retweeted_status\"] !== undefined}}"
            }
          ]
        },
        "options": {
          "dotNotation": true
        }
      },
      "name": "Set Retweeted",
      "type": "n8n-nodes-base.set",
      "position": [
        840,
        -40
      ],
      "typeVersion": 1
    },
    {
      "parameters": {
        "chatId": "@pseudoyulife",
        "text": "=\ud83d\udc26 {{$json[\"tweet\"]}} {{$json[\"retweeted\"] ? \"#retweet\" : \"#tweet\"}}\n\n<a href=\"{{$json[\"url\"]}} \">source</a>",
        "additionalFields": {
          "parse_mode": "HTML"
        }
      },
      "name": "Telegram",
      "type": "n8n-nodes-base.telegram",
      "typeVersion": 1,
      "position": [
        1260,
        -20
      ],
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "interval": 5,
        "unit": "minutes"
      },
      "name": "Interval",
      "type": "n8n-nodes-base.interval",
      "typeVersion": 1,
      "position": [
        360,
        -40
      ]
    },
    {
      "parameters": {
        "conditions": {
          "boolean": [
            {
              "value1": "={{$json[\"in_reply_to_screen_name\"] && $json[\"in_reply_to_screen_name\"] !== \"novoreorx\"}}",
              "value2": "={{true}}"
            }
          ]
        }
      },
      "name": "IF reply to others",
      "type": "n8n-nodes-base.if",
      "typeVersion": 1,
      "position": [
        680,
        -220
      ]
    }
  ],
  "connections": {
    "Twitter": {
      "main": [
        [
          {
            "node": "IF reply to others",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Function": {
      "main": [
        [
          {
            "node": "Telegram",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Retweeted": {
      "main": [
        [
          {
            "node": "Function",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Interval": {
      "main": [
        [
          {
            "node": "Twitter",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IF reply to others": {
      "main": [
        [],
        [
          {
            "node": "Set Retweeted",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": true,
  "settings": {
    "saveExecutionProgress": "DEFAULT",
    "errorWorkflow": "9"
  },
  "id": 6,
  "tags": []
}

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

Twitter To TG. Uses start, twitter, telegram. Manual trigger; 7 nodes.

Source: https://github.com/pseudoyu/yu-workflows/blob/5e3119b213707cf58298e4a2ff94052512a46253/n8n/Twitter_To_TG.json — original creator credit. Request a take-down →

More Social Media workflows → · Browse all categories →

Related workflows

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

Social Media

This n8n workflow automatically shares content from a Telegram Channel to multiple platforms like WordPress, Facebook, X/Twitter, and LinkedIn. It uses a Switch node to detect the type of content—text

Telegram Trigger, Telegram, WordPress +5
Social Media

This workflow listens to messages in a designated Telegram channel and automatically posts them to X (Twitter), Threads, and LinkedIn based on simple @mention tags. Write your content once, tag which

Twitter, LinkedIn, Telegram +2
Social Media

The x402 payment standard is growing in popularity and has enabled new monetization opportunities for internet resources. This workflow lets you automate the monetization of your followers on X by rec

Telegram, Twitter, N8N Nodes 1Shot
Social Media

Security Scanner - Social Media Auto-Poster (Full). Uses twitter, facebookGraphApi, httpRequest, telegram. Scheduled trigger; 6 nodes.

Twitter, Facebook Graph Api, HTTP Request +1
Social Media

Security Scanner - Social Media Auto-Poster. Uses twitter, facebookGraphApi, telegram. Scheduled trigger; 5 nodes.

Twitter, Facebook Graph Api, Telegram