Automate Twitter Mentions Alerts with n8n and Slack

Struggling to stay on top of your company’s Twitter mentions? This n8n workflow scrapes the latest 50 mentions every 10 minutes and posts new ones directly to Slack, saving you hours of manual monitoring and ensuring you never miss a mention again.
cron
twitter
slack
+3
Workflow Identifier: 1637
NODES in Use: Cron, Set, Date & Time, Twitter, If, Slack

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

Learn how to Build this Workflow with AI:

Visit through Desktop for Best experience

Stay Instantly Updated on Twitter Mentions with Automated Slack Alerts ⚙️

Meet Laura, the social media manager at a growing tech startup. She spends hours every day manually checking Twitter for any company mentions to respond quickly and manage reputation. With hundreds of mentions every week, the manual task wastes at least 3 hours daily and risks missing urgent tweets. Meanwhile, her team communications often lag behind, causing delayed responses and lost engagement opportunities.

This is where an automation like the one we’ll explore comes in handy. Using n8n’s powerful automation platform combined with Twitter and Slack, you can set up a workflow that checks for new mentions every 10 minutes and instantly notifies your team on Slack with direct links to the tweets.

What This Automation Does

  • Runs every 10 minutes to keep your monitoring near real-time without manual effort.
  • Searches Twitter for the last 50 mentions of your specified company Twitter handle (e.g., @n8n_io).
  • Filters the results to only notify of tweets created since the last workflow run, avoiding duplicate alerts.
  • Formats important tweet info like tweet text and direct URL to the tweet for clear visibility.
  • Posts these new mentions as messages directly to your specified Slack channel (e.g., #recent-tweets).
  • Saves hours of manual social media monitoring and centralizes alerts into your communication platform.

The benefits? You stay proactive on social media, catch issues or praise early, and streamline your team’s workflow without toggling between platforms.

Prerequisites ⚙️

  • n8n account (self-hosting optional 💻 – consider Hostinger for hosting your n8n instance: https://buldrr.com/hostinger).
  • Twitter API credentials with OAuth 1.0 access (for the Twitter node).
  • Slack workspace and API Token with permission to post messages.
  • Basic familiarity with n8n interface to create and manage workflows.

Step-by-Step Guide to Build This Workflow

Step 1: Create a Cron Node to Schedule

In your n8n editor, click + → Cron. Configure it to trigger every 10 minutes by setting:

  • Mode: everyX
  • Unit: minutes
  • Value: 10

This node automatically starts the workflow on this schedule. You should see your node named Run Every 10 Minutes or rename it for clarity.

Common Mistake: Forgetting to save changes or set the correct time unit, causing no triggers.

Step 2: Define Setup Values with a Set Node

Click + → Set. Add string values:

  • twitterSearchValue with your company Twitter handle (e.g., @n8n_io).
  • slackChannel with your target Slack channel name (e.g., #recent-tweets).

This node holds configuration data used downstream.

Visual: You should see these two fields under Values.

Step 3: Calculate Timestamp 10 Minutes Ago with DateTime Node

From the cron trigger, add a Date & Time node. Set:

  • Action: calculate
  • Value: {{Date()}}
  • Operation: subtract
  • Duration: 10 (or reference from Cron dynamically)
  • Time Unit: minutes

This node produces a timestamp exactly 10 minutes before the current time, to filter tweets.

Step 4: Search Twitter for Mentions

Add the Twitter node. Select operation search.

  • For Search Text, add an expression referencing the Set node’s twitterSearchValue.
  • Use your Twitter OAuth credentials for authentication.

This node fetches the last 50 tweets mentioning your handle.

Step 5: Filter Tweets Created Since Last Run Using If Node

Insert an If node.

  • Set condition type to Date & Time.
  • Compare the tweet’s created_at field with the timestamp from the DateTime node.

This filters out tweets older than 10 minutes, ensuring you alert only on new mentions.

Step 6: Format Tweet Data for Slack

Use a Set node to prepare data:

  • Create a field Tweet with the tweet’s text.
  • Create a Tweet URL field constructed by concatenating Twitter’s URL with the user’s screen name and tweet ID.

This makes the Slack message informative and actionable.

Step 7: Post New Mentions Directly to Slack Channel

Add the Slack node. Configure:

  • Text: Use an expression combining static text and dynamic tweet data from the Set node.
  • Channel: Reference your Slack channel string from the Setup node.
  • Authenticate with your Slack API credentials.

Once this runs, new mentions appear as Slack messages with clickable tweet links.

Customizations ✏️

  • Change Search Frequency: Update the Cron node’s schedule value to a preferred interval (e.g., every 5 minutes) for faster alerts.
  • Expand Search Criteria: Modify the Twitter node’s search text to include alternate company handles or hashtags.
  • Slack Message Styling: In the Slack node, add attachments or formatting for richer message presentation.
  • Add More Filters: Insert additional nodes like Function or Filter between the Twitter and Slack step to filter by tweet language or sentiment.
  • Notify Multiple Channels: Clone the Slack node and configure different channels to notify separate teams.

Troubleshooting 🔧

Problem: Workflow doesn’t trigger on schedule

Cause: Cron node misconfiguration or workflow not activated.

Solution: Revisit the Cron node, confirm every 10 minutes setup, activate workflow from top-right toggle.

Problem: Twitter node returns no data

Cause: Invalid Twitter credentials or incorrect search query.

Solution: Reauthorize Twitter credentials, verify search text references the correct handle with @.

Problem: Slack messages not posted

Cause: Slack API credentials missing or channel name error.

Solution: Check Slack node credentials, confirm channel name includes # if required.

Pre-Production Checklist ✅

  • Verify Twitter API credentials have read access for search.
  • Test Slack API token’s message posting using a test message.
  • Run workflow manually first to confirm data flows correctly and nodes execute without errors.
  • Test different Twitter search queries for expected mention results.
  • Ensure workflow is activated for scheduled runs.

Deployment Guide

Activate the workflow by toggling it from draft to active within n8n. Confirm the cron scheduling is running.

Monitor initial runs using n8n’s execution logs to catch any failures early.

Consider setting up email alerts on workflow failures for production readiness.

Conclusion

By following this guide, you’ve created a tailored n8n workflow that automatically scrapes Twitter mentions for your company handle every 10 minutes and sends timely alerts to your Slack channel. This automation saves hours of manual monitoring daily and ensures your team never misses a critical mention.

Next steps? Extend this by incorporating sentiment analysis for prioritizing tweets or adding a database to archive mentions for reporting. You’re well on your way to mastering social media automation using n8n!

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 in n8n

A complete beginner guide to building an AI-powered 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