Skip to main content

Scenario

Your team takes meeting notes in Notion — standups, strategy sessions, customer calls, board meetings. After weeks of meetings, patterns hide in plain sight: recurring decisions never executed, action items forgotten, themes nobody synthesized. This job pulls meeting pages from a database, extracts their block content, and sends the aggregate to Mave Agent for cross-meeting analysis. Flow: Notion POST /databases/{id}/query (meeting notes DB) → GET /blocks/{page_id}/children per page → Aggregate text → Mavera POST /api/v1/mave/chat → Action items, decisions, themes

Code

Example Output

Error Handling

Notion supports nested content (toggles, callouts with children). The code recurses up to depth 2. For deeply nested pages, increase the depth limit but watch rate limits.
Pages with 200+ blocks require pagination via start_cursor. The code handles this automatically. Very large pages may hit the 12K character corpus limit — increase for thorough analysis.
The past_month filter requires the property to be a date type. If your database uses created_time instead, change the filter to {"timestamp": "created_time", "created_time": {"past_month": {}}}.
Each meeting page must be shared with the integration. If pages are in a shared workspace, sharing the parent database shares all child pages automatically.