https://retellai.com/?utm_source=discord&utm_medium=seo logo
give me some information about the data sent on ca...
# ❓・ai-evy-support
g
@AI Evy give me some information about the data sent on call analyzed, and call ended events, and where the transcript of the call is stored
a
Thanks for tagging me @george.g4038. I'll look through relevant sources and get back to you shortly.
## Call Data Structure When you receive webhook events or retrieve call data, the call object includes comprehensive information [(2) ]() . The data includes: - Call metadata (call_id, agent_id, call_status, timestamps) - Transcript in multiple formats:
transcript
,
transcript_object
, and
transcript_with_tool_calls
- Call analysis data including sentiment, summary, and custom analysis - Recording URLs and other call details ## Transcript Storage The transcript is stored in several formats within the call object : 1. **Basic transcript**: Available as a simple string in the
transcript
field 2. **Structured transcript**: Available as
transcript_object
with role, content, and word timing information 3. **Transcript with tool calls**: Available as
transcript_with_tool_calls
including any function calls made during the conversation ## Call Analysis Event The
call_analysis
object becomes available after the call ends and includes : - `call_summary`: Summary of the conversation - `user_sentiment`: Detected sentiment (e.g., "Positive") - `call_successful`: Boolean indicating if the call was successful - `custom_analysis_data`: Any custom analysis fields you've configured You can subscribe to the
call_analyzed
webhook event to receive this data once the post-call analysis is ready .
### Answer Based on the Retell AI documentation, here's information about the webhook events and transcript storage: ## Webhook Events The webhook endpoint receives different event types including
call_started
,
call_ended
, and
call_analyzed
[(1) ]() . Here's how to handle these events:
Copy code
javascript
app.post("/webhook", (req: Request, res: Response) => {
 const {event, call} = req.body;
 switch (event) {
 case "call_started":
 console.log("Call started event received", call.call_id) ;
 break;
 case "call_ended":
 console.log("Call ended event received", call.call_id) ;
 break;
 case "call_analyzed":
 console.log("Call analyzed event received", call.call_id) ;
 break;
 default:
 console.log("Received an unknown event:", event) ;
 }
 // Acknowledge the receipt of the event
 res.status(204) .send() ;
}) ;
​ To learn more, see the sources I considered: [[1] Setup guide](https://docs.retellai.com/features/register-webhook) [[2] Create Phone Call](https://docs.retellai.com/api-references/create-phone-call) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
g
I’m trying to create an application that processes the webhook like in n8n and then parses the call transcript but it’s having trouble, can you give me a comprehensive guide on all of the relevant information from the payload etc @AI Evy
a
Thanks for the follow-up, @george.g4038. I'll get back to you soon.
### Answer # Comprehensive Webhook Processing Guide for Retell AI ## Webhook Event Types Retell AI supports three main webhook events [(1) ]() : | Event Type | Description | Payload | |------------|-------------|---------| |
call_started
| Triggered when a new call begins | Basic call information | |
call_ended
| Triggered when a call completes, transfers, or encounters an error | All fields from the call object except
call_analysis
| |
call_analyzed
| Triggered when call analysis is complete | Full call data including
call_analysis
object | ## Webhook Payload Structure The webhook contains the event type and the call object . Here's a sample payload structure:
Copy code
json
{
  "event_type": "call_analysis",
  "call_analysis": {
    // Analysis results object
  }
}
[(2) ]() ## Complete Call Object Fields When processing webhooks, you'll receive comprehensive call data [(3) ]() : ### Basic Call Information - `call_id`: Unique identifier for the call - `call_type`: Type of call (e.g., "web_call") - `call_status`: Current status of the call - `agent_id`: ID of the agent handling the call - `start_timestamp`: When the call started - `end_timestamp`: When the call ended - `duration_ms`: Duration in milliseconds ### Transcript Data (Multiple Formats) - `transcript`: Simple string format of the conversation - `transcript_object`: Structured format with timestamps and roles - `transcript_with_tool_calls`: Includes tool call invocations and results - `scrubbed_transcript_with_tool_calls`: Same as above but without PII ### Recording URLs - `recording_url`: Standard recording of the call - `recording_multi_channel_url`: Recording with separate channels for each party - `scrubbed_recording_url`: Recording without PII - `scrubbed_recording_multi_channel_url`: Multi-channel recording without PII ### Call Analysis Data The
call_analysis
object includes [(4) ]() : - `call_summary`: Summary of the conversation - `in_voicemail`: Boolean indicating if call went to voicemail - `user_sentiment`: Detected sentiment (e.g., "Positive") - `call_successful`: Boolean indicating call success - `custom_analysis_data`: Custom analysis fields you've configured ### Additional Data - `metadata`: Custom metadata you've attached to the call - `retell_llm_dynamic_variables`: Dynamic variables used in the call - `disconnection_reason`: Reason the call ended (e.g., "agent_hangup") - `public_log_url`: Debugging information and latency tracking [(3) ](
-references/update-call) ## Processing Recommendations for n8n 1. **Event Type Handling**: Always check the
event_type
field first to route processing appropriately [(1) ]() 2. **Transcript Parsing**: Use
transcript_object
for structured parsing as it includes timestamps and role information [(3) ]() 3. **Error Handling**: The webhook has a 10-second timeout and will retry up to 3 times [(1) ]() 4. **Response**: Return a 2xx status code with no body expected ## Three Methods to Access Analysis Data You can consume call analysis through [(2) ]() : 1. **Dashboard**: Visual interface in the history tab 2. **Webhook**: Real-time notifications (what you're implementing) 3. **Get Call API**: Programmatic access to retrieve call data The webhook approach you're using provides real-time access to analysis results as soon as they're ready .
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
​ 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] Update Call](https://docs.retellai.com/api-references/update-call) [[4] Create Web Call](https://docs.retellai.com/api-references/create-web-call) ​
g
@AI Evy give it to me in a form I can copy paste
a
Thanks for the follow-up, @george.g4038. I'll get back to you soon.
### Answer [(1) ]() # Retell AI Webhook Processing Guide ## Webhook Event Types Retell AI supports the following webhook events : | Event Type | Description | Payload | |------------|-------------|---------| |
call_started
| Triggered when a new call begins | Basic call information | |
call_ended
| Triggered when a call completes, transfers, or encounters an error | all fields from the call object except
call_analysis
| |
call_analyzed
| Triggered when call analysis is complete | Full call data including
call_analysis
object | ## Sample Webhook Payload The webhook will contain the event type and the call object :
Copy code
json
{
 "event": "call_ended",
 "call": {
 "call_type": "phone_call",
 "from_number": "+12137771234",
 "to_number": "+12137771235",
 "direction": "inbound",
 "call_id": "Jabr9TXYYJHfvl6Syypi88rdAHYHmcq6",
 "agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",
 "call_status": "registered",
 "metadata": {},
 "retell_llm_dynamic_variables": {
 "customer_name": "John Doe"
 },
 "start_timestamp": 1714608475945,
 "end_timestamp": 1714608491736,
 "disconnection_reason": "user_hangup",
 "transcript": "...",
 "transcript_object": [ [Object], [Object], [Object], [Object] ],
 "transcript_with_tool_calls": [ [Object], [Object], [Object], [Object] ],
 "opt_out_sensitive_data_storage": false
 }
}
## Call Analysis Webhook Payload For the
call_analyzed
event, you'll receive [(2) ]() :
Copy code
json
{
 "event_type": "call_analysis",
 "call_analysis": {
 // Analysis results object
 }
}
## Complete Call Object Structure The call object includes these key fields [(3) ]() , [(4) ]() , [(5) ]() : ### Basic Information - `call_id`: Unique id of the call [(3) ]() - `call_type`: Type of the call (e.g., "phone_call") - `call_status`: Status of call - `agent_id`: Corresponding agent id of this call - `start_timestamp`: Begin timestamp (milliseconds since epoch) of the call - `end_timestamp`: End timestamp (milliseconds since epoch) of the call - `duration_ms`: Duration of the call in milliseconds ### Transcript Data - `transcript`: Transcription of the call - `transcript_object`: Transcript of the call in the format of a list of utterance, with timestamp - `transcript_with_tool_calls`: Transcript of the call weaved with tool call invocation and results ### Call Analysis - `call_analysis`: Post call analysis that includes information such as sentiment, status, summary, and custom defined data to extract [(4) ]() ### Recording URLs - `recording_url`: Recording of the call [(3) ]() - `recording_multi_channel_url`: Recording of the call, with each party's audio stored in a separate channel ## Webhook Specifications The webhook will
POST
the payload to your endpoint [(1) ]() . The webhook has a timeout of 10 seconds . If within 10 seconds no success status (2xx) is received, the webhook will be retried, up to 3 times . We expect a successful status code (2xx) to be returned . No body is expected .
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.