send message

This block is part of the websocket group and was last modified in core v15.0.0.

send message v13.0.5 Updated v15.0.0

Send the given payload as JSON to the current websocket

In pins 2 + flow
  • flow
    flow
  • payload required
    object
  • fields v15.0.0
    array<value>

    Payload whitelist: dot-paths of the fields the payload may carry. Everything not listed is stripped before writing to the websocket; on an array the whitelist is applied per element. Empty or unconnected sends the payload as-is.

Out pins 2 + flow
  • flow
    flow
  • success
    condition
  • error
    value

Writes the payload to the current WebSocket connection as a {type: "payload", data: ...} message. When fields is wired, only those dot-paths survive : everything else is stripped before sending (per element on arrays). success=false with error MISSING_WEBSOCKET when there is no connection, PRODUCTION_RUN_ONLY in simulation, or the write error when sending fails.

write to spark

A typical wiring for send message: a function trigger starts the flow; new object feeds the payload pin; the flow out pin feeds debug.

Studio canvas example for the send message block: typical wiring for send message.

Version history

Introduced in v13.0.5.

Last modified in v15.0.0.


Back to websocket Return to the main group to view all sub-groups Back to websocket Return to the group to view all blocks within this group