Send Loop Event
The Send Loop Event action sends an event to a loop. The event is defined on the loop's type with its own inputs and actions. Those actions run later as a separate run of the loop, in the loop's current stage.
When to Use This Action
Use this action when:
- A mailbox, form, or scheduled task needs to tell a loop that something happened, for example "email received" with the sender and the message as inputs, and you want all the handling logic to live on the loop type
- You are keeping two systems in sync and send events such as "ticket created" or "note added" to the loop that tracks the pair
- You want to hand data to a loop without moving it to another stage
To change the loop's stage, use Move Loop to Stage. To re-check the loop in its current stage, use Wake Loop. If you do not know the loop yet, use Find or Open Loop first and send the event to the loop it returns.
Configuration
| Field | Description |
|---|---|
| Loop | The ID of the loop. Optional in a loop stage or event: leave it empty to use the loop this run belongs to. Required everywhere else, including in a macro or AI action called from a loop run, because those do not see the calling loop. Supports text expressions. |
| Loop Type | Optional. Leave empty to use the loop's own type. If you specify a type, it must match the loop's type. The Event list and named Inputs need a locked Loop Type. Choose an event from the list to see its named inputs. Without a locked Loop Type, type the event's name or ID and enter each input by name in the Inputs rows. |
| Event | The event to send. Choose it from the list, or unlock the field and enter the event's ID, its name, or a text expression. The action looks for an ID first and then a name, ignoring capitals in names. If two events share a name, the action cannot find either by name. Use the ID or choose the event from the list. It must be an event of the loop's type. |
| Inputs | A value for each input of the event. Use {{variables}} for dynamic values. Values are text and are converted to the input's type: numbers, true or false, and a JSON list for list inputs. Leave an optional input empty to not provide it. Required inputs must have a value. |
| If the loop is closed | What to do when the loop is closed. See the table below. |
If the loop is closed
A closed loop never runs actions. To send it an event, reopen it first or choose Reopen the loop, then send.
In a loop stage or event, choose from Continue processing, Stop all rules (stops this run), Generate an exception and stop processing, and Reopen the loop, then send. Stop current rule appears in email rules, and Exit macro appears in macros.
| Option | What happens |
|---|---|
| Generate an exception and stop processing | The action fails. This is the default. |
| Continue processing | The action skips the event, logs that it did not send it, and continues the run. |
| Stop current rule | The action skips the event and stops the current email rule. |
| Stop all rules | The action skips the event and stops this run. |
| Exit macro | The action skips the event and exits the macro. |
| Reopen the loop, then send | The action reopens the loop in the stage it was closed in, runs that stage's When entered actions, and sends the event. |
What the Event's Actions See
The event's actions run in the loop's current stage, with the same variables as a stage's actions plus:
| Variable | Description |
|---|---|
{{input.<name>}} | The value of the input with that name. An optional input you did not send is empty. |
{{meta.loop.event.name}} | The name of the event. {{meta.loop.event.id}} is its ID. |
{{meta.loop.stage.name}} | The loop's current stage when the event run starts, which may differ from the stage the loop was in when the event was sent. |
Returned Variables
This action does not return any variables. The event runs later, so there is no result to return.
Notes
- The event runs later as its own run, in the loop's current stage. The action does not wait for it, and the run that sent the event continues, also when it sent the event to its own loop.
- A loop runs one thing at a time, so the event waits for the current run. Waiting moves, wakes, and events may run in a different order than you requested them. If an automation requests a move and then sends an event, the event may run in either stage. Check
{{meta.loop.stage.name}}in the event's actions when the stage matters. - Closed loops never run actions. To act on a closed loop, reopen it, act, and close it again.
- Each text input can hold up to 262,144 characters.
- File inputs are not supported. Save files to the loop first with Save File to Loop.
- An input the event does not have, a missing required input, or a value that does not fit the input's type fails the action and names the input. Nothing is sent.
- If the event does not exist in the loop's type, or the loop is of another type than Loop Type, the action fails.
- The loop must belong to your account. An unknown loop ID fails the action.