External Chat
Conversation-close webhook for Slack, Google Chat, and Microsoft Teams
Slack, Google Chat, and Microsoft Teams send this webhook when a conversation closes.
Atonom sends the payload below after the conversation is closed and post-processing finishes. Verify the request with webhook authorization.
To learn how to specify webhook URLs for your cloud employees in the Atonom app, please see the webhook URLs configuration step in the quickstart guide.
Event type:
external-chat-data: sent when a Slack, Google Chat, or Microsoft Teams conversation closes
Payload
{
"event": "external-chat-data",
"obj_id": "15",
"tenant_id": 42,
"dialogue_id": "15",
"session": {
"session_id": 44,
"provider": "slack",
"workspace_id": "T0911AYU7HA",
"chat_id": "D0C5VSW0R5K",
"chat_kind": "dm",
"bot_id": 9
},
"transcript_with_tools": [
{
"id": 3,
"kind": "chat",
"body": "What are your hours?",
"participant_id": 8,
"participant_name": "Sam",
"created_timestamp": "2026-09-30T12:00:00Z"
},
{
"id": 9,
"kind": "tool_invocation",
"body": "",
"participant_id": 8,
"data": {
"type": "tool_invocation",
"tool_name": "search_kb",
"tool_call_id": "call-123",
"tool_args": "{\"query\":\"hours\"}"
},
"created_timestamp": "2026-09-30T12:00:01Z"
},
{
"id": 10,
"kind": "tool_result",
"body": "",
"data": {
"type": "tool_result",
"tool_call_id": "call-123",
"results": "{\"status\":\"ok\"}"
},
"created_timestamp": "2026-09-30T12:00:02Z"
},
{
"id": 11,
"kind": "agent_message",
"body": "We are open 9am to 5pm.",
"participant_id": 8,
"participant_name": "Atonom",
"created_timestamp": "2026-09-30T12:00:03Z"
}
]
}obj_id and dialogue_id are the same dialogue id. parent_id, participant_id, participant_name, and data are left out when empty. A tool result usually has no participant.
Session
| Field | Description |
|---|---|
session_id | Atonom id for this chat session |
provider | slack, googlechat, or msteams |
workspace_id | Slack workspace id, the Google Cloud project number, or the Microsoft Directory (tenant) ID |
chat_id | Conversation id. The shape depends on the provider. See below |
chat_kind | dm or group |
bot_id | Atonom bot registration id |
parent_id | Present when the conversation sits inside a larger room. Omitted when empty |
Slack
| Field | Description |
|---|---|
workspace_id | Slack workspace id, such as T0911AYU7HA |
chat_id | Direct message: channel id, such as D0C5VSW0R5K. Thread: channel:thread_ts, such as C123:111.222 |
chat_kind | Direct messages are dm. Channel messages are group |
parent_id | Present for a thread. This is the Slack channel id, such as C123 |
Google Chat
workspace_id is the Google Cloud project number, such as 123456789012. It is not the project id slug.
| Place | chat_kind | chat_id | parent_id |
|---|---|---|---|
| Direct message | dm | Space name, such as spaces/AAA | Omitted |
| Space thread | group | Thread name, such as spaces/AAA/threads/BBB | Space name, such as spaces/AAA |
| Space with no thread | group | Space name, such as spaces/AAA | Omitted |
Microsoft Teams
workspace_id is the Directory (tenant) ID. It is not the Application (client) ID.
| Place | chat_kind | chat_id | parent_id |
|---|---|---|---|
| Direct message | dm | Conversation id, such as a:1AbC... | Omitted |
{
"session_id": 26,
"provider": "googlechat",
"workspace_id": "123456789012",
"chat_id": "spaces/AAA/threads/BBB",
"parent_id": "spaces/AAA",
"chat_kind": "group",
"bot_id": 1
}Transcript
Each item in transcript_with_tools is one conversation event, in order.
| Field | Description |
|---|---|
id | Conversation event id |
kind | Event kind. Chat text is chat or user_message. The agent reply is agent_message. Tool calls are tool_invocation and tool_result |
body | Message text. Empty for tool events |
participant_id | Participant id, when the event has one |
participant_name | Display name, when the event has one |
created_timestamp | UTC time |
data | Tool payload. Present on tool events |
body is the person's message text. Slack author tags are already removed.
Tool invocation
{
"type": "tool_invocation",
"tool_name": "search_kb",
"tool_call_id": "call-123",
"tool_args": "{\"query\":\"hours\"}"
}Tool result
{
"type": "tool_result",
"tool_call_id": "call-123",
"results": "{\"status\":\"ok\"}"
}tool_args and results are strings. They are often JSON encoded as text. Match a result to its invocation with tool_call_id.

