Skip to main content

Scenario

Your SurveyMonkey survey collected 1,200 responses across 20 questions — multiple choice, ratings, open-ended. Manually analyzing this would take days. This job pulls all responses via the bulk endpoint, structures them for analysis, then sends the entire dataset to Mave Agent with the instruction: “Analyze responses. Identify statistical patterns, sentiment trends, and actionable recommendations.” The result is an AI-generated research report that would normally require a dedicated analyst. Flow: SurveyMonkey GET /v3/surveys/{id}/responses/bulk → Aggregate and structure → Mave POST /api/v1/mave/chat: “Analyze responses. Identify statistical patterns, sentiment trends, recommendations.” → Research report

Architecture

Code

Example Output

Error Handling

Private apps are capped at 500 requests per day. The bulk endpoint returns 100 responses per page, so a 2,000-response survey needs 20 calls. Cache responses locally after the first pull.
Matrix questions nest rows and columns. The code concatenates “Row: Column” labels. For complex matrices (10×10), the summary may be verbose — truncate to top 5 combinations.
If choice_labels doesn’t find a match, the raw choice ID is used. This happens with custom “Other” options. Pre-populate the lookup from the survey detail endpoint.
Surveys with 20+ questions and 1,000+ responses generate large summaries. The code caps open-ended samples at 15 and text at 500 chars. For very large surveys, analyze in sections.