Listen to Events from Flows

This function can used when pushing events from Flows to your front end. 

Syntax

flows.ListenToFlowEvents(<WorkspaceID>, <Channel>, <Callback>)
ParameterDescription
Workspace IDThe ID of the workspace to listen to events from.  This can be found in the workspace properties panel under Team Settings
ChannelThe name of the Channel to listen to events on.  A channel name can be anything you define but must match the channel name being used from flows when pushing events. 
CallbackA callback function that will be called when events are receive on the channel specified from Flows

Example

<script>
var workspace = "W2-8j982q0-SLA12-aA";
var channel = "broadcast";

flows.ListenToFlowEvents(workspace, channel, function(event) {
    console.log(event);
});
</script>

For more information on this feature, see Push Event To User