Competitor News Digest — Workflow Documentation

Airtribe assignment · automated daily competitor intelligence for a Product Manager · live product
Step 2 · Overview

What it does

Every morning at 08:00 IST the workflow searches Google News for each competitor, asks Gemini to score every article for relevance, summarise it in two or three lines and categorise it, drops everything that is not worth a PM's attention, and emails what is left as a single grouped digest. Every article it judged — kept or dropped — is written to Google Sheets so trends can be tracked, and the finished digest is archived on this site. On Fridays it also writes a weekly rollup.

The premise is that a PM does not have time to read news sites daily, but also cannot afford a feed that is 90% noise. Most of the engineering here went into the second problem.

The twenty nodes

Every morning 8:00 ISTSchedule trigger. n8n's timezone is Asia/Kolkata, so 08:00 is IST natively.
Run on demand (webhook)GET endpoint so the digest can be fired for a demo without waiting.
Run now (demo)Manual trigger for use inside the n8n editor.
SettingsOne place for the company, the competitor list, the recipient, the relevance threshold and the Sheet ID.
One item per competitorSplits the competitor list so each is searched separately.
Serper: Google NewsPOST per competitor, India, English, last 24 hours, 10 results.
Collect and de-duplicateFlattens the responses and clusters near-duplicate stories.
Build the promptAssembles the batch prompt from the surviving articles.
Gemini: score, summarise, categoriseOne call, JSON array back.
Keep what mattersMerges the verdicts, ranks non-English down, drops anything below the threshold.
Compose the digestGroups by category and builds the HTML email.
Email the digestGmail send.
Rows for historyPrepares one row per article — kept and dropped.
Append to Sheets (history)Writes them to Google Sheets.
Archive on PMnewsPOSTs the finished digest to this site.
Is it Friday?Branches on the weekday.
Read the weekReads the last seven days from Sheets.
Weekly promptFilters to stories that made a digest and builds the rollup prompt.
Gemini: weekly rollupWrites the weekly brief.
Email the weekly rollupSends it.
Step 2 · Tools and APIs

What it is built from

n8n
self-hosted, v2.20.7
Orchestration: schedule, HTTP calls, branching, email, Sheets.n8n.syntharaai.org
Serper
google.serper.dev/news
Live Google News results. 1 credit per competitor per run; 2,500 free credits.X-API-KEY header, stored as an n8n credential
Google Gemini
gemini-2.5-flash
Relevance score, 2–3 line summary and category, in one batched call. Free tier.n8n credential “Google Gemini(PaLM) Api account”
Gmail
n8n Gmail node
Delivers the digest. OAuth2, send scope only.n8n credential “Gmail account”
Google Sheets
n8n Sheets node
History for trend tracking and the Friday rollup.n8n credential “Google Sheets account”
FastAPI + SQLite
this site
Archive, 30-day trends and a Run-now button.pmnews.heronedgeacademy.com

Credentials needed to reproduce it

No keys appear in the exported workflow. To run it yourself you supply four credentials inside n8n:

SerperFree key from serper.dev. In n8n: a Header Auth credential with name X-API-KEY.
GeminiFree key from Google AI Studio, as a Google Gemini(PaLM) credential.
GmailEnable the Gmail API in Google Cloud, create an OAuth client with redirect https://<your-n8n>/rest/oauth2-credential/callback, add yourself as a test user, then connect it in n8n.
Google SheetsA Sheets OAuth credential with access to one spreadsheet, plus its ID in the Settings node.
Step 2 · Competitor source

Where the competitor list comes from

The scenario is a Product Manager at Zepto, tracking Blinkit, Swiggy Instamart, BigBasket and Flipkart Minutes. Indian quick commerce was chosen because it produces genuine news almost daily — funding, dark-store launches, partnerships, regulatory action — so the digest has something real to say each morning.

The list lives in the Settings node as a single comma-separated field, so there is one place to change it. The brief allows storing competitors in Google Sheets instead; that is a one-node swap, and the node carries a comment saying so. A fixed list was preferred because it makes the workflow reproducible by a reviewer without sharing a spreadsheet, and because letting the AI discover competitors on the fly introduces drift — the set would quietly change between runs and the trend history would stop being comparable.

Step 2 · AI prompts

The prompts, verbatim

Daily: score, summarise, categorise

You are a research assistant for a Product Manager at {company}, an Indian quick-commerce company.

Below are news articles about competitors. For EACH article, judge it from the PM's point of view.

Return a JSON array with one object per article, in the same order, each with:
  "relevance": 1-10. How useful is this to a {company} PM deciding what to build or worry about?
      10 = a competitor shipped a feature, raised money, entered a category or changed strategy.
      7  = a material operational or regulatory event at a competitor.
      5  = general industry or market news that sets context.
      3  = a passing mention of the competitor in a story that is really about something else.
      1  = irrelevant. Local crime, celebrity gossip, unrelated use of the brand name, pure stock
           tips, or an article not really about the competitor at all.
      Use the full range. If everything looks like a 10 you are not discriminating: reserve 9 and 10
      for news that would genuinely change what a PM does this quarter.
  "category": exactly one of ["Product Launch", "Funding", "Partnership", "Expansion", "Leadership",
      "Regulation", "Financials", "Marketing", "Other"]
  "summary": 2-3 lines, plain English, what happened and why a PM should care. No preamble, no
      repeating the headline verbatim.

Judge only what the title and snippet actually say. Do not invent details. If an article is too thin
to tell, give it a low relevance rather than guessing.

Articles:
{articles}

Reply with the JSON array only.

Friday: weekly rollup

You are briefing a Product Manager at {company} on the competitive week just gone.

Here are the competitor stories collected this week, already summarised:

{articles}

Write a short weekly rollup:
  - 3 to 5 bullets on what actually mattered, naming the competitor each time
  - one line on any pattern across the week (a category several rivals moved in, a repeated theme)
  - one line on what you would watch next week

Be concrete and brief. If the week was quiet, say so rather than padding.

Both run on gemini-2.5-flash at temperature 0.2 (0.3 for the rollup), with responseMimeType: application/json on the daily call so the reply parses reliably.

Step 2 · Key decisions

Why it is built this way

Serper rather than NewsAPI.org
The brief suggests NewsAPI.org, but its free Developer tier delays every article by 24 hours, truncates content to 200 characters and is licensed for localhost only. A digest whose whole promise is this morning's news cannot be built on a 24-hour lag. Serper returns live Google News, is explicitly permitted by the brief, and its 2,500 free credits last roughly 500 days at four competitors a day.
One Gemini call for the whole batch, not one per article
Twenty-five articles could mean twenty-five API calls. Batching them into a single prompt that returns a JSON array is faster, cheaper, keeps the free-tier rate limit out of trouble, and lets the model see the articles side by side — which is what makes it spot that eight of them are the same story.
Relevance scoring is not an optional extra
The first raw query for “Blinkit” returned a fatal bike accident in Sonipat, a credit-card listicle and two Gujarati TV clips alongside the real business news. Without scoring, the digest is mostly noise. It runs in the same call as the summary and category, so it costs nothing extra.
Near-duplicate clustering
One Maharashtra FDA raid produced nine different headlines across nine outlets, each scored 10/10, and they filled the entire digest. Exact-title matching cannot catch that because every outlet rewrites the headline. Comparing the significant words instead collapses them into one entry carrying also covered by 8 other outlets — which is itself a signal of how big a story is.
A guard for thin headlines
A Gujarati or Marathi headline yields only the Latin brand names as comparable words, so a single shared word looked like 50% agreement and merged unrelated stories. Titles with fewer than four usable words now require a near-identical match before they are clustered.
Calibrating the score
The first prompt gave anchors at 10, 5 and 1, and Gemini parked almost everything at 10. Adding anchors at 7 and 3 plus an explicit instruction to use the range produced real discrimination — scores now spread from 1 to 10 in a single run.
Non-English stories are ranked down, not dropped
Regional-language coverage of an Indian story is legitimate news, but it is unreadable in an English digest. Rather than discard it, its relevance is reduced so it cannot take a top slot while still appearing on a quiet news day.
The website archives; it does not re-run
The site could have run its own copy of the pipeline, but two schedules would mean two sources of truth. Instead n8n composes and emails the digest, then POSTs exactly what went out to the site. What you read on the web is what landed in the inbox.
Secrets live in credentials, not in the workflow file
The Serper key is an n8n credential rather than an inline header, so the exported workflow JSON submitted with this assignment contains no keys at all.
Step 5 · Optional extensions

All three, implemented

Google Sheets historyEvery article is appended to a spreadsheet with its competitor, category, relevance, summary, source and whether it made the digest. Dropped articles are stored too — they are how you check later whether the relevance threshold is set right.
Trend trackingThe front page reads that history and shows, over 30 days, what each competitor has been in the news for and the category mix across all of them.
Friday weekly rollupA weekday branch reads the last seven days from Sheets, filters to stories that made a digest, and asks Gemini for a short brief: what mattered, any pattern across the week, and what to watch next. Emailed the same way.
AI relevance scoringEvery article gets 1–10. Below 6 it is stored but kept out of the email. On a normal run this removes roughly half of what was fetched.
Step 4 · Workflow file

Reproducing it

Download the workflow JSON — import into n8n via Workflows → Import from File, attach the four credentials, put your Sheet ID and recipient in the Settings node, and activate.

Live workflow ID KFR0wEDv4BMVEPgc. The file contains no API keys.

Honest notes

What is not perfect

Built with n8n, Serper, Gemini 2.5 Flash, Gmail, Google Sheets and FastAPI.