Quick overview
This workflow receives Vapi end-of-call reports for a legal intake voice agent, extracts structured enquiry details, appends them to a Google Sheets log, emails the firm via Gmail or Outlook with urgency handling, and optionally creates a Clio contact with an enquiry note plus failure alerts.
How it works
- Receives a POST webhook from Vapi when the voice agent sends an end-of-call report.
- Filters the incoming payload so only events with type
end-of-call-report continue.
- Extracts the enquiry fields from Vapi Structured Output, fills missing values with “Not provided,” normalizes urgency, and builds a timestamp in the configured time zone.
- Appends the enquiry as a new row in the
Enquiries tab of a Google Sheets spreadsheet.
- Emails the firm the intake details via Gmail (or Outlook if enabled), prefixing the subject with “URGENT -” when the call is flagged urgent.
- Optionally creates a Person contact in Clio and adds the enquiry details as a note on that contact.
- Sends an alert email via Gmail if creating the Clio contact or note fails.
Setup
- Create a Header Auth credential on the webhook named x-intake-secret with a long random value. In your Vapi assistant, go to Advanced → HTTP Headers and add the same name and value. Set the assistant’s Server URL to the webhook’s production URL.
- In Vapi, create a Structured Output named template_intake_data (or the name you set in Configuration) with these string fields: caller_name, callback_number, caller_email, matter_type, urgency, description, other_party. Attach it to your assistant, and send only end-of-call-report to the webhook.
- In the Configuration step, set the firm email address, time zone, Vapi Structured Output name, and your Clio region base URL (for example https://app.clio.com for US or https://eu.app.clio.com for EU).
- Connect Google Sheets credentials and set the target spreadsheet ID, then create an Enquiries sheet with the required headers: received_at, call_id, caller_name, caller_phone, caller_email, matter_type, urgency, description, other_party, ended_reason, status.
- Connect Gmail credentials (or enable and connect Microsoft Outlook credentials instead) and confirm the recipient address used for notifications.
- (Optional) Create a Clio developer app with Contacts and Matters write permissions, add a Clio OAuth2 credential in n8n, and reconnect the credential if you change app permissions.
Requirements
- A Vapi account with an assistant
- A Google account for Google Sheets (optional)
- Gmail or Microsoft Outlook for notifications
- Clio Manage account (optional)
Customization
- Change the matter types in your Vapi structured output to match your practice areas
- Replace Google Sheets or Clio with your own CRM
- Delete the Clio nodes if you don’t use Clio
- Delete the Google Sheets node if you only want email notifications
Additional info
Each call creates a new Clio contact; there is no duplicate check for repeat callers. Browser test calls in Vapi have no caller number, so the phone field uses the callback number given. The voice agent’s prompt is not included. Tested on n8n 2.45.5 (Cloud).