Automate Twitter Mentions to Mattermost with n8n

Save time monitoring Twitter mentions of n8n_io by automatically posting new tweets to your Mattermost channel. This n8n workflow filters duplicates and delivers real-time alerts to boost productivity.
twitter
cron
function
+2
Workflow Identifier: 1480
NODES in Use: Cron, Twitter, Set, Function, Mattermost

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

Visit through Desktop for Best experience

What This Workflow Does

This workflow checks Twitter every minute to find new tweets mentioning “n8n_io”. It stops repeated tweets and sends new tweet info to a Mattermost channel. This saves lots of time from looking manually and helps teams act fast on important tweets.

The workflow works by receiving input from Twitter, organizing tweet details, filtering old tweets, and finally posting fresh tweets to Mattermost. You get quick, clean updates about mentions without missing any.


Tools and Services Used

  • Twitter API: To search recent tweets containing “n8n_io” keyword.
  • Mattermost API: To post tweet messages into a team chat channel.
  • n8n automation platform: To build and run the workflow nodes.
  • OAuth1 credentials: For Twitter API authentication.
  • Mattermost API token: For permission to send messages.

Inputs, Processing Steps, and Output

Inputs

  • Twitter API credentials with read access.
  • Search keyword “n8n_io”.
  • Mattermost API token and target channel ID.

Processing Steps

  • Cron node triggers workflow every minute.
  • Twitter node searches tweets mentioning “n8n_io”.
  • Set node extracts key tweet data like ID, URL, username, text, photo, name, and profile color.
  • Function node filters out tweets already processed to avoid duplicates.
  • Mattermost node posts formatted messages with tweet info into a Mattermost channel.

Output

Fresh tweets about “n8n_io” are posted live and cleaned in a dedicated Mattermost channel for the team.


Beginner Step-by-Step: How to Use This Workflow in n8n

Importing and Setup

  1. Download the workflow file using the Download button on this page.
  2. Open n8n editor and click “Import from File” to load the downloaded workflow.
  3. After import, open each node and add required credentials or API Keys:
    • Insert Twitter OAuth1 credentials in the Twitter node.
    • Insert Mattermost API token in the Mattermost node.
    • Update the Mattermost Channel ID in the Mattermost node to your target channel.

  4. Check that the Code expression in the Function node matches this:
const new_items = [];
const data = this.getWorkflowStaticData('node');
data.ids = data.ids || [];
for (var i=0; i item.json.id)
return new_items;

Testing and Activation

  1. Run the workflow once manually to test if tweets are fetched and posted to Mattermost correctly.
  2. Look for any errors in the execution tab. Fix credential or node config if needed.
  3. When tests pass, activate the workflow by switching it to Active mode.

This ready-to-use setup saves time by automating tweet monitoring and team alerts without building from zero.


Common Problems and Fixes

No tweets found even though recent mentions exist

This may happen if Twitter API limits are reached or search query is invalid.

Check your Twitter OAuth1 credentials and API quota.

Make sure the search keyword “n8n_io” is correct and there are tweets matching.

Mattermost node fails to send messages

Wrong API token, channel ID, or permission issues cause errors.

Verify the Mattermost API token and update the channel ID to the right one.

Ensure your token has posting rights.


Customization Ideas

  • Change keyword “n8n_io” in the Twitter node to track other topics.
  • Adjust the Cron node to run every 5 or 10 minutes instead of every minute.
  • Add more data fields in the Set node to include extra tweet info like retweet count.
  • Alter message style or colors in the Mattermost node to match team branding.
  • Duplicate the Mattermost node to post in multiple channels.

Deployment and Production Notes

Turn on the workflow in n8n to run live on schedule.

Use cloud or self-host n8n options depending on your preference.

Watch executions and errors after deployment to ensure stable operation.

Adjust frequency or keywords later to fit team needs.


Summary of Workflow Benefits

✓ Saves hours weekly by automating tweet finding and sharing.

✓ Prevents duplicate notifications with smart filtering.

✓ Keeps team quickly informed in Mattermost about Twitter mentions.

✓ Easy to import, configure, test, and activate in n8n.

Frequently Asked Questions

The Function node uses stored tweet IDs to filter duplicates before posting new tweets.
You need valid Twitter OAuth1 credentials with access to search tweets.
Update the Channel ID field in the Mattermost node with the desired channel’s ID.
Yes, adjust the Cron node timing to run every 5 or 10 minutes as needed.

Promoted by BULDRR AI

Related Workflows

Automate Viral UGC Video Creation Using n8n + Degaus (Beginner-Friendly Guide)

Learn how to automate viral UGC video creation using n8n, AI prompts, and Degaus. This beginner-friendly guide shows how to import, configure, and run the workflow without technical complexity.
Form Trigger
Google Sheets
Gmail
+37
Free

AI SEO Blog Writer Automation Workflows in n8n

A complete beginner guide to building an AI SEO blog writer automation using n8n.
AI Agent
Google Sheets
httpRequest
+5
Free

Automate CrowdStrike Alerts with VirusTotal, Jira & Slack

This workflow automates processing of CrowdStrike detections by enriching threat data via VirusTotal, creating Jira tickets for incident tracking, and notifying teams on Slack for quick response. Save hours daily by transforming complex threat data into actionable alerts effortlessly.
scheduleTrigger
httpRequest
jira
+5
Free

Automate Telegram Invoices to Notion with AI Summaries & Reports

Save hours on financial tracking by automating invoice extraction from Telegram photos to Notion using Google Gemini AI. This workflow extracts data, records transactions, and generates detailed spending reports with charts sent on schedule via Telegram.
lmChatGoogleGemini
telegramTrigger
notion
+9
Free

Automate Email Replies with n8n and AI-Powered Summarization

Save hours managing your inbox with this n8n workflow that uses IMAP email triggers, AI summarization, and vector search to draft concise replies requiring minimal review. Automate business email processing efficiently with AI guidance and Gmail integration.
emailReadImap
vectorStoreQdrant
emailSend
+12
Free

Automate Email Campaigns Using n8n with Gmail & Google Sheets

This n8n workflow automates personalized email outreach campaigns by integrating Gmail and Google Sheets, saving hours of manual follow-up work and reducing errors in email sequences. It ensures timely follow-ups based on previous email interactions, optimizing communication efficiency.
googleSheets
gmail
code
+5
Free