Skip to main content

Scenario

You ran a Typeform survey with 500+ responses covering demographics, goals, pain points, and preferences. The data is rich but raw — buried in CSV exports and manual pivot tables. This job pulls all responses via the API, sends them to Mave Agent with the instruction to identify distinct audience segments, then automatically creates Custom Personas for each discovered segment. The result is a data-grounded persona library built from real survey answers, not assumptions. Flow: Typeform GET /forms/{id}/responses → Aggregate structured + open-ended → Mave POST /api/v1/mave/chat: “Identify distinct audience segments. Create persona profiles.” → Parse segments → POST /api/v1/personas per segment

Architecture

Code

Example Output

Error Handling

Typeform’s limit is strict. The code includes 600ms delays between paginated calls and retries on 429 with 1s backoff. For forms with 5,000+ responses, expect 3+ minutes for full extraction.
Typeform has 15+ answer types (choice, choices, text, number, rating, boolean, email, date, file_url, payment, etc.). The extractor covers the most common. Add cases for date, file_url, payment if your forms use them.
Mave’s response may embed JSON in markdown code blocks. The parser looks for the first [ and last ] to extract the array. If parsing fails, the code prints the analysis text for manual review.