Documentation Index
Fetch the complete documentation index at: https://www.bolna.ai/docs/llms.txt
Use this file to discover all available pages before exploring further.
What You’ll Build
A lightweight, serverless pipeline that connects Google Sheets directly to the Bolna Voice AI platform. You will write a few functions in Google Apps Script that:- Trigger outbound calls by reading phone numbers from your spreadsheet
- Track call progress in real time as Bolna sends webhook updates
- Capture call data like status, duration, transcripts, and errors back into the same sheet
This tutorial uses the Bolna Make a Call API and webhooks with Google Apps Script. No external automation platforms or servers are required.
Prerequisites
Bolna Account
Free trial includes $5 in credits
A Voice AI Agent
Create or pick any agent from the Agent Library
Bolna API Key
Generate one from the Developers page in your dashboard
Google Account
Access to Google Sheets and Apps Script
Step 1: Prepare Your Google Sheet
Create a new spreadsheet and add these column headers in row 1:| Column | Header | Purpose |
|---|---|---|
| A | Phone Number | Numbers to call |
| B | Execution ID | Returned by the API, used to link webhook updates to each row |
| C | Status | scheduled → queued → in-progress → completed / failed |
| D | Duration | Conversation length in seconds |
| E | Transcript | Full call transcript |
| F | Timestamp | Last status update time |
| G | Error | Error details, if any |
Step 2: Open the Apps Script Editor
Go to Extensions → Apps Script in your Google Sheet. This opens a cloud-based JavaScript editor where all your automation code will live.Step 3: Configure Your Credentials
Add the following constants at the top ofCode.gs. Replace the placeholder values with your actual details:
Step 4: Write the Call Functions
Add these three functions toCode.gs:
normalizePhone: Format phone numbers
normalizePhone: Format phone numbers
Cleans and converts raw phone input into international format so calls don’t fail on formatting issues.
triggerCall: Place a single call via the Bolna API
triggerCall: Place a single call via the Bolna API
Sends a POST request to the Make a Call endpoint and returns the
execution_id that uniquely identifies this call.runBolnaCalls: Loop through the sheet and trigger all calls
runBolnaCalls: Loop through the sheet and trigger all calls
Iterates over every row, skips rows that already have a status, and triggers a call for each new phone number.
This is the only function you run manually. All other updates happen automatically through webhooks.
Step 5: Handle Webhook Updates
As each call progresses, Bolna sends POST requests to your webhook URL with status updates. ThedoPost function catches these, matches them to the right row using the execution_id, and writes the data back to the sheet:
doPost is a reserved function in Google Apps Script. It runs automatically whenever your deployed script receives an HTTP POST request, so you never invoke it manually. The webhook payload mirrors the Get Execution API response.Step 6: Deploy and Connect the Webhook
Deploy as a Web App
In the Apps Script editor, click Deploy → New Deployment. Set the type to Web App, execute as Me, and grant access to Anyone.
Paste the URL in Bolna
In the Bolna dashboard, navigate to your agent’s Analytics tab and paste the URL into the Webhook URL field. Bolna will now push call events to this endpoint.
Step 7: Run the Automation
Add phone numbers
Populate column A in your sheet with the numbers you want to call. Leave columns B through G empty.
Execute the script
In the Apps Script editor, select
runBolnaCalls from the function dropdown and click Run.Optional: Add a Run Button to Your Sheet
Create a new file calledui.gs in Apps Script and paste the following. After saving, refresh your Google Sheet. A Bolna menu will appear in the menu bar.
How It All Works Together
Here is a quick walkthrough of the entire flow from start to finish:- You fill phone numbers into Column A of your Google Sheet
runBolnaCalls()reads each row, normalizes the phone number, and sends a POST request to the Bolna Make a Call API- Bolna returns an
execution_idfor each call, which the script writes into Column B along with aqueuedstatus - The Bolna Voice AI Agent places the call, handles the conversation, and tracks progress internally
- On every status change, Bolna sends a webhook POST to your deployed Apps Script URL
doPost()receives the webhook, finds the matching row byexecution_id, and fills in the status, duration, transcript, and timestamp- Your Google Sheet stays up to date automatically as each call completes or fails
Next Steps
Batch Calling
Run large-scale campaigns with built-in concurrency controls
Data Extractions
Pull structured fields like intent, sentiment, or confirmed appointments from calls
Auto Retry
Automatically re-attempt unanswered or failed calls
Webhooks Reference
Full reference for webhook payloads and call status polling

