Emit events to trigger seperate workflows.

create-event-header

The Create Event action allows you to emit an event which serves as a trigger to execute an Event-based workflows.

When creating an event, you are able to set JSON parameters which will be emitted together with the event. Within the event based workflow, those parameters can be accessed through {{$param.KEY}}.

Infinite Loop

An event triggered workflow is able to trigger itself or is able to trigger itself through other workflows and routes. While these loops in workflows are powerful, they need to be handled with care, since a workflow that only and always triggers itself is a loop, that once started, can’t be stopped. This workflow would then run infinitely until the users usage quota is completely depleted for the month (in the worst case even causing lots of costs).

That’s why, by default, workflows that seem like possibly infinite loops are stopped before they can do too much harm.

If, however, you are sure that your workflow is in fact not a infinite loop, then you can toggle Allow triggering itself.

To be clear: even when Allow triggering itself is false, the workflow is able to trigger itself but with the difference that it’ll be monitored and aborted early if it becomes to much.

Example

In the following event we are storing a SKU ID as a parameter. Event based workflows listening to `sku_reorder will be triggered if this event is emitted:

If we want to access the paramaters of the event, it will be available under {{$param.SKU}}.

Lessons

Learn more about the Create Event action, among other things, in the following Fastgen University lessons: