See llms.txt for all machine-readable content.

Back to Templates

Log AI voice agent call-back requests in Google Sheets with Gmail alerts

Quick overview

This workflow receives call-back requests from an AI voice agent via webhook, validates and cleans the caller details, and writes them to a Google Sheets call-back list while merging repeat calls within a time window and emailing urgent or failed-save alerts via Gmail.

How it works

  1. Receives a POST webhook request from your voice agent containing the caller’s details.
  2. Normalizes and validates the payload (including timezone-aware timestamps) and returns a response asking for a phone number if none is provided.
  3. Searches the Google Sheets “Requests” tab for existing rows with the same phone number.
  4. Merges the call into the most recent open request (Status = New) within the configured merge window by incrementing the call count and appending a timestamped note, or prepares a new request record.
  5. Appends a new row to Google Sheets or updates the existing row by Request ID, then responds to the webhook confirming the request was saved.
  6. If the request is marked urgent, sends an alert email via Gmail to the configured address.
  7. If writing to Google Sheets fails, responds that the request was not saved and sends a failure notification email via Gmail with the caller details.

Setup

  1. Create a Google Sheet with a “Requests” tab and headers matching the workflow fields (Request ID, Received, Last update, Urgent, Name, Phone, Reason, Preferred time, Notes, Calls, Status).
  2. Add Google Sheets credentials and paste your spreadsheet URL into the Google Sheets nodes used for lookup, append, and update.
  3. Add Gmail credentials and set the alert recipient email and business name in the workflow settings.
  4. Configure the webhook Header Auth credential and send the same header from your voice agent when POSTing JSON fields like name, phone, reason, urgent, preferred_time, and notes.
  5. Review and adjust the timezone and merge_window_minutes values to match your operations and desired repeat-call behavior.

Requirements

  • A Google account (Sheets and Gmail) and an AI voice agent that can call a webhook tool (for example ElevenLabs, Vapi or Retell).

Customization

  • Change merge_window_minutes, or replace the Gmail alerts with Slack or SMS for urgent calls.