The Scenario
You are the CX director and the quarterly business review is in three days. Your VP wants a single slide: total calls, average duration, and total spend, broken down by assistant, for Q1. The data is in Vapi. Your sheet is blank.
You know Vapi has an analytics query API. You do not know how to call it, what the request body looks like, or how to parse the grouped response into a format your sheet can read.
The bad version:
- Find the Vapi analytics API docs, read through the query schema, figure out which fields support groupBy
- Write or find a script that constructs the right request body, authenticates, handles pagination if the result set is large
- Parse the JSON response, extract the right fields, format them into rows, paste into your sheet
- Realize the cost field came back in fractional cents, not dollars, and redo the column
Three days is not a long runway when you also have a team to manage and a deck to build.
The Easy Way: One Prompt in SheetXAI
SheetXAI is an AI agent that lives inside your Google Sheet. It knows Vapi's analytics query structure and writes the aggregated results directly into your sheet — no script, no JSON parsing.
Run a Vapi analytics query for Q1 2026 that groups call count, average duration, and total cost by assistantId, then write the results into my Google Sheet with one row per assistant
What You Get
- One row per assistant, with the assistant ID, total call count, average duration, and total spend in separate columns
- Cost arrives formatted as a decimal dollar amount — ready for your slide
- Average duration arrives in seconds — you can add a formula to convert to minutes if needed
- Headers land in row 1 automatically
What If the Data Is Not Quite Ready
You want the results sorted by total cost, highest first
Run a Vapi analytics query for Q1 2026 grouped by assistantId showing call count, average duration, and total cost — sort the results by total cost descending before writing to my sheet
You only want assistants that handled more than 50 calls
Run a Vapi analytics query for Q1 2026 grouped by assistantId — write only assistants with total call count above 50, with columns for assistant ID, call count, average duration, and total cost
You need the same breakdown for Q4 of last year for comparison
Run two Vapi analytics queries — one for Q4 2025 and one for Q1 2026, both grouped by assistantId with call count, average duration, and total cost — write Q4 results starting at row 2 and Q1 results starting at row 15, with a header row for each
Pull, clean, summarize, and flag in one shot
Run a Vapi analytics query for Q1 2026 grouped by assistantId — exclude any assistant with fewer than 10 calls — format total cost as dollars with two decimals, format average duration as minutes rounded to one decimal — write results into my sheet and add a column marking assistants where average cost per call exceeds $0.50
Combining the filter, formatting, and flag in a single prompt means the sheet is ready to present without any follow-up cleanup.
Try It
Get the 7-day free trial of SheetXAI and open a Google Sheet, then ask it to run your Vapi analytics query for whatever time range and grouping you need. For related tasks, see how to export the full call log or export your assistant inventory.
