A workflow is a series of conditional actions in response to a user or application event
You may have come across workflows before. A workflow can be used to describe the flow of some logic as a graph. In toddle, a workflow always runs top-down. So we may use it to validate some user input. In the following example, we listen to the `change` event of an input field and check if the input is valid.
In the example, we use a `switch` node to create conditional logic. Each case in the switch validates itself using a formula. The workflow will continue from the first case to return truthy, going from left to right. If no case is true, the else will run.
The result of your workflow is to run some desired action. Sometimes based on conditions with a `switch`, but often a workflow can be as simple as a single action, such as `Set variable` or `Trigger event`
Some actions have events of their own. For example, if you call one of your APIs with an action, you can perform a new workflow on either `onSuccess` or `onError` to handle different use cases.