Discussions

Ask a Question
Back to all

How to use Kommo Chat API to send messages via n8n?

I'm integrating Kommo Chat with n8n to automatically reply to leads who message us via WhatsApp. I successfully receive the webhook with fields like chat_id, talk_id, author_id, and text. However, to send a message back, the API requires this URL format:

https://amojo.kommo.com/v1/chats/{dialog_uuid}/{chat_id}/messages

The problem is that the webhook only provides the chat_id, and not the dialog_uuid. I tried retrieving it using:

GET https://amojo.kommo.com/v1/chats?with_video=true&stand=v16

But I keep getting a 404 error, even when using the correct X-Auth-Token (which I confirmed via the Kommo console as X-Access-Token).

I also tried:

  • witching to my account subdomain (https://evolucioniaagencia.kommo.com/v1/chats) → still 404
  • Querying directly by chat_id → no such endpoint
  • Validating the token manually → seems correct but doesn’t work for listing chats

Has anyone successfully retrieved the dialog_uuid dynamically using only the chat_id? Is there an alternative endpoint or method to resolve this without hardcoding the full URL?