https://retellai.com/?utm_source=discord&utm_medium=seo logo
how can I get the summary and transcript for the c...
# ❓・ai-evy-support
d
@AI Evy how can I get the summary and transcript for the chat agent after each finished chat conversation?
a
Thanks for tagging me @dzei2234. I'll look through relevant sources and get back to you shortly.
### Answer You can retrieve the summary and transcript for a chat agent after each finished conversation using the Get Chat API. [(1) ]() The API returns a response that includes: -
transcript
- The full transcription of the chat conversation -
chat_analysis
- Post-chat analysis containing the chat summary, user sentiment, and success status (available after the chat ends) Here's how to use it:
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
 apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const chatResponse = await client.chat.retrieve('16b980523634a6dc504898cda492e939') ;

console.log(chatResponse.agent_id) ;
The response will include fields like: -
transcript
- Full conversation text -
chat_analysis.chat_summary
- AI-generated summary of the conversation -
chat_analysis.user_sentiment
- Sentiment analysis (e.g., "Positive") -
chat_analysis.chat_successful
- Boolean indicating if the chat was successful You can also subscribe to the
chat_analyzed
webhook event to receive this data automatically once the analysis is ready. [(1) ]() [(8) ]()
d
@AI Evy cannot i do that with agent level webhook?
a
Thanks for the follow-up, @dzei2234. I'll get back to you soon.
### Answer --- Yes, you can configure an agent-level webhook to receive the transcript and analysis data after each chat conversation ends. [(1) ]() [(2) ]() When creating or updating a chat agent, you can set the
webhook_url
parameter to specify where Retell AI should send webhook events:
Copy code
javascript
const chatAgentResponse = await client.chatAgent.create({
  response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' },
  webhook_url: "<https://webhook-url-here%22,>
  webhook_timeout_ms: 10000
}) ;
[(1) ]() The webhook will receive events including the
chat.analyzed
event, which contains the transcript and post-chat analysis data (summary, sentiment, success status) once the analysis is complete. [(1) ]() [(2) ]() You can also configure
post_chat_analysis_data
to define custom analysis fields you want extracted from each conversation. [(1) ]() [(4) ]() [(2) ]()
d
@AI Evy in the chat agent i am facing an issue. the chat agent is supposed to provide the product link from a wide range of selcetion. the product links are long URLs. the chat agent is providing the product link correctly, but in the chat widget, since the product lnks are very long, the links are showing with "-" at the places of line breaks. as a result the links are becoming incorrrect leading to nowehere. how can i solve this?
a
Thanks for the follow-up, @dzei2234. I'll get back to you soon.
### Answer Based on the available sources, I don't have specific documentation about URL formatting or line-break handling in the Retell chat widget. However, there's a related discussion about formatting issues in the chat widget. [(1) ]() The issue described involved text being combined into one paragraph despite proper formatting in the backend, and the suggestion was to prompt for raw data in specific formats like JSON or plain text. For your URL issue, you could try: 1. Prompt the agent to return URLs in markdown link format - Instead of plain URLs, have the agent return
[Product Name](URL)
format, which may render better in the widget 2. Request JSON formatting - Prompt the agent to structure responses with URLs as distinct fields that won't break across lines 3. Use URL shorteners - As a workaround, you could integrate a URL shortening service through a custom function to generate shorter links I'd also recommend reaching out through the support channels for widget-specific rendering issues: - [Contact Sales]() - [GitHub]() Would you like me to provide a general approach for handling long URLs in chat interfaces based on common practices? **
Thanks for the follow-up, @dzei2234. I'll get back to you soon.
d
@AI Evy yes
a
### Answer Based on the available sources, this appears to be a rendering limitation with the Retell chat widget. [(1) ]() [(2) ]() The widget renders plain text and doesn't support Markdown or rich-text formatting, which means URLs can break across lines. [(2) ]() Here are some general approaches to handle long URLs in chat interfaces: 1. Use Markdown Link Format Instead of displaying raw URLs, format them as clickable links:
Copy code
[View Product](<https://your-very-long-product-url.com/path/to/product>)
2. URL Shortening Service Integrate a URL shortener (like Bitly API) through a custom function to generate compact links before presenting them to users. 3. Return Structured Data Have your agent return URLs in a structured format (like JSON) that your frontend can parse and render properly without line breaks:
Copy code
json
{
  "product_name": "Product XYZ",
  "url": "<https://complete-url-without-breaks.com%22>
}
4. Custom Frontend Handling If you're embedding the chat widget, you could potentially intercept the response and apply custom CSS to prevent URL wrapping (
white-space: nowrap
or
word-break: keep-all
) . Since this is a widget rendering issue rather than an agent configuration issue, I recommend contacting Retell support for widget-specific solutions: - [Contact Sales]() - [GitHub]()
​ To learn more, see the sources I considered: [[1] Get Chat](https://docs.retellai.com/api-references/get-chat) ​
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] Create Chat Agent](https://docs.retellai.com/api-references/create-chat-agent) [[2] Update Chat Agent](https://docs.retellai.com/api-references/update-chat-agent) ​
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] Chatbot formatting issue](https://discord.com/channels/1186424376300679209/1410337496922984518) ​
​ To learn more, see the sources I considered: [[1] Chat Agent : Formatting Issue: Agent Not Creating Vertical Lists / Line Breaks in Responses](https://discord.com/channels/1186424376300679209/1389801568467157042) [[2] Chatbot formatting issue](https://discord.com/channels/1186424376300679209/1410337496922984518) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
d
@AI Evy How can I connect the retell chat agent to Intercom conversation?
a
Thanks for the follow-up, @dzei2234. I'll get back to you soon.
### Answer Based on the available sources, I don't have specific documentation about integrating Retell chat agents with Intercom conversations. The sources indicate that Retell does not provide native integration with SMS or chat applications at this moment, and you can only interact with the chat agent via API. [(1) ]() While Retell supports an omnichannel strategy where AI voice agents can work alongside other channels, [(2) ]() there's no explicit documentation on Intercom integration. To connect Retell chat agents with Intercom, you would likely need to build a custom integration using: 1. Retell Chat API - Create and manage chat sessions programmatically 2. Intercom API - Access Intercom conversations and messages 3. Webhook integration - Use Retell's webhook functionality to receive chat events and forward them to Intercom [(3) ]() [(4) ]() For specific guidance on this integration, I recommend reaching out through the support channels: - [Contact Sales]() - [GitHub]() Would you like me to provide a general approach for building custom chat platform integrations based on common practices?
​ To learn more, see the sources I considered: [[1] Create chat agent](https://docs.retellai.com/build/create-chat-agent) [[2] Omnichannel](https://www.retellai.com/glossary/omnichannel) [[3] Get Chat Agent](https://docs.retellai.com/api-references/get-chat-agent) [[4] List Chat Agents](https://docs.retellai.com/api-references/list-chat-agents) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.