# Flow Trigger

<figure><img src="/files/FkR1sonG4ASBk4eeURPV" alt="" width="157"><figcaption></figcaption></figure>

## Actions

Flow Trigger has only one default action - Trigger flow.\
Optionally, you can select to execute the triggered flows [**synchronously**](#2.-synchronous) or [**asynchronously**](#2.-asynchronous)**.**

### **Setup**

1. Include the ID of the flow you want to execute.
2. Select execution mode. The default is `asynchronously`

<figure><img src="/files/qOajeo1owKVceSmEyudU" alt="" width="563"><figcaption></figcaption></figure>

If you include Flow Trigger in a Loop to call many other flow runs (e.g. more than 100), it is best practice to include a small delay, using the [Delay Helper](/connectors/helpers/delay-helper.md), in order to limit the load on the new flow and any systems it may call.

If you need to trigger multiple flows, you can place this additional trigger:

1. **Right Behind the First Trigger:** This way, multiple flows will be triggered sequentially, one after another.
2. **At the End of the Triggered Flow:** If you want the second flow to run after the first one completes its execution, you can place the Flow Trigger at the end of the first triggered flow. This ensures that the flows execute in a specific order.

## S**ynchronous and asynchronous execution:**

{% hint style="info" %}
In **both** execution modes, it is possible to access variables previously defined in the initial (trigger) flow in the subsequently triggered flows.
{% endhint %}

This means, that if there is `zendesk_contacts` defined in the initial **(trigger)** flow, you can just reference `{{ zendesk_contacts[1] }}` in the **triggered** flow to get the first contact of Zendesk from the initial flow.

### **1. Asynchronous**

It immediately triggers the flow and continues with the next subsequent step in the initial flow.\
If it is set to **asynchronously**, the flow with the Flow Trigger cannot access the variables of the other flow (as it might not have run yet). Therefore you can't access variables defined in the **triggered** flows back in the initial **(trigger)** flow.&#x20;

### **2. Synchronous**

This mode waits for the underlying flows to be finished executing.  \
If it is set to **synchronously**, you can access variables defined in the **triggered** flows back in the initial **(trigger)** flow.&#x20;

{% hint style="info" %}
In case of variables with the same names, the most recent instance will be referenced.&#x20;
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.locoia.com/connectors/helpers/multi-flow-trigger.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
