---
title: "Listen to Events from Flows"
url: "https://help.flows.world/en/article/listen-to-events-from-flows"
language: "en"
last_updated: "2023-08-23T14:33:13.050Z"
---

# Listen to Events from Flows

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

## Syntax

```plaintext
flows.ListenToFlowEvents(<WorkspaceID>, <Channel>, <Callback>)
```

| Parameter | Description |
| --- | --- |
| Workspace ID | The ID of the workspace to listen to events from.  This can be found in the workspace properties panel under Team Settings |
| Channel | The 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. |
| Callback | A callback function that will be called when events are receive on the channel specified from Flows |

## Example

```plaintext
<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](https://help.flows.world/en/article/push-event-to-user)
