Hourly negative sentiment spike alerts in Slack

Watch your brand on social every hour, ping a Slack channel when negative chatter spikes, and open a Linear ticket so the response gets tracked.

Deterministic Code
InfegySlackLinearMarketingCustomer SupportNotifications & AlertsResearch & MonitoringFeedback Triage
PromptCreate

Build a code workflow that monitors my brand for negative sentiment spikes on social media and alerts the team only when something looks off. The workflow should run every hour on a cron trigger.

On each run, use Infegy Starscape with my saved brand tracking query and a date filter for the last 60 minutes. First call the Validate Query and Get Estimated Result Count operation to confirm the query is valid and to get the estimated mention count for the window. Then call Get Topics Analysis on the same query and window to retrieve the top driving themes along with size and sentiment for each topic, plus the overall net sentiment and negative sentiment percentage for the window.

Compare the results to a configured baseline. The baseline has two parts, a rolling 7 day average of hourly mention volume (with a configurable multiplier, default 2x), and a negative sentiment percentage threshold (default 35 percent). Treat a spike as a breach of either threshold.

If neither threshold is breached, exit silently with no notifications. If at least one is breached, fan out to two destinations:

1) Send a Message in Slack to the #brand-watch channel. The message should be structured with the brand name, the time window, the current mention count vs. the baseline, the negative sentiment percentage vs. the threshold, the top 3 to 5 driving themes from Get Topics Analysis (theme name, size, sentiment), and a link back to the underlying Starscape query so a human can dig in.

2) Create Issue in Linear with a clear title (for example, "Negative sentiment spike detected for {brand} at {time}"), a description that mirrors the Slack alert, priority set to high (priority 2), the brand or CX on-call teammate as assignee, and a label of sentiment-spike so the response is formally tracked.

Make the brand tracking query, the Slack channel, the Linear team, the assignee, the volume multiplier, and the negative sentiment threshold configurable inputs at the top of the workflow. Log the computed values on every run, even when the workflow exits silently, so we have an auditable history.

Additional information

What does this prompt do?
  • Checks the last hour of brand mentions in Infegy Starscape every hour, on the clock.
  • Compares mention volume and negative sentiment against a rolling 7 day baseline you configure.
  • Posts a structured alert to a Slack channel with the top driving themes, mention counts, and a link to the live query when something looks off.
  • Opens a high priority Linear issue tagged sentiment-spike so the brand or CX on call has a tracked place to respond.
  • Stays silent when nothing is wrong, so the channel only lights up when it matters.
What do I need to use this?
  • An Infegy Starscape subscription with API access enabled, plus a saved tracking query for your brand.
  • A Slack workspace with a channel for brand alerts, such as #brand-watch.
  • A Linear workspace where the on call brand or CX teammate can be assigned issues.
  • Your baseline numbers, a typical hourly mention volume and a negative sentiment percentage you consider normal.
How can I customize it?
  • Change the cadence, run it every 15 minutes during a launch or every 4 hours for quieter brands.
  • Tune the thresholds, raise the negative sentiment percentage or volume multiplier so you only alert on genuine spikes.
  • Swap recipients, point alerts at a different Slack channel or assign Linear issues to a specific person, label, or project.

Frequently asked questions

Do I need a paid Infegy plan to use this?
Yes. Infegy Starscape is a paid social listening platform and your subscription must include API access. If you do not see API Access in your Infegy account, ask your account manager to enable it.
What counts as a spike?
You decide. The workflow compares the last hour to a rolling 7 day average of hourly mention volume and a target negative sentiment percentage. If either threshold is breached, you get an alert. If not, the workflow exits silently.
Will it spam my Slack channel?
No. The workflow only posts when at least one threshold is breached. Quiet hours stay quiet, so the channel becomes a real signal for your brand or CX team.
Can I send the alert somewhere other than Slack?
Yes. You can change the destination channel, route alerts to a private channel, or add Linear-only mode so a ticket is created without the broadcast.
Who gets the Linear issue?
By default the on call brand or CX teammate. You can assign it to any Linear user, set a different priority, or use a different label such as crisis or pr-watch.

Related templates

Weekend football matchday preview, posted to Slack

Every Friday, get a ready-to-read preview of your league's weekend matches, with positions, form, scorers to watch, and predicted results, posted to Slack.

API-Sports
Slack
Agentic Task
Weekly Braintree revenue and refund report for finance

Every Monday morning, finance leadership gets a clear recap of last week's Braintree sales, refunds, and disputes by email and Slack.

Braintree
Gmail
Slack
Agentic Task
Daily IP reputation screening with Slack threat alerts

Every morning we check your list of IP addresses for abusive activity, update your spreadsheet, and alert your team only about the risky ones.

AbuseIPDB
Google Sheets
Slack
Agentic Task
Turn Heroku deploys into a readable Slack changelog

Every time you ship to Heroku, we post a clear summary to Slack listing what changed, who deployed it, and whether it was a rollback.

Heroku
GitHub
Slack
Agentic Task
Daily backup compliance check for ClickHouse Cloud

Every morning, check each ClickHouse service against its own backup schedule, get a Slack summary, and a Linear ticket for anything stale or failed.

ClickHouse Cloud
Slack Bot
Linear
Agentic Task
Morning team travel briefing with live flight alerts

Every weekday morning, your team gets one Slack briefing on who's flying today, their live flight status, and any delays or cancellations to act on.

AviationStack
Google Sheets
Slack
Agentic Task

Catch a brand crisis before it trends.

Connect Infegy, Slack, and Linear once, and Geni watches your brand every hour and only speaks up when something is wrong.