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.
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?
What counts as an outlier worth alerting on?
Can I send the alerts somewhere other than Microsoft Teams?
How fresh are the mentions?
Do I need to be a developer to use this?
Related templates
Every night we run your saved Databricks query and refresh a Google Sheet with the results, so your team reads the latest numbers without a login.
Every morning, automatically record yesterday's match results and each league's latest table into a spreadsheet you can chart or pivot.
Every morning we check your list of IP addresses for abusive activity, update your spreadsheet, and alert your team only about the risky ones.
When a pull request opens in Azure DevOps, an agent writes a plain-English summary and posts it to Teams so reviewers instantly know what to prioritize.
Automatically add every new Azure DevOps work item to a Google Sheets tracker so your team can filter, sort, and report without opening Azure DevOps.
Check key email accounts against known data breaches every weekday, log every exposure to a spreadsheet, and get a Slack alert when a new breach shows up.
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.