Setting Up Pre-Call and Post-Call Webhooks in GoHighLevel
Background and Purpose
This SOP outlines the steps to set up pre-call and post-call webhooks in GoHighLevel to enable pre-call and post-call actions triggered by the AI assistant. These webhooks allow the system to perform pre-configured tasks in the CRM automatically before and after a call.
What are Pre-Call and Post-Call Webhooks?
Whenever an AI is making or receiving a call, a webhook is sent to any url you specify around notification that the event is happening. On initiation of outbound call and inbound call, a pre-call webhook is sent to the URL specified in the call settings of the AI making / receiving the call. This can be used for call tracking or notifications around calls starting.
On the same note, after a call is finished - both inbound and outbound - a post-call webhook with call data and analysis is sent to your specified webhook URL under the assistant that made / received the call. The payload includes things like a full transcript, call time in milliseconds, contact sentiment analysis and more.
Payload pre-call webhook:
{
"to": ”null”,
"from": ”null”,
"contactId": ”null”
}
Payload post-call webhook:
{
"call_id":”null”,
"call_type":”null”,
"direction":”null”,
"to":”null”,
"from":”null”,
"contact_id":”null”,
"disconnection_reason":”null”,
"user_sentiment":”null”,
"call_summary":”null”,
"call_completion":”null”,
"call_completion_reason":”null”,
"assistant_task_completion":”null”,
"recording_url":”null”,
"call_time_ms":”null”,
"call_time_seconds":”null”,
"full_transcript":”null”,
"start_timestamp":”null”,
"end_timestamp":”null”,
"Added_to_wallet: true
}
Resources Required
- AI Assistant Dashboard - Access to configure webhooks within the assistant settings.
- CRM System - Access to GoHighLevel’s automation tools for creating and managing workflows.
- Two Browser Tabs - One for the AI Assistant Dashboard and another for the CRM’s automation section.
Definition of Done
The webhook setup is complete when:
- Pre-Call Webhook: The pre-call webhook URL is configured, and it successfully retrieves sample data when tested.
- Post-Call Webhook: The post-call webhook URL is configured, and it successfully retrieves sample data when tested.
- Testing: Both webhooks perform correctly, finding contacts by ID and enabling further automation as required.
Step-by-Step Process
1. Set Up the Pre-Call Webhook
-
Open the AI Assistant Dashboard:
- Go to Assistants in your AI dashboard and select the assistant you want to configure.
- Navigate to Calling Settings.
-
Generate Pre-Call Webhook:
- Open a second browser tab and go to your CRM’s Automations section.
- Create a New Folder: Name it appropriately (e.g., "Webhooks Setup") for organizational clarity.
- Create New Workflow:
- Name the workflow something identifiable like: Pre-Call Webhook.
- Add Trigger:
- Select Inbound Webhook as the trigger.
- Copy the generated Webhook URL.
-
Link Webhook URL to AI Assistant:
- Go back to the AI Assistant Dashboard.
- Paste the Webhook URL into the pre-call webhook field.
- Test Connection: Click on the arrow next to the URL to verify with a green checkmark.
-
Fetch Sample Data in CRM:
- Return to the Automations tab in the CRM and select Fetch Sample Request.
- Once the sample data (mapping reference) appears, save the trigger.
-
Configure Contact Data Lookup:
- Delete any default action like Create Contact.
- Add a New Action:
- Choose Find Contact by Contact ID.
- Click the tag icon and select Inbound Webhook Trigger > Contact ID.
- Save and Publish: Ensure the pre-call webhook is active by publishing the workflow.
2. Set Up the Post-Call Webhook
-
Create a New Workflow:
- Go to Automations and create a new workflow titled Post-Call Webhook.
-
Configure Inbound Webhook Trigger:
- Add the Inbound Webhook trigger.
- Copy the generated Webhook URL.
-
Link Webhook URL to AI Assistant:
- Go back to the AI Assistant Dashboard and paste the Webhook URL into the post-call webhook field.
- Test Connection: Ensure the green checkmark appears to confirm the connection.
-
Fetch Sample Data in CRM:
- In the Automations tab, select Fetch Sample Request again.
- Once the sample data shows up, save the trigger.
-
Configure Contact Data Lookup:
- Delete any default actions, like Create Contact.
- Add New Action:
- Select Find Contact using Contact ID from the inbound webhook trigger.
- Save and Publish: Save your workflow to activate the post-call webhook.
3. Optional: Add Automation for Post-Call Actions
- Add Further Actions:
- If you want specific actions to occur after the post-call webhook is triggered (e.g., follow-up tasks, notes update), add them within the post-call workflow.
Video Overview
- Pre-Call Webhook Setup: Step-by-step instructions for configuring the pre-call webhook, linking it to the AI assistant, and setting up the trigger.
- Post-Call Webhook Setup: Instructions for configuring the post-call webhook, linking it, and adding optional post-call automation.
- Testing and Validation: Demonstration of how to verify both webhooks with sample data.
FAQs
-
What if I don’t see the green checkmark when testing the webhook URL?
- Double-check that the webhook URL was copied correctly. Ensure internet connectivity and verify that the CRM permissions allow inbound webhooks.
-
Can I use these webhooks for other contact details besides the Contact ID?
- Yes, you can configure additional data fields by mapping them when setting up the webhook actions.
-
Why should I create folders for these workflows?
- Organizing webhooks in folders helps manage multiple workflows as you scale, making it easier to locate and edit specific workflows.
Summary
This SOP covers setting up pre-call and post-call webhooks in GoHighLevel by configuring workflows that trigger when an AI assistant initiates or ends a call. The setup includes linking webhook URLs from inbound webhooks in the CRM automation section to the AI assistant, testing sample data retrieval, and setting contact data lookup. With these steps, users can streamline automated tasks before and after calls for enhanced CRM functionality.