AutomationFlowsSocial Media › Twitter Mentions to RocketChat Alerts

Twitter Mentions to RocketChat Alerts

Original n8n title: Twitterworkflow

TwitterWorkflow. Uses manualTrigger, twitter, rocketchat. Event-driven trigger; 6 nodes.

Event trigger★★★★☆ complexity6 nodesTwitterRocketchat
Social Media Trigger: Event Nodes: 6 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
{
  "id": "1",
  "name": "TwitterWorkflow",
  "nodes": [
    {
      "name": "On clicking 'execute'",
      "type": "n8n-nodes-base.manualTrigger",
      "disabled": true,
      "position": [
        400,
        850
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "name": "Filter Tweet Data",
      "type": "n8n-nodes-base.set",
      "position": [
        680,
        300
      ],
      "parameters": {
        "values": {
          "string": [
            {
              "name": "Tweet",
              "value": "={{$node[\"n8n.io mentions\"].json[\"text\"]}}"
            },
            {
              "name": "Tweet ID",
              "value": "={{$node[\"n8n.io mentions\"].json[\"id\"]}}"
            },
            {
              "name": "Tweet URL",
              "value": "=https://twitter.com/{{$node[\"n8n.io mentions\"].json[\"user\"][\"screen_name\"]}}/status/{{$node[\"n8n.io mentions\"].json[\"id_str\"]}}"
            }
          ]
        },
        "options": {},
        "keepOnlySet": true
      },
      "typeVersion": 1
    },
    {
      "name": "Only get new tweets",
      "type": "n8n-nodes-base.function",
      "position": [
        910,
        300
      ],
      "parameters": {
        "functionCode": "const staticData = getWorkflowStaticData('global');\nconst newTweetIds = items.map(item => item.json[\"Tweet ID\"]);\nconst oldTweetIds = staticData.oldTweetIds; \n\nif (!oldTweetIds) {\n  staticData.oldTweetIds = newTweetIds;\n  return items;\n}\n\n\nconst actualNewTweetIds = newTweetIds.filter((id) => !oldTweetIds.includes(id));\nconst actualNewTweets = items.filter((data) => actualNewTweetIds.includes(data.json['Tweet ID']));\nstaticData.oldTweetIds = [...actualNewTweetIds, ...oldTweetIds];\n\nreturn actualNewTweets;\n"
      },
      "typeVersion": 1
    },
    {
      "name": "n8n.io mentions",
      "type": "n8n-nodes-base.twitter",
      "position": [
        480,
        300
      ],
      "parameters": {
        "operation": "search",
        "searchText": "@n8n_io",
        "additionalFields": {}
      },
      "credentials": {
        "twitterOAuth1Api": "<your credential>"
      },
      "typeVersion": 1
    },
    {
      "name": "RocketChat",
      "type": "n8n-nodes-base.rocketchat",
      "position": [
        1150,
        300
      ],
      "parameters": {
        "text": "=New Mention!: {{$node[\"Filter Tweet Data\"].json[\"Tweet\"]}}.\nSee it here: {{$node[\"Only get new tweets\"].json[\"Tweet URL\"]}}",
        "channel": "general",
        "options": {},
        "jsonParameters": true
      },
      "credentials": {
        "rocketchatApi": "<your credential>"
      },
      "typeVersion": 1
    },
    {
      "name": "Cron",
      "type": "n8n-nodes-base.cron",
      "position": [
        270,
        300
      ],
      "parameters": {
        "triggerTimes": {
          "item": [
            {
              "mode": "everyX",
              "unit": "minutes",
              "value": 1
            }
          ]
        }
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {},
  "connections": {
    "Cron": {
      "main": [
        [
          {
            "node": "n8n.io mentions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "n8n.io mentions": {
      "main": [
        [
          {
            "node": "Filter Tweet Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Tweet Data": {
      "main": [
        [
          {
            "node": "Only get new tweets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Only get new tweets": {
      "main": [
        [
          {
            "node": "RocketChat",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On clicking 'execute'": {
      "main": [
        []
      ]
    }
  }
}

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

TwitterWorkflow. Uses manualTrigger, twitter, rocketchat. Event-driven trigger; 6 nodes.

Source: https://github.com/Zie619/n8n-workflows — 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

Okay, here are the "How It Works" and "Setup Steps" for your "Automated Social Media Content Distribution System," presented clearly in Markdown.

Google Sheets Trigger, Facebook Graph Api, Twitter +3
Social Media

A user-friendly n8n workflow that enables users to submit tweets through a simple web form — with optional image, video, or GIF uploads — and posts them to a connected X/Twitter account. Designed for

Form Trigger, HTTP Request, Twitter +1
Social Media

New tweets. Uses manualTrigger, twitter, airtable. Event-driven trigger; 7 nodes.

Twitter, Airtable