# Manual Trigger

With a manual trigger, you can run a workflow on demand. You can start one or [multiple](https://docs.relay.app/triggers/batch-triggers) new runs on click, or set up a [custom schedule](https://docs.relay.app/triggers/scheduled-trigger) to run the workflow at a desired frequency.

## Setting up a manual trigger

#### 1. Select *Manual* from the trigger menu

Choose whether you want to start a single run or [multiple runs](https://docs.relay.app/triggers/batch-triggers) every time the workflow runs.

<figure><img src="https://647519108-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXkKoEy3xMIYaIwd4mRAB%2Fuploads%2Fgit-blob-7ad921565136c8c7d8f45d046e0ab15ca87320de%2FCleanShot%202024-11-21%20at%2012.41.58.png?alt=media" alt=""><figcaption><p>"Manual" trigger options in the trigger panel</p></figcaption></figure>

#### 2. Specify any optional workflow inputs

If you want to be able to input custom data each time the manual workflow runs, you can specify what data will be needed to run the workflow in the trigger panel.

You'll then be able to use these run inputs as variables in the rest of the workflow. They will be accessible as [step outputs](https://docs.relay.app/data/step-outputs) of the trigger step.

<figure><img src="https://647519108-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXkKoEy3xMIYaIwd4mRAB%2Fuploads%2Fgit-blob-c9cc2c05ffcad9bb59bcb0cdff67a47a121dc3b0%2FCleanShot%202024-11-21%20at%2012.49.40.png?alt=media" alt=""><figcaption><p>Optionally, you can add run inputs to a manual trigger</p></figcaption></figure>

## Starting runs of a workflow with a manual trigger

#### 1. Start a new run manually

Click the **Start run** button in the trigger card to start a new run of the workflow.

<figure><img src="https://647519108-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXkKoEy3xMIYaIwd4mRAB%2Fuploads%2Fgit-blob-869032f642c1c7f780a0f71427b40c1ceada8870%2FCleanShot%202024-11-21%20at%2012.49.40.png?alt=media" alt=""><figcaption></figcaption></figure>

#### 2. Fill in any required inputs

If your workflow requires inputs, when you start it manually you'll be asked to input the requested data. Fill it in and click **Start run**.

<figure><img src="https://647519108-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXkKoEy3xMIYaIwd4mRAB%2Fuploads%2Fgit-blob-c0e6a01c016c48150e08225ea7d3a5c776ddfc65%2FCleanShot%202024-11-21%20at%2012.53.40.png?alt=media" alt=""><figcaption></figcaption></figure>

## Starting runs from another workflow

{% hint style="danger" %}
In most cases, you'll want to [consider using Sequences instead](https://docs.relay.app/flow-control/sequences).
{% endhint %}

In addition to starting runs manually with a click, you can also call a manual workflow from another workflow and pass data between them.

*For clarity, let's call these two workflows your **primary workflow** (the workflow doing the calling) and **secondary workflow** (the manual workflow getting triggered by the primary).*

#### 1. Specify any data you want to pass between workflows

First, you need to create **run inputs** in the secondary workflow for any data you want to receive from the primary workflow. Open the secondary workflow and create a run input for each variable you need to pass into it.

<figure><img src="https://647519108-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXkKoEy3xMIYaIwd4mRAB%2Fuploads%2Fgit-blob-21975c50ef01ee5d0174ea9ccea79ea3da0f40d5%2Fimage.png?alt=media" alt="" width="375"><figcaption></figcaption></figure>

#### 2. Add a *Trigger workflow* step to the primary workflow

Open your primary workflow, add a new step, and under **Flow control** select **Trigger run of a manual workflow**.

<figure><img src="https://647519108-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXkKoEy3xMIYaIwd4mRAB%2Fuploads%2Fgit-blob-823a53a9f409b8b68e6693edab5acd83863e7b9d%2FScreenshot%202025-01-05%20at%207.11.24%E2%80%AFPM.png?alt=media" alt="" width="375"><figcaption><p>Trigger options</p></figcaption></figure>

#### 2. Select the secondary workflow to call

Select your secondary workflow as the manual workflow to call from the primary workflow.

<figure><img src="https://647519108-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXkKoEy3xMIYaIwd4mRAB%2Fuploads%2Fgit-blob-c6671fbbffff0bc0225efafd8741862008b60b2b%2FScreenshot%202025-01-05%20at%207.12.15%E2%80%AFPM.png?alt=media" alt="" width="375"><figcaption></figcaption></figure>

#### 3. Map data to the required inputs

The inputs required by the secondary workflow will be available as fields in the **Trigger run** step.

Map data from the primary workflow into these fields in order to make it accessible to the secondary workflow.

<figure><img src="https://647519108-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXkKoEy3xMIYaIwd4mRAB%2Fuploads%2Fgit-blob-6212b841c3bd62147c0148b90643935e866689dd%2Fimage.png?alt=media" alt="" width="375"><figcaption></figcaption></figure>

#### 4. Test it

Start a test run of your primary workflow. When the workflow runs, you should see:

1. The primary workflow will call the secondary workflow when it gets to the trigger step
2. Any data added as run inputs will be passed from the primary to the secondary workflow
3. The secondary workflow will start a new run
4. The data from the primary workflow will be used in the secondary workflow
