Track country economic indicators in Google Sheets, refreshed monthly

By General Input

On the first of every month, pull the latest World Bank values for the countries and indicators you list and append them to your tracking sheet in tidy long format.

Integrations

  • World Bank
  • Google Sheets

Type

Deterministic Code

Categories

  • Operations
  • Finance

On the first day of every month at 06:00, refresh a "country indicators" tracking sheet in Google Sheets with the latest World Bank values. This is a deterministic ETL pipeline with no judgement step.

Trigger: cron, monthly on the 1st at 06:00. Workflow type: code (discrete nodes, deterministic flow).

Inputs the workflow should expose: the Google Sheets spreadsheet ID, the name of the config tab (default "config"), and the name of the data tab (default "data").

Step 1. Read the configuration tab from Google Sheets using the Get Values operation. The config tab has a header row and three columns starting in row 2: country_code (ISO 3-letter, e.g. USA, BRA, EUU), indicator_code (e.g. NY.GDP.MKTP.CD), and indicator_label (a human-friendly name like "GDP, current US$"). Read the full range to learn which (country, indicator) pairs to refresh on this run.

Step 2. For each (country_code, indicator_code) pair from the config tab, call World Bank's Get Indicator Data operation. Pass mrnev=1 so the API returns only the most recent non-empty observation along with its year. Also pass format=json and a generous per_page. Important: World Bank JSON responses are a two-element array shaped [meta, rows], so destructure both halves and read the value, date (year), and country.value (country name) from the first row. If the response has no rows or value is null, skip the pair instead of appending a blank row.

Step 3. Append one row per successful pair to the data tab using Google Sheets' Append Values operation. Use long/tidy format with these columns in this order: country_code, country_name, indicator_code, indicator_label, year, value, fetched_at. fetched_at is the workflow run timestamp in ISO 8601. Append only, never overwrite, so history accumulates over each monthly run. Use valueInputOption USER_ENTERED so numbers and dates are parsed by Sheets.

Keep the long format (one observation per row) so analysts can pivot the sheet however they like. Both integrations are world-bank (Get Indicator Data) and google-sheets (Get Values, Append Values). No auth is required for World Bank; Google Sheets uses OAuth.

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