Daily country risk digest for global operations teams

By General Input

Track protests, strikes, sanctions, severe weather, and conflict across every country your supply chain touches, with a morning email and a running log in Sheets.

Integrations

  • GDELT
  • Google Sheets
  • Gmail

Type

Deterministic Code

Categories

  • Operations

Build a code workflow that produces a daily country risk digest for our global operations team. It should watch news volume and tone across the countries where we have warehouses, suppliers, or contractors so we get an early signal on protests, strikes, sanctions, severe weather, and conflict before they disrupt shipments.

Trigger: cron, every weekday at 6am UTC.

Inputs the workflow should accept as configuration: a list of two-letter ISO country codes (for example US, MX, DE, VN, NG), the spreadsheet ID and sheet/tab name for the running risk log, the Gmail distribution list to email, and the tone-drop threshold that triggers a REVIEW marker (default 2.0).

For each country in the configured list, call GDELT three times with the last 7 days as the time window and a query that combines a locationcc filter for that country code with the conflict themes theme:PROTEST, theme:STRIKE, theme:SANCTIONS, theme:NATURAL_DISASTER, and theme:TERROR (OR them together).

1. GDELT Article Volume Timeline (DOC 2.0) to get the daily article count series for that query.

2. GDELT Article Tone Timeline (DOC 2.0) to get the daily average tone series for the same query.

3. GDELT Search News Articles (DOC 2.0) to grab the top 5 headlines for that country over the same 7 days, sorted ascending by tone so we surface the most negative coverage first. Capture title, source domain, and URL.

Be a polite GDELT client: run the per-country calls serially rather than in parallel, target roughly one request per second, and back off and retry on HTTP 429. Always pass format=json. Handle countries that return zero articles gracefully (article count 0, tone null, no headlines, no REVIEW flag).

From the two timeline series, compute for each country: total article count over the 7 days, 7-day average tone, and the day-over-day tone delta (yesterday's average tone minus the prior day's average tone).

Then append one row per country per run to the configured Google Sheet using Google Sheets Append Values. Columns, in order: run_date (YYYY-MM-DD, the UTC date of the run), country_code, country_name, article_count_7d, avg_tone_7d, tone_delta_dod, top_headline_urls (the 5 URLs joined with newlines). This is the running risk log that the team will pivot.

Finally, build a digest email from the same in-memory data. Sort countries by tone_delta_dod ascending so the largest negative shifts are at the top. For each country show: country name and code, article count, 7-day average tone, day-over-day tone delta, and the top 5 headlines as a bulleted list with linked titles. Group the body into a 'Needs review' section (any country whose tone_delta_dod is more negative than the configured threshold, default -2.0) and an 'All watched countries' section underneath.

Send the digest using Gmail Send a Message to the configured distribution list. Subject line: '[Country Risk] <run_date> daily digest'. If any country is in the Needs review section, prepend 'REVIEW: ' to the subject and list the flagged country names in parentheses after the date, for example 'REVIEW: [Country Risk] 2026-05-31 daily digest (Mexico, Nigeria)'. Send the body as HTML so the headline links are clickable, with a plain-text fallback.

GDELT has no authentication. Google Sheets and Gmail both use the user's connected Google account.

Related prompts

Explore more prompts
Call overdue Xero customers with an AI collections agentLocal listing health board for every location you manageWin back LiveChat visitors whose chats went unansweredLet 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 Loops