Portal Community

Execution Timeline

When a workflow reaches a ChatReceive node, the following sequence occurs:

  1. The node registers a listener with the chat platform (channel, user, and keyword filters applied).
  2. The waiting port fires immediately — any nodes connected to waiting execute now.
  3. The workflow execution suspends. No compute resources are consumed during the wait.
  4. When a matching message arrives: the workflow resumes and the success port fires with the message payload.
  5. If TimeoutMinutes elapses before a message arrives: the error port fires.

waiting Port Output

The waiting port fires synchronously on node entry. It carries minimal state — primarily the context needed to send a prompt to the user:

FieldTypeDescription
listening_on_channelstringThe channel ID the node is listening on (from FromChannel, or empty if not set).
listening_for_userstringThe user ID the node will accept messages from (from FromUser, or empty if not set).
keyword_filterstringThe keyword filter in effect (from KeywordFilter, or empty if not set).
timeout_atstring (ISO 8601)Timestamp when the timeout will fire (if TimeoutMinutes was set). Empty string if no timeout is configured.
conversation_idstringUnique ID for this ChatReceive instance within the workflow run. Use this to correlate the waiting/success/error events in logs.
{
  "listening_on_channel": "CH-support-tier2",
  "listening_for_user": "",
  "keyword_filter": "",
  "timeout_at": "2026-05-23T16:00:00.000Z",
  "conversation_id": "cr_7f3a9b2c-1d4e-4f80-a123-789012345678"
}

success Port Output

Fires when a matching chat message is received. Contains the full message payload:

FieldTypeDescription
message_textstringFull text content of the received message.
from_userstringUser ID of the person who sent the message.
from_channelstringChannel ID where the message was received.
received_atstring (ISO 8601)Timestamp when the message was received.
conversation_idstringThe same conversation ID issued in the waiting port — use for correlating the full conversation lifecycle.
raw_messageobjectThe raw message event object from the chat platform (structure varies by platform).
{
  "message_text": "Yes, approved. Please proceed.",
  "from_user": "U-manager-007",
  "from_channel": "CH-approvals",
  "received_at": "2026-05-23T14:47:32.000Z",
  "conversation_id": "cr_7f3a9b2c-1d4e-4f80-a123-789012345678",
  "raw_message": { "type": "message", "text": "Yes, approved. Please proceed.", "ts": "1748000852.000100" }
}

error Port Output — Timeout and Filter Failure

FieldTypeDescription
errorCodestringEither "timeout" (TimeoutMinutes elapsed) or "filter_mismatch" (message received but keyword did not match after max wait).
messagestringHuman-readable description of what happened.
conversation_idstringSame conversation ID from the waiting port for correlation.
waited_minutesintegerActual number of minutes the node waited before the error fired.
// Timeout scenario:
{
  "errorCode": "timeout",
  "message": "No matching message received within 60 minutes.",
  "conversation_id": "cr_7f3a9b2c-1d4e-4f80-a123-789012345678",
  "waited_minutes": 60
}
Design tip: Always connect the error port to a cleanup handler. Typical cleanup includes: sending an escalation message to a supervisor channel, marking the workflow record as "timed out" in your database, and optionally restarting the ChatReceive listener with an extended timeout.