https://retellai.com/?utm_source=discord&utm_medium=seo logo
how do i set the webhook for a post call analysis
# ❓・ai-evy-support
m
@AI Evy how do i set the webhook for a post call analysis
a
Thanks for tagging me @mrearthbound. I'll look through relevant sources and get back to you shortly.
### Answer To set up webhooks for post call analysis, you need to configure webhooks to receive the
call_analyzed
event [(1) ]() . There are three webhook events available : -
call_started
- Triggered when a new call begins -
call_ended
- Triggered when a call completes -
call_analyzed
- Triggered when call analysis is complete The
call_analyzed
event includes the full call data including the
call_analysis
object . The webhook payload will look like this [(2) ]() :
Copy code
json
{
 "event_type": "call_analysis",
 "call_analysis": {
 // Analysis results object
 }
}
To set up webhooks, visit the [Webhook Configuration](/features/webhook-overview) section . You can configure webhooks either at the account level or at the agent level [(3) ]() . If set at the agent level, it will bind webhook events for that specific agent to the specified URL and ignore the account level webhook for that agent . The webhook will POST the payload to your endpoint with a 10-second timeout and up to 3 retries if no success status (2xx) is received [(1) ]() .
​ To learn more, see the sources I considered: [[1] Webhook Overview](https://docs.retellai.com/features/webhook-overview) [[2] Consume the analysis data](https://docs.retellai.com/features/post-call-analysis-consumption) [[3] Get Agent Versions](https://docs.retellai.com/api-references/get-agent-versions) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
m
@AI Evy i just finished a call but my post call analysis webhook didn't receive the data. how do i troubleshoot that?
a
Thanks for the follow-up, @mrearthbound. I'll get back to you soon.
### Answer
message has been deleted
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
m
@AI Evy if I want to log data to a sheet and send an email, both in the post call analysis, should I need to put both of them in the same automation webhook?
a
Thanks for the follow-up, @mrearthbound. I'll get back to you soon.
### Answer For post call analysis automation, you can handle both logging data to a sheet and sending an email from the same webhook endpoint [(1) ]() . When the
call_analyzed
event is triggered, you'll receive the webhook payload with the analysis results :
Copy code
{
 "event_type": "call_analysis",
 "call_analysis": {
 // Analysis results object
 }
}
Your single webhook endpoint can process this payload and perform multiple actions sequentially - first logging the data to your sheet, then sending the email [(2) ]() . Webhooks are designed to trigger custom workflows across platforms like Zapier, Make, or n8n, allowing you to initiate multiple automated actions from one webhook event . This approach is more efficient than setting up separate webhook endpoints, as you'll only receive one
call_analyzed
event per call [(1) ]() . Your webhook handler can parse the analysis data once and distribute it to both your sheet logging function and email sending function.
​ To learn more, see the sources I considered: [[1] Consume the analysis data](https://docs.retellai.com/features/post-call-analysis-consumption) [[2] Webhook](https://www.retellai.com/glossary/webhook) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
m
@AI Evy where exactly in retell do I need to paste my webhook url
a
Thanks for the follow-up, @mrearthbound. I'll get back to you soon.
Thanks for the feedback, glad I was helpful.
### Answer You can set your webhook URL in two places in Retell AI: 1. At the agent level - When creating or updating an agent, you can set the
webhook_url
parameter [(1) ]() [(2) ]() [(3) ]() . Here's the JavaScript example:
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
 apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const agentResponse = await client.agent.update('16b980523634a6dc504898cda492e939', { 
 webhook_url: "<https://webhook-url-here%22>
}) ;
[(2) ]() 2. At the account level - This would be configured through your dashboard settings [(1) ]() [(2) ]() . The
webhook_url
field binds webhook events for that specific agent to your specified URL and will ignore the account level webhook for that agent [(1) ]() [(2) ]() [(3) ]() [(4) ]() . You can also set it to
null
to remove the webhook URL from an agent . For post call analysis specifically, your webhook will receive the
call_analyzed
event with the analysis results [(5) ]() .
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
m
@AI Evy where do i need to paste specifically my post call webhook url? I use several webhooks
a
Thanks for the follow-up, @mrearthbound. I'll get back to you soon.
### Answer For post call analysis webhooks specifically, you need to set your webhook URL in the
webhook_url
field when creating or updating an agent [(1) ]() [(2) ]() [(3) ]() . This single webhook URL will receive all webhook events for that agent, including the
call_analyzed
event that contains your post call analysis data [(4) ]() . Here's how to set it using the JavaScript SDK:
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
 apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const agentResponse = await client.agent.update('16b980523634a6dc504898cda492e939', { 
 webhook_url: "<https://webhook-url-here%22>
}) ;
[(1) ]() The webhook URL you set will receive multiple event types [(4) ]() : -
call_started
- when calls begin -
call_ended
- when calls complete -
call_analyzed
- when post call analysis is complete Since you mentioned using several webhooks, note that Retell sends all webhook events for an agent to the same URL [(1) ]() [(2) ]() . Your webhook endpoint will need to filter the events based on the
event_type
field to handle different webhook events appropriately [(4) ]() . The agent-level webhook URL will override any account-level webhook settings for that specific agent [(1) ]() [(2) ]() [(5) ]() [(3) ]() [(6) ]() [(7) ]() .
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
m
@AI Evy I have my single webhook that I've configured on both the agent level and as an inbound webhook. N8N is the one receiving the webhook. I do get the webhook triggered as soon as the agent picks up the call, but i don't get it triggered by the post call analysis, even though I have a lot of post call analysis data set up. I need help to troubleshoot why the post call analysis information isn't being sent to n8n
a
Thanks for the follow-up, @mrearthbound. I'll get back to you soon.
### Answer Based on the sources, there are several potential issues that could prevent your
call_analyzed
webhook from being triggered. Here are the key troubleshooting steps: 1. Compatibility Issue Between Inbound and Agent Webhooks There's a known compatibility issue between inbound call webhooks and agent-level webhooks [(1) ]() . Users have reported that when you have both a phone number level
call_inbound
webhook and an agent-level webhook configured, the standard webhook events (
call_started
,
call_ended
,
call_analyzed
) may not work properly . This appears to be exactly your setup. 2. Webhook Configuration Conflicts The documentation shows that when you configure both webhooks, they can interfere with each other . One user reported that adding a webhook URL to the phone number auto-saves, but when they go back to their conversation agent and save the agent, the webhook on the phone number gets lost . 3. Post-Call Analysis Requirements For the
call_analyzed
webhook to trigger, several conditions must be met: - The call must complete successfully [(2) ]() - The agent session must finish successfully - If your inbound call is being rejected or doesn't complete properly, it won't trigger the analysis webhook 4. Troubleshooting Steps First, verify your agent configuration includes the
post_call_analysis_data
field [(3) ]() [(4) ]() [(5) ]() . This should look like:
Copy code
json
{
  "post_call_analysis_data": [
    {
      "type": "string",
      "name": "customer_name",
      "description": "The name of the customer.",
      "examples": [
        "John Doe",
        "Jane Smith"
      ]
    }
  ]
}
5. Recommended Solution Based on the compatibility issues reported [(1) ]() , consider separating your webhook configurations: - Use the inbound webhook only for pre-call processing (
call_inbound
event) [(6) ]() - Use a separate agent-level webhook URL specifically for post-call events (
call_analyzed
) [(3) ]() [(4) ]() [(5) ]() The agent-level webhook URL can be set using the
webhook_url
parameter when updating your agent [(3) ]() [(7) ]() :
Copy code
javascript
const agentResponse = await client.agent.update('agent_id', { 
  webhook_url: "<https://your-n8n-webhook-url-here%22>
}) ;
[(3) ]() This separation should resolve the compatibility issue and ensure your
call_analyzed
events are properly delivered to N8N.
​ To learn more, see the sources I considered: [[1] inbound webhook URL failing to save (or stay saved) and wont work together with conversation agaent](https://discord.com/channels/1186424376300679209/1398428473781125314) [[2] Inbound Call issues](https://discord.com/channels/1186424376300679209/1400852237428723763) [[3] Update Agent](https://docs.retellai.com/api-references/update-agent) [[4] List Agents](https://docs.retellai.com/api-references/list-agents) [[5] Create Agent](https://docs.retellai.com/api-references/create-agent) [[6] Inbound call webhook](https://docs.retellai.com/features/inbound-call-webhook) [[7] Update Agent](https://docs.retellai.com/api-references/update-agent) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
m
@AI Evy where exactly can i find this post_call_analysis_data field?
a
Thanks for the follow-up, @mrearthbound. I'll get back to you soon.
### Answer The
post_call_analysis_data
field can be found in the agent configuration when creating or updating an agent [(1) ]() [(2) ]() [(3) ]() [(4) ]() . It's part of the request body when using the Create Agent or Update Agent API endpoints. Here's exactly where you'll find it in the API structure:
Copy code
json
{
  "post_call_analysis_data": [
    {
      "type": "string",
      "name": "customer_name",
      "description": "The name of the customer.",
      "examples": [
        "John Doe",
        "Jane Smith"
      ]
    }
  ]
}
[(5) ]() [(6) ]() [(7) ]() [(1) ]() [(2) ]() The field is located in the agent body parameters and is described as "Post call analysis data to extract from the call. This data will augment the pre-defined variables extracted in the call analysis. This will be available after the call ends" [(3) ]() [(1) ]() [(2) ]() [(4) ]() . You can set this field when: 1. Creating a new agent using the Create Agent API endpoint [(1) ]() [(8) ]() [(2) ]() 2. Updating an existing agent using the Update Agent API endpoint [(3) ]() [(4) ]() The field accepts an array of objects, where each object defines the data you want to extract from the call [(5) ]() [(6) ]() [(7) ]() [(1) ]() [(2) ]() . Each object can have different types (string, boolean, number, or selector) and includes a name, description, and examples to guide the analysis [(3) ](
update-agent) [(1) ]() [(2) ]() [(4) ]() .
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
m
@AI Evy is there a way to configure that without using the API? Just by using retell's GUI?
a
Thanks for the follow-up, @mrearthbound. I'll get back to you soon.
### Answer The available sources focus on the API methods for configuring
post_call_analysis_data
through the Create Agent and Update Agent endpoints [(1) ]() . The documentation shows how to set this field programmatically using the JavaScript SDK:
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
 apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const agentResponse = await client.agent.create({
 response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' },
 voice_id: '11labs-Adrian',
}) ;
The sources also show that the
post_call_analysis_data
field is included in the agent response structure . However, the available documentation doesn't specify whether there's a GUI option in the Retell dashboard for configuring post-call analysis data without using the API. One Discord user mentioned that they "can also not add new post call analysis fields in the UI either, even on newly created agents" [(2) ]() , which suggests there may be UI functionality, but this was in the context of a bug report. I don't have specific information about GUI configuration options for
post_call_analysis_data
in the available sources. You might want to check your Retell dashboard directly or contact support for guidance on GUI-based configuration options. **
​ To learn more, see the sources I considered: [[1] Create Agent](https://docs.retellai.com/api-references/create-agent) [[2] Can't update agent using Retell API (error: 400 Max post call analysis data count is 100)](https://discord.com/channels/1186424376300679209/1336119074752561192) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
m
@AI Evy give me a step by step on how to use the retell ai api with postman
a
Thanks for the follow-up, @mrearthbound. I'll get back to you soon.
### Answer ### Answer Here's a step-by-step guide to use the Retell AI API with Postman: Step 1: Set Up Authentication - In Postman, create a new request - Go to the "Authorization" tab - Select "Bearer Token" as the type - Enter your Retell API key (find it in your dashboard) [(1) ]() - The format should be "Bearer YOUR_RETELL_API_KEY" [(2) ]() Step 2: Configure the Request Headers - Add a header with key
Authorization
and value
Bearer YOUR_RETELL_API_KEY
- Set
Content-Type
to
application/json
*Step 3: Create an Agent (Example Request) * - Set the method to
POST
- Use the endpoint: ` [(1) ]() - In the request body, use this JSON structure:
Copy code
json
{
  "response_engine": {
    "llm_id": "llm_234sdertfsdsfsdf",
    "type": "retell-llm"
  },
  "voice_id": "11labs-Adrian"
}
*Step 4: List All Agents (Example GET Request) * - Set the method to
GET
- Use the endpoint for listing agents [(2) ]() - Add query parameters if needed: - `limit`: Number of objects to return (1-1000, default 1000) - `pagination_key`: For continuing to next page Step 5: Handle the Response The successful response will include agent details like: - `agent_id`: Unique identifier [(1) ]() [(2) ]() - `version`: Agent version number - `is_published`: Publication status - `voice_id`: Voice configuration - `webhook_url`: Configured webhook endpoint Step 6: Test Different Endpoints You can test various API endpoints including: - Create Agent [(1) ]() - List Agents [(2) ]() - Get Agent Versions [(3) ]() - Update Agent configurations Authentication Requirements All requests require the Authorization header containing your API key [(2) ]() . The API will return a 401 error if authentication fails [(1) ]() [(2) ]() .
​ To learn more, see the sources I considered: [[1] Create Agent](https://docs.retellai.com/api-references/create-agent) [[2] List Agents](https://docs.retellai.com/api-references/list-agents) [[3] Get Agent Versions](https://docs.retellai.com/api-references/get-agent-versions) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
m
@AI Evy I want to create the simples agent that will trigger a post call analysis. Please give me a step by step on how to do this
a
Thanks for the follow-up, @mrearthbound. I'll get back to you soon.
### Answer Here's a step-by-step guide to create the simplest agent that will trigger post call analysis: Step 1: Set Up Your Retell SDK First, initialize the Retell client with your API key [(1) ]() :
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
 apiKey: 'YOUR_RETELL_API_KEY',
}) ;
Step 2: Create an Agent with Post Call Analysis Create an agent with the minimum required fields plus post call analysis configuration :
Copy code
javascript
const agentResponse = await client.agent.create({
 response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' },
 voice_id: '11labs-Adrian',
}) ;
Step 3: Add Post Call Analysis Data Include the
post_call_analysis_data
field to define what data you want to extract :
Copy code
javascript
{
 "post_call_analysis_data": [
 {
 "type": "string",
 "name": "customer_name",
 "description": "The name of the customer.",
 "examples": [
 "John Doe",
 "Jane Smith"
 ]
 }
 ],
 "post_call_analysis_model": "gpt-4o-mini"
}
Step 4: Configure Webhook URL Set up a webhook URL to receive the post call analysis results :
Copy code
javascript
const agentResponse = await client.agent.create({
 response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' },
 voice_id: '11labs-Adrian',
 webhook_url: "<https://webhook-url-here%22>
}) ;
Step 5: Complete Agent Configuration Your complete minimal agent configuration should look like this :
Copy code
javascript
const agentResponse = await client.agent.create({
 response_engine: { 
   llm_id: 'llm_234sdertfsdsfsdf', 
   type: 'retell-llm' 
 },
 voice_id: '11labs-Adrian',
 webhook_url: "<https://your-webhook-url-here%22,>
 post_call_analysis_data: [
   {
     type: "string",
     name: "customer_name",
     description: "The name of the customer.",
     examples: ["John Doe", "Jane Smith"]
   }
 ],
 post_call_analysis_model: "gpt-4o-mini"
}) ;
Step 6: Receive Analysis Results After each call completes, your webhook will receive the
call_analyzed
event [(2) ]() :
Copy code
{
 "event_type": "call_analysis",
 "call_analysis": {
 // Analysis results object
 }
}
Key Requirements: - The
post_call_analysis_data
field defines what data to extract from calls [(1) ]() - The
webhook_url
field is required to receive analysis results - The
post_call_analysis_model
defaults to "gpt-4o-mini" if not specified - Analysis will only trigger for completed calls where conversation occurred [(2) ]() This creates the simplest functional agent that will automatically perform post call analysis and send results to your webhook endpoint after each call ends .
​ To learn more, see the sources I considered: [[1] Create Agent](https://docs.retellai.com/api-references/create-agent) [[2] Consume the analysis data](https://docs.retellai.com/features/post-call-analysis-consumption) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
m
@AI Evy error not found when trying to access an agent on the dashboard
a
Thanks for the follow-up, @mrearthbound. I'll get back to you soon.
### Answer Based on the sources, there are several known issues with the Retell AI dashboard displaying agents. Here are the troubleshooting steps: Common Dashboard Issues: 1. Search and Pagination Problems - Pagination for agents doesn't seem to be working on the dashboard [(1) ]() . When searching by agent name, agents may not appear even though they exist . 2. Agent Display Issues - There have been reports of agents loading on the dashboard page and then disappearing after 2 seconds, with console errors showing "Error in getLlmNew" and "Error loading agents" [(2) ]() . 3. API vs Dashboard Discrepancy - Some users can fetch agents using the API with the agent_id but cannot find them in the dashboard search [(1) ]() . Troubleshooting Steps: Step 1: Try Direct URL Access Use the direct link format to access your agent :
Copy code
<https://dashboard.retellai.com/agents/agent_id>
Replace
agent_id
with your actual agent ID . This method has been confirmed to work even when search fails . Step 2: Search by Agent ID Instead of searching by agent name, try searching using the agent ID in the dashboard search bar . The search bar should show the agent when you put the agent ID . Step 3: Verify Agent Exists via API Check if your agent exists using the API to confirm it's not a data issue [(3) ]() . You can use the List Agents endpoint to verify the agent exists [(4) ]() . Step 4: Check for Recent Dashboard Issues Dashboard display issues have been reported and fixed before [(2) ]() . If you're experiencing similar problems, the issue may be temporary and resolved by the Retell team . Known Compatibility Issue: There's also a reported issue where published agents may not appear in API calls, returning "Found agents: 0" even when the agent exists and is published in the dashboard [(3) ]() . This suggests there may be synchronization issues between the dashboard and API . If none of these solutions work, the direct URL method using your agent ID should allow you to access your agent even when search functionality fails [(1) ]() .
​ To learn more, see the sources I considered: [[1] Agent Dashboard](https://discord.com/channels/1186424376300679209/1404418754867363860) [[2] Dashboard agents not displaying](https://discord.com/channels/1186424376300679209/1288959198767611924) [[3] Agent exists and is published, but API returns "Found agents: 0"](https://discord.com/channels/1186424376300679209/1392892371313754164) [[4] Create Agent](https://docs.retellai.com/api-references/create-agent) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.