Daily country risk digest for global operations teams
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.
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.
Additional information
What does this prompt do?
- Watches worldwide news coverage every weekday morning for the list of countries where you have warehouses, suppliers, or contractors.
- Measures how much each country is being talked about and how negative the coverage is, so you can spot trouble before it hits your shipments.
- Logs one row per country per day to a Google Sheet so you build a long running risk history you can pivot and chart.
- Emails the operations team a ranked digest with the countries whose news tone dropped the most, and flags the worst with a REVIEW marker in the subject line.
What do I need to use this?
- A list of the countries you want to watch, using their two-letter country codes.
- A Google account with access to the Sheet you want the daily log written to.
- A Gmail account that can send the digest email, plus the distribution list address that should receive it.
How can I customize it?
- Change the country list as your footprint grows, or split it by region and run two separate digests.
- Adjust the risk themes you care about, for example focus only on strikes and severe weather, or add disease outbreak coverage.
- Move the send time, the recipient list, or the threshold that triggers the REVIEW flag in the subject line.
Frequently asked questions
Do I need to pay for a news data subscription to run this?
How do I tell the workflow which countries to track?
What counts as a risk event?
What does the REVIEW flag in the email subject mean?
Can I send the digest to a Slack channel or Microsoft Teams instead of email?
Catch the next supply chain disruption before it ships.
Connect Google Sheets and Gmail once, and Geni delivers a fresh country risk digest every weekday morning.