Add agent messages to conversation history. Designed for integrating with external systems like WhatsApp, Chatwoot, and CRM platforms to sync agent messages into the conversation thread.
Add agent messages to existing or new conversations
Support for external channel integrations (WhatsApp, Chatwoot, CRM)
Automatic contact creation and association
This endpoint is different from the Query endpoint, which sends user messages and receives AI responses. This endpoint is for adding agent messages to the conversation history.
ID of the conversation to add the message to. Auto-generated if not provided.
For Chatwoot/CRM integrations: The conversationId format is essential to ensure messages are placed in the correct conversation. Use the format crmchatsappai_{accountId}_{customerId} to match existing conversations. Without the correct format, messages may be added to the wrong conversation thread.
Used to link messages from external platforms to conversations in Laburen.
For WhatsApp Embedding: The channelExternalId is essential to ensure messages are placed in the correct conversation. Without it, messages may be added to the wrong conversation thread.
Contact data to create or associate with the conversation. If a contact with matching email, phone number, or userId exists, it will be used. Otherwise, a new contact will be created.
{ "visitorId": "{{$json.contacts[0].wa_id}}", "query": "{{ $('Combino mensaje con cada fletero').last().json.mensaje}}", "streaming": false, "channel": "whatsapp", "channelExternalId": "{organizationId}_{agentId}_{{$json.contacts[0].wa_id}}"}
The channelExternalId format: {organizationId}_{agentId}_{telephoneNumber}
Critical: The channelExternalId is essential for WhatsApp Embedding integration. Without it, messages will not be placed in the correct conversation thread. Always include this field with the exact format {organizationId}_{agentId}_{telephoneNumber} when using WhatsApp channel.
Critical: The conversationId format is essential for Chatwoot/CRM integrations. Use the exact format crmchatsappai_{accountId}_{customerId} to match existing conversations. Without the correct format, messages will not be placed in the correct conversation thread.