Daily news archive for tracked keywords in Google Sheets

By General Input

Every weekday at 7am, log every fresh news article matching your tracked keywords into a Google Sheet, with no duplicates and no manual work.

Integrations

  • NewsAPI
  • Google Sheets

Type

Deterministic Code

Categories

  • Marketing
  • Operations

Build me a deterministic daily news archive pipeline as a code workflow. No AI step, no summarization, no branching by content. The whole thing is read-config, fetch, dedupe by URL, append.

Trigger: cron, every weekday (Monday through Friday) at 7:00am in my local timezone.

The workflow targets one Google Sheet with two tabs: a Keywords tab and an Articles tab. The spreadsheet ID and both tab names should be exposed as workflow configuration so I can point it at any sheet without code changes.

Step 1: Use Google Sheets Get Values on the Keywords tab to read every keyword row. Each row has a keyword in column A and optional language (column B) and sources (column C) filters. Treat empty cells as 'no filter'.

Step 2: For each keyword row, call NewsAPI Search Everything with q set to the keyword, from set to 24 hours ago (ISO 8601), to set to now, sortBy set to publishedAt, and pageSize 100. If the row has a language value, pass it as the language parameter. If the row has a sources value (comma-separated), pass it as the sources parameter. Collect all returned articles across all keywords, tagging each article with the keyword that found it.

Step 3: Use Google Sheets Get Values on the Articles tab to read the existing url column. Build an in-memory Set of these URLs to use as the dedupe set.

Step 4: For each fetched article whose url is not already in the dedupe set, build a row with these columns in this order: timestamp (workflow run time, ISO 8601), keyword, source.name, author, title, url, publishedAt, description. Skip articles missing a url. Within this run, also dedupe by url so the same article isn't added twice if two keywords both match it.

Step 5: Use Google Sheets Append Values to write the new rows to the Articles tab in a single batched call with valueInputOption USER_ENTERED so URLs render as clickable links. If there are zero new rows, skip the append entirely and exit cleanly.

Error handling: if NewsAPI returns a non-ok status for a keyword, log it and continue with the remaining keywords rather than failing the whole run. Respect NewsAPI rate limits with a small delay between keyword calls if the keyword list is long.

Output: a self-updating research archive in Google Sheets that the team can sort, filter, and pivot. No notifications, no Slack post, no summary; the sheet is the deliverable.

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