This pipeline enriches /api/changelog with AI-generated summaries without changing the existing API contract.

Flow (n8n)

  1. Trigger: Cron every 3 hours (or manual)
  2. Fetch: GET https://<host>/api/changelog
  3. Split: items one item per changelog entry
  4. Enrich: OpenAI chat/completions node
  5. Collect: re-aggregate items
  6. Persist: write JSON to a stable public URL (R2/KV/n8n storage)
  7. Fallback: if AI fails, keep original item and log errors

Enrichment payload contract

{
  "generated_at": "2025-01-01T00:00:00Z",
  "items": [
    {
      "id": "id|sha|url",
      "summary": "Concise single sentence",
      "bullets": ["bullet one", "bullet two"],
      "type": "release|feature|fix|chore|update"
    }
  ]
}

Frontend consumption (high level)

  • Keep using /api/changelog as the source of truth.
  • Optionally fetch the enrichment JSON after initial render.
  • If ids match, override summary/bullets/type; if missing, fall back to local parsing.
  • Enrichment errors should not block rendering.

Operations notes

  • Store OpenAI credentials in n8n credentials, not in code nodes.
  • Keep temperature low and outputs short ( 240 chars per summary).
  • Guard against sending long bodies or secrets.