This pipeline enriches /api/changelog with AI-generated summaries without changing the existing API contract.
Flow (n8n)
- Trigger: Cron every 3 hours (or manual)
- Fetch:
GET https://<host>/api/changelog - Split: items → one item per changelog entry
- Enrich: OpenAI chat/completions node
- Collect: re-aggregate items
- Persist: write JSON to a stable public URL (R2/KV/n8n storage)
- 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/changelogas 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.