Skip to main content

Scenario

Perigon’s /stories/all endpoint groups related articles into story clusters — each cluster represents a single narrative arc across multiple sources. This job pulls top story clusters for your industry, asks Mave to evaluate each cluster for content potential and timing, then generates a week’s worth of content calendar entries with formats, angles, and publish dates. Flow: Perigon GET /stories/all → Mavera POST /mave/chat (evaluate clusters) → POST /generations (calendar entries) → Content calendar

Code

Example Output

Error Handling

Some queries return clusters with zero articles in the response. Check articleCount before processing. Fall back to /all for raw articles.
Starter plans: 100 req/day. This job uses 1 Perigon call + 2 Mavera calls. Safe for daily runs on any plan.
Clusters with updatedAt older than 72 hours may have peaked. Use sortBy=createdAt to prioritize fresh narratives.