Skip to main content

Scenario

Your company’s Notion knowledge base — product docs, style guides, internal memos, blog drafts — represents your authentic voice. Instead of manually defining brand guidelines, you extract them from how your team actually writes. This job pulls pages from a knowledge base database, aggregates the text, and creates a Mavera Brand Voice that captures your organization’s natural tone, vocabulary, and patterns. Flow: Notion POST /databases/{id}/query (knowledge base) → GET /blocks/{page_id}/children per page → Aggregate text → Mavera POST /api/v1/brand-voices → Brand Voice profile

Code

Example Output

Error Handling

If your KB database doesn’t have a Category select property, query without the filter and use page_size: 30 to get a broad sample across all page types.
Brand Voice extraction works best with 5,000+ words across varied content types. If you have fewer than 10 pages, supplement with published blog URLs via the urls field.
The extraction captures plain text only. Bold, italic, and code formatting are stripped. This is intentional — Brand Voice focuses on language patterns, not formatting.