Cortex icon

Cortex

Interact with Cortex API

Message → Send

AI-generated

Summary

Send various types of messages within a specified Cortex conversation, including text, media (image, video, audio, voice, document), internal notes, template messages, and reactions.

Inputs

  • Conversation ID (required) — UUID of the conversation to which the message will be sent.
  • Message Type (required) — Type of message to send: text, image, video, audio, voice, document, internal note, template, or reaction.
  • Message Content (required) — Text content for message types: text, internal note, or reaction.
  • Media URL (required) — URL of the media file, required for media message types: image, video, audio, voice, or document.
  • Caption — Optional caption for image, video, or document messages.
  • Template (required) — Approved WhatsApp template selection for template message type.
  • Template Variables — Mapping of variables to fill in the selected template's placeholders.
  • Simulation Mode — If true, records the message as read internally without sending to the Meta API, useful for testing.
  • Sender ID — Optional identifier of the sender; defaults to "agent" if not provided.
  • React to Message ID — UUID of the message to react to, used only for reaction message type.
  • Reply To Message ID — UUID of the message to reply to, not applicable for reaction messages.

Output shape

a JSON object representing the sent message response or an error object if the request fails.

Returns the API response for each sent message individually for multiple input items. If simulation mode is enabled, the message is recorded but not actually sent. Errors can be caught if the node is set to continue on failure.

Examples

Example 1: Sending a text message

Provide conversation ID, set message type to 'text', supply message content, optionally provide sender ID or reply to message ID.

Example 2: Sending a media message

Provide conversation ID, choose media type (image, video, audio, voice, document), supply media URL, optionally add a caption and sender ID.

Example 3: Sending a template message

Select an approved WhatsApp template, provide required template variables matching the template placeholders, and conversation ID.

Links

Discussion