Brand mention alerts on X to Slack

Catch what people are saying about your brand on X and ping the right Slack channel within 30 minutes, with sentiment, follower context, and a suggested response.

Agentic Task
TwitterAPI.ioSlackMarketingCustomer SupportNotifications & AlertsResearch & MonitoringFeedback Triage

Build me an agent-based brand listening workflow that watches X for posts about my brand and pings my team in Slack the moment something needs attention.

Trigger: cron, every 30 minutes during business hours in my local timezone (default Mon–Fri, 8am–7pm; make this configurable). Outside business hours the workflow should not run.

Inputs the user should be able to configure when installing the workflow: (1) a search query string built from brand handle, product names, common misspellings, and aliases — pass it through to TwitterAPI.io Advanced Search as the query, supporting standard Twitter search operators like OR, quotes, and -filter:retweets; (2) the Slack channel for high-impact alerts; (3) the Slack channel for the hourly low-impact digest (can be the same channel); (4) a follower-count threshold for escalation (default 5,000); (5) the business-hours window.

On each run, use TwitterAPI.io Advanced Search to fetch posts matching the configured query. Use a sinceTime cursor so each run only pulls posts created since the last successful run — store the highest seen tweet ID and the run's end timestamp in workflow run state. On the very first run, default sinceTime to 30 minutes ago. Paginate results until has_next_page is false or the data array is empty.

For every new post returned, call TwitterAPI.io Get User Info on the author so you have their follower count, verified/blue status, account creation date, and bio. Use these to enrich the triage.

Then have the agent classify each post on two axes: sentiment (positive, neutral, negative, outrage) and intent (customer complaint, support question, praise, spam, journalist inquiry, competitor jab, other). Have it also produce a one-sentence summary and a suggested response category (e.g. "reply publicly", "route to support", "escalate to PR", "ignore").

Decide high-impact vs low-impact with these defaults (make them tunable): high-impact = sentiment is outrage, OR sentiment is negative AND author followers >= threshold, OR intent is journalist inquiry, OR the author is verified with > 50k followers. Everything else is low-impact.

For each high-impact post, immediately post a Slack message to the alerts channel using Slack Send a Message. Format the message as a Block Kit block (or rich markdown if simpler) showing: author handle and follower count, verified badge, link to the post, the AI one-sentence summary, sentiment + intent labels, the suggested response category, and the raw post text in a quote block. One Slack message per high-impact post.

For low-impact posts, do NOT send a per-post message. Instead, accumulate them in workflow run state and, once per hour (or at the top of the next hour after the first low-impact post collected), post a single digest message to the digest channel via Slack Send a Message. The digest should list count by sentiment, count by intent, and include a short bulleted list of the top 5 by reach with links. After sending the digest, clear the accumulator.

Deduplication: keep the last-alerted tweet ID in run state. Before alerting on a post, confirm its ID is newer than the last-alerted ID. Update the stored ID only after Slack confirms the message was sent. This guarantees no post is alerted on twice even if a run partially fails and retries.

Error handling: if TwitterAPI.io rate-limits or errors, log it and skip this run — do not advance the sinceTime cursor. If Slack returns a channel_not_found or missing_scope error, surface a clear setup error to the user telling them which channel/permission is wrong.

Keep the prompt for the agent tight: it's a brand-listening triage agent, not a general social media manager. It should never post on X, never DM anyone, and never react to posts. It only reads from X and writes to Slack.

Additional information

What does this prompt do?
  • Watches X every 30 minutes during business hours for posts about your brand, product name, and common misspellings.
  • Scores each post for sentiment and intent (complaint, support question, praise, journalist, competitor jab, spam) and pulls the author's follower count and verified status so you can see who said it.
  • Posts an instant alert to a Slack channel when something high-impact shows up, with a clean summary, the author's reach, a link to the post, and a suggested response category.
  • Quiets the noise by rolling everything low-impact into a single hourly digest so your channel stays signal-only.
What do I need to use this?
  • A TwitterAPI.io account for reading X posts (read-only access, no Twitter login required).
  • A Slack workspace and permission to post in the channel where alerts should land.
  • A short list of terms to watch: your brand handle, product names, common misspellings, and any aliases.
How can I customize it?
  • Change how often it checks (every 15, 30, or 60 minutes) and which hours count as business hours for your team.
  • Edit the watch list to add or remove product names, misspellings, campaign hashtags, or executive handles.
  • Tune what counts as high-impact: the follower threshold, whether to always alert on negative sentiment, or whether journalist accounts always escalate.

Frequently asked questions

Will this catch posts that don't tag my handle directly?
Yes. You give it a list of terms to watch (brand name, product names, common misspellings, campaign hashtags), and it searches for any post that mentions them, whether your handle is tagged or not.
Won't this spam our Slack channel if our brand goes viral?
No. Only high-impact posts ping the channel in real time. Everything else gets bundled into a single hourly digest, so a busy news cycle still produces one rollup message per hour, not hundreds.
How does it decide what's high-impact?
By default, anything with negative sentiment from a sizeable account, anything flagged as outrage, or anything from a journalist gets an instant alert. You can change the follower threshold and the escalation rules to match your team.
Will I get pinged twice about the same post?
No. The workflow remembers the last post it alerted on, so each new run only pulls posts created since the last check and skips anything it already sent to Slack.
Can I send alerts to more than one Slack channel?
Yes. You can route high-impact alerts to one channel (say, a war-room channel) and the hourly digest to another, or split by sentiment or product line.

Stop refreshing X for brand mentions.

Connect TwitterAPI.io and Slack once, and Geni quietly watches X and pings your team only when something actually matters.