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
- Receives a POST webhook request from your voice agent containing the caller’s details.
- Normalizes and validates the payload (including timezone-aware timestamps) and returns a response asking for a phone number if none is provided.
- Searches the Google Sheets “Requests” tab for existing rows with the same phone number.
- 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.
- 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.
- If the request is marked urgent, sends an alert email via Gmail to the configured address.
- 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
- 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).
- Add Google Sheets credentials and paste your spreadsheet URL into the Google Sheets nodes used for lookup, append, and update.
- Add Gmail credentials and set the alert recipient email and business name in the workflow settings.
- 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.
- 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.