Triage X brand mentions into Zendesk and Slack

By General Input

Every 15 minutes, scan X for mentions of your brand, then turn complaints and support questions into Zendesk tickets and ping Slack on anything that looks like a PR risk.

Integrations

  • X (Twitter)
  • Zendesk
  • Slack Bot

Type

Agentic Task

Categories

  • Customer Support
  • Marketing

Build me an agent that watches X (Twitter) for brand mentions and triages them. It should run on a cron schedule, every 15 minutes.

On each run, the agent should use X (Twitter) Search Recent Tweets with a configurable query I provide (my brand handle, my product names, and common misspellings combined with OR) and also call X (Twitter) Get User Mentions for my own handle so we catch anything the keyword search missed. Only pull posts newer than the last time we ran.

For each new post, the agent should classify two things: sentiment (positive, neutral, negative) and intent. The intent buckets are: praise, neutral chatter, complaint, support question, bug report, and PR risk. PR risk is the special bucket for anything that could spread or damage the brand: viral complaints, accusations, safety issues, posts from high-reach accounts, or anything that reads like the start of a pile-on.

Then route the result based on the intent:

1. Positive or neutral mentions: log silently. Do not create a ticket and do not send a Slack message.

2. Complaints or support questions or bug reports: call Zendesk Create Ticket. The subject should be a one-line summary of the post. The description should include the full tweet text, the author handle, a direct URL to the tweet (https://x.com/{author_handle}/status/{tweet_id}), the detected sentiment, and the detected intent. Tag the ticket with 'x-mention' and the intent label so support can filter.

3. Anything flagged PR risk: in addition to whatever ticket got created above, also call Slack Bot Send a Message to a configurable channel (default #pr-alerts). The message should lead with a severity label (low, medium, high), then the tweet text in a quote, then the author handle and follower count if available, then a deep link to the post. Use Slack mrkdwn formatting.

De-dupe by tweet ID. Keep a record of every tweet ID the agent has already processed and skip it if it shows up again, including the case where the same mention is returned by both the keyword search and the direct-mentions endpoint. Persist this across runs so we never ticket or alert the same mention twice.

Inputs I want to be able to configure: the keyword query string, my X handle, the Zendesk tags to apply, the Slack channel for PR alerts, and which intents create tickets versus which only log.

At the end of each run, print a short summary in the run log: how many new posts were seen, how many tickets were created, how many Slack alerts were fired, and how many were logged silently.

Related prompts

Explore more prompts
A brand asset library your marketing team actually searchesTurn Mailjet email clicks into ranked HubSpot follow-upsClean out the Looker dashboards and Looks nobody opensLiveKit live operations console for room moderationWake up dormant Keap leads with a researched reasonLiveChat coverage board for planning next week's shiftsPhone routing control panel for LiveKit voice agentsLinkedIn Ads budget pacing dashboard for every client accountGive your team Looker numbers without buying more seatsPause marketing emails to escalated customers, then restore them