Brand mention log with Teams alerts for outliers

Log every article that mentions your brand to a Google Sheet and ping your comms team in Microsoft Teams the moment one starts going viral.

Deterministic Code
NewsWhipGoogle SheetsMicrosoft TeamsMarketingOperationsResearch & MonitoringNotifications & AlertsData Sync

Build me a code workflow that maintains a structured engagement log of every brand mention and pings Microsoft Teams when an article is an outlier. Trigger: cron every 30 minutes.

Step 1. Call NewsWhip's Quick Search Articles operation with our configured brand keywords (configurable list, default to a single brand term) over the last hour. Page through results if needed.

Step 2. Read the existing rows from the configured Google Sheet using Get Values so we can dedupe. Build a set of article uuids already logged. For each article returned by NewsWhip, skip it if its uuid is already in the set.

Step 3. For each new article, append a row to the Google Sheet via Append Values with these columns in order: uuid, publication_timestamp, headline, publisher, link, nw_score, fb_total_interactions, tw_count, li_count, pi_count, fb_overperforming, topics. Topics should be a comma-joined string. Batch the appends in a single request when possible.

Step 4. After the sheet append, evaluate each newly logged article against two configured thresholds: nw_score_threshold (default 7) and fb_total_interactions_threshold (default 1000). If the article exceeds either threshold, send a Microsoft Teams Create Channel Message to the configured comms team and channel. The message should include the headline (as a link to the article), the publisher, the publication timestamp, the nw_score, fb_overperforming multiplier, and fb_total_interactions. Format the message as an adaptive card or rich HTML so the metrics are scannable.

Configurable inputs: brand keyword list, target spreadsheet id and tab name, Teams team id and channel id, nw_score_threshold, fb_total_interactions_threshold, lookback window in minutes (default 60). The workflow must be deterministic and idempotent. No LLM judgement steps. If NewsWhip returns nothing or every article is a duplicate, exit cleanly without sending any Teams messages.

Additional information

What does this prompt do?
  • Checks for new articles mentioning your brand every 30 minutes, around the clock.
  • Adds each new article to a running Google Sheet with publish time, headline, publisher, link, and engagement metrics like Facebook interactions and overperforming score.
  • Posts a Microsoft Teams alert to your comms channel the moment an article crosses your engagement threshold, so you never miss a story going viral.
  • Skips articles already in the sheet so reruns never create duplicate rows.
What do I need to use this?
  • A NewsWhip account with API access for your brand keywords.
  • A Google account with edit access to the sheet you want to log mentions in.
  • A Microsoft Teams workspace with a channel for comms alerts.
  • A rough idea of what counts as a viral article for your brand (engagement score or Facebook interactions threshold).
How can I customize it?
  • Change the keywords NewsWhip watches to track competitors, executives, or product names alongside your brand.
  • Adjust the alert thresholds so only articles you actually care about wake up the comms channel.
  • Swap the destination Teams channel, change the cadence (hourly, every 15 minutes), or extend the sheet with extra columns like sentiment or region.

Frequently asked questions

Will this double-log the same article when it runs again?
No. Before adding any row, the workflow checks the sheet for the article's unique ID and skips anything already logged, so reruns and overlapping search windows stay clean.
What counts as an outlier worth alerting on?
You set the bar. Pick a NewsWhip predicted engagement score, a Facebook interaction count, or both. Anything above your threshold triggers a Teams message; everything else just gets logged quietly.
Can I send the alerts somewhere other than Microsoft Teams?
Yes. Once the workflow is running you can swap the alert step for Slack, email, or another channel without touching the logging side.
How fresh are the mentions?
The workflow runs every 30 minutes and pulls articles from the last hour, so most mentions land in the sheet within an hour of publication.
Do I need to be a developer to use this?
No. Connect your NewsWhip, Google, and Microsoft Teams accounts once, point the workflow at your sheet and channel, and it runs on its own.

Stop refreshing news searches for your brand.

Connect NewsWhip, Google Sheets, and Microsoft Teams once, and Geni keeps a clean log of every brand mention while pinging your comms team the moment one goes viral.