Add this first. This tool needs an access token, so add Get Google Access Token to the same bot. The bot calls it first and passes the token in.
What the model is told
Add a row to a Google Sheet, for example to log a callback request or a lead. Get a Google access token first if you do not have one. Confirm the details with the customer before adding. The row is added to the end of the sheet. Tell the customer their details have been recorded.
Request
POSThttps://sheets.googleapis.com/v4/spreadsheets/YOUR_GOOGLE_SPREADSHEET_ID/values/Sheet1!A1:append?valueInputOption=RAW&insertDataOption=INSERT_ROWS
Headers
Content-Typeapplication/jsonAuthorizationBearer {{accessToken}}
Body
{
"values": [
[
"{{reference}}",
"{{customerName}}",
"{{contact}}",
"{{notes}}"
]
]
}Parameters
reference stringA reference for the row, such as an order or ticket number, or 'none'.customerName stringThe customer's full name.contact stringThe customer's phone number or email address.notes stringA short note on what the customer wants.accessToken stringThe access_token value returned by the token tool. Reuse it for the rest of the conversation.
Engage payload
{
"source": "VOICE_AI",
"tool": {
"id": "c7ba140c-ea91-443e-9157-ecfd9f657246",
"type": "HTTP_REQUEST",
"label": "Append Google Sheets Row",
"name": "append_google_sheets_row",
"customName": false,
"description": "Add a row to a Google Sheet, for example to log a callback request or a lead. Get a Google access token first if you do not have one. Confirm the details with the customer before adding. The row is added to the end of the sheet. Tell the customer their details have been recorded.",
"parameters": [
{
"name": "reference",
"type": "string",
"description": "A reference for the row, such as an order or ticket number, or 'none'."
},
{
"name": "customerName",
"type": "string",
"description": "The customer's full name."
},
{
"name": "contact",
"type": "string",
"description": "The customer's phone number or email address."
},
{
"name": "notes",
"type": "string",
"description": "A short note on what the customer wants."
},
{
"name": "accessToken",
"type": "string",
"description": "The access_token value returned by the token tool. Reuse it for the rest of the conversation."
}
],
"config": {
"endpoint": {
"method": "POST",
"url": "https://sheets.googleapis.com/v4/spreadsheets/YOUR_GOOGLE_SPREADSHEET_ID/values/Sheet1!A1:append?valueInputOption=RAW&insertDataOption=INSERT_ROWS"
},
"headers": [
{
"name": "Content-Type",
"value": "application/json"
},
{
"name": "Authorization",
"value": "Bearer {{accessToken}}"
}
],
"body": "{\n \"values\": [\n [\n \"{{reference}}\",\n \"{{customerName}}\",\n \"{{contact}}\",\n \"{{notes}}\"\n ]\n ]\n}",
"timeout": null
}
}
}IDs are regenerated on every copy.