Brand mention log with Teams alerts for outliers

By General Input

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.

Integrations

  • NewsWhip
  • Google Sheets
  • Microsoft Teams

Type

Deterministic Code

Categories

  • Marketing
  • Operations

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.

Related prompts

Explore more prompts
Call overdue Xero customers with an AI collections agentLocal listing health board for every location you manageLet support send one-off Loops emails without an engineerStop cold emails to anyone with a live deal in PipedriveiMessage campaign console with pre-flight checks and delivery boardLinkedIn Ads budget pacing dashboard for every client accountFront desk appointment confirmation board for the next 3 daysGive your team Looker numbers without buying more seatsBuild audience segments from product usage and push to LoopsTurn the people who engage with your posts into Pipedrive leads