Skip to main content

Scenario

You have 15 locations across 3 cities. Customer feedback varies dramatically — the downtown location gets praised for speed, the suburban one gets complaints about parking, the airport location gets dinged for prices. You pull reviews across all locations using batch endpoints, then send the aggregate to Mave for cross-location comparison. The output highlights location-specific strengths, weaknesses, and operational recommendations. Flow: Google GET /accounts/{id}/locations → Per-location GET /locations/{id}/reviews → Aggregate → Mavera POST /mave/chat → Cross-location analysis

Architecture

Code

Example Output

Error Handling

Google uses string ratings (ONE, TWO, etc.), not numbers. The code maps these to 1-5 integers.
Google uses opaque nextPageToken cursors. Never cache or reuse tokens across sessions.
Access tokens expire in 1 hour. Use a refresh token flow or service account for automated jobs.