X keyword tracking with rich Mattermost attachment notifications
This deterministic n8n workflow polls recent X search results on a cron schedule for a chosen keyword. It formats tweet text, direct post URLs, author profile images and accent colours into attachment metadata. A Function node tracks seen IDs in node memory so only new mentions post to Mattermost.
- Catalogue ID
- #0357
- Functional nodes
- 5
- Connections
- 4
- Trigger
- cron
- AI layer
- Deterministic
Business problem solved
Product and brand teams on self-hosted Mattermost need clean, formatted social mentions without paying for third-party listening suites. Plain text links without author context slow down triage.
Trigger
A cron trigger runs periodic X keyword searches and feeds new matches into Mattermost.
Connected systems
- X (Twitter)
- Mattermost
- Cron schedule
- Self-hosted n8n
Every workflow is deployed on your own server with documentation, a run log and an error queue.
Workflow architecture
- 1. Twitter (Service and data) (connects to Set)
- 2. Cron (Trigger) (connects to Twitter)
- 3. Function (Logic and routing) (connects to Mattermost)
- 4. Set (Service and data) (connects to Function)
- 5. Mattermost (Service and data)
- Trigger
- AI layer
- Logic and routing
- Service and data
Node positions and directed links are generated from the verified catalogue record.
Workflow steps
- 01
Recent X keyword search
Cron triggers the X search node to fetch the latest posts matching your configured keyword.
- 02
Rich metadata and ID deduplication
Set extracts author avatar, profile URL and tweet text before Function filters out previously seen Tweet IDs.
- 03
Mattermost attachment notification
Unseen posts deliver to your Mattermost channel as clean attachment cards with direct links.
Error queue and human approval
Built-in state in the catalogue workflow
The verified catalogue workflow contains zero node-level error flags across its 5 functional nodes and 4 connections.
Production layer added by ALTAI
During live deployment, ALTAI aligns polling intervals to X API quotas, backs seen IDs with persistent storage, adds Slack or Mattermost retry queues and tracks run logs.
X keyword alerts to Mattermost Frequently asked questions
This build stores seen IDs in node-level static data and builds rich Mattermost attachment cards carrying author images and links.
Yes. X query operators such as OR allow one search call to track several keywords inside your API quota.
Yes. Adding a switch or rule router sends product bugs to engineering and praise to marketing.
Related n8n workflows
X mention alerts to RocketChat
Polls X mentions via cron, deduplicates seen Tweet IDs using workflow static memory and posts unseen mention links to RocketChat.
RSS feed to Mastodon publisher
Polls an RSS feed every 10 minutes, tracks lastRssId in global static data and posts new titles and links to Mastodon over HTTP.
X and webhook sentiment to Strapi
Polls X every 30 minutes and ingests webhook forms, scores sentiment via Google Cloud Natural Language and saves positive items to Strapi.

We write the proposal after we have found the problem together
In a thirty-minute call we listen to how you work and talk through where time and customers are slipping away. If you do not need a digital fix, we will tell you that too.
30 minutes · no preparation needed
The call and the week of discovery are both free.Read the terms