broadcast

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

broadcast v15.0.0

Send a message across different sessions over a channel and event. These messages are on send and forget base and are not stored.

In pins 5 + flow
  • flow
    flow
  • channel required
    value

    A custom / unique channel to send this message in, sessions whom subscribed to this channel will receive this payload.

  • event required
    value

    Unique event to run, a single channel could contain multiple events sessions could subscribe on.

  • message required
    object

    Full payload to send

  • fields v15.0.0
    array<value>

    Message whitelist: dot-paths of the fields the message may carry. Everything not listed is stripped before publishing; on an array the whitelist is applied per element. Empty or unconnected sends the message as-is. A broadcast reaches every subscriber, so an unprojected document here ships all its fields to all of them.

  • skip self required
    condition

    If true we will try not to send this payload to the current active websocket sending this message. In rare cases it could still end up in the connection (for example direct reconnect or multiple websocket connections)

    Default false

Out pins 0 + flow
  • flow
    flow

A typical wiring for broadcast: a function trigger starts the flow; false feeds the skip_own_websocket pin; new object feeds the message pin; concatenate values feeds the channel pin; the flow out pin feeds Request: POST json.

Studio canvas example for the broadcast block: typical wiring for broadcast.

Commonly used with

In production blueprints, this block is most often wired together with:

  • false: feeds into this block. Gives the condition false hard-coded.
  • broadcast: wired in both directions with this block. Send a message across different sessions over a channel and event. These messages are on send and forget base and are not stored.
  • new object: feeds into this block. Builds a new object filled with the given fields.
  • concatenate values: feeds into this block.
  • value: feeds into this block. Simply returns the provided value.
  • delete: feeds into this block. Removes the specified key and their values.

Version history

Introduced in v15.0.0.


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