ghl_conversation_export_messages_by_location
Export conversation messages for a specific location with cursor-based pagination, date/contact filters, and optional channel selection; email messages require an explicit Email channel filter.
Instructions
Export messages by location ID Export messages for a specific location with cursor-based pagination support.
Channel Filtering Behavior:
When channel is omitted: Returns all non-email message types, including messages that don't belong to any specific channel.
When channel=Email: Returns email messages only.
When channel is specified (SMS, Call, WhatsApp, etc.): Returns messages for that specific channel.
Limitations:
Group Chat and SMS Review Request message types are not supported.
Activity messages (opportunity updates, appointments, etc.) are not included in the export. Use
GET /conversations/{conversationId}/messages(Get messages by conversation id) to fetch them.Cursor validity is 2 minutes from the last request made. Endpoint: GET /conversations/messages/export (Version header: v3; source: v3/conversations-v3.json) OAuth scopes: conversations/message.readonly Pagination params: limit, cursor — pass them to page through full result sets.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"locationId": "<locationId>"
},
"name": "ghl_conversation_export_messages_by_location"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Number of messages to return per page | |
| cursor | No | Cursor for pagination. Pass the nextCursor from previous response to get next page. | |
| sortBy | No | Field to sort by | createdAt |
| channel | No | Filter by message channel. Optional - when not provided, all non-email message types will be returned, except activity messages (opportunity updates, appointments, etc.), which are not included in the export. To fetch email messages, you must explicitly set channel=Email. | |
| endDate | No | End date to filter messages by | |
| contactId | No | Filter messages by contact ID | |
| sortOrder | No | Sort order | desc |
| startDate | No | Start date to filter messages by | |
| locationId | Yes | Location ID to filter messages by | |
| conversationId | No | Filter messages by conversation ID |