> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zapier.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Pre-filled Zap workflows

> Prefills allow you to define the input fields on behalf of the user, simplifying the experience of setting up their Zap.

Simplifying Zap setup is one of the most effective ways to make sure the workflows created work as desired. As integration owners, you can likely pre-fill some of the Zap fields on behalf of your users; making Zap setup faster, easier and more reliable.

## What are pre-filled Zap workflows?

Pre-filled workflows are URLs with field values added as parameters, which you can use to direct users to the Zap editor with some input fields already filled. Place these URLs inside your product or within an embedded Zap editor to facilitate users creating and publishing workflows.

The following is an example of a simple pre-filled Zap that sends the weather to a Slack direct message every day. The **latitude** and **longitude** inputs have been pre-filled in this case.

```text theme={null}
https://api.zapier.com/v1/embed/space-by-zapier/create?steps[0][app]=WeatherCLIAPI@latest&steps[0][action]=today_forecast&steps[0][params][latitude]=40.7127&steps[0][params][longitude]=-74.0059&steps[1][app]=SlackAPI&steps[1][action]=direct_message
```

Steps are zero-indexed, so `steps[0]` is the trigger and `steps[1]` is the action.

| Parameter | Value | What it does |
| - | - | - |
| `steps[0][app]` | `WeatherCLIAPI@latest` | Sets the trigger app to Weather by Zapier |
| `steps[0][action]` | `today_forecast` | Sets the trigger event to today's forecast |
| `steps[0][params][latitude]` | `40.7127` | Pre-fills the latitude |
| `steps[0][params][longitude]` | `-74.0059` | Pre-fills the longitude |
| `steps[1][app]` | `SlackAPI` | Sets the action app to Slack |
| `steps[1][action]` | `direct_message` | Sets the action event to send a direct message |

<Card title="Test this pre-filled Zap" icon="bolt" href="https://api.zapier.com/v1/embed/space-by-zapier/create?steps[0][app]=WeatherCLIAPI@latest&steps[0][action]=today_forecast&steps[0][params][latitude]=40.7127&steps[0][params][longitude]=-74.0059&steps[1][app]=SlackAPI&steps[1][action]=direct_message" horizontal="true" />

## Create a pre-filled Zap workflow

There are two ways to create a pre-filled Zap workflow:

* [Zap generator](#use-the-zap-generator)
* [Zap template](#use-a-zap-template)

### Use the Zap generator

The UI-based generator within the [Zapier Developer Platform](https://developer.zapier.com/) facilitates constructing pre-filled Zap workflows. Start by selecting your app and navigating to `Embed` → `Pre-filled Zap workflows` and scroll down to the generator.

<Frame caption="Screenshot of Pre-filled Zap workflows tab">
  <img src="https://cdn.zappy.app/2a4f9c6de6c525cbcdc1b513ec88c519.png" />
</Frame>

<Steps>
  <Step title="Select an app">
    Start by selecting an app and event for both the trigger and action to see
    the fields you can pre-fill. If no fields appear, the event has no input
    fields.

    <Frame caption="Screenshot of generator trigger step setup">
      <img src="https://cdn.zappy.app/87b9c4951d55298780ff209e217bb750.png" />
    </Frame>
  </Step>

  <Step title="Select the fields you want to pre-fill">
    * If you do not want to pre-fill the field, leave the box unchecked. In the
      Zap, the field will be empty or set to a default value, if there is one.
    * If there's a static value for a field that applies to every user's Zap
      (like the title of an email), check the field and provide the value in the
      text field.
    * If the values are dynamic or you do not know them yet, replace the
      placeholders in curly brackets (for example, `{TRIGGER_LIST_ID}`) in the
      generated URL before using it in your app. This could be something like an
      account or list ID field. The placeholder serves as a reminder to replace
      the value at runtime.
    * If the field is greyed out, it requires a complex field value and cannot
      be pre-filled.

    <Frame caption="Screenshot of prefill input field options">
      <img src="https://cdn.zappy.app/9e845182506292214c866f3278861e8d.png" />
    </Frame>

    <Info>
      Fields denoting (required) are required for turning the Zap on, not
      required to be pre-filled.
    </Info>
  </Step>

  <Step title="Test the Zap">
    * Use the handy test button to make sure the resulting Zap is what you
      intended. You'll need to connect app accounts on both steps to see the
      pre-filled fields.
    * Copy the code and embed it inside your app to make setting up a Zap
      easier and faster for users.
  </Step>
</Steps>

The generator only supports creating 2-step Zap workflows, but you can construct multi-step workflows by building upon the generated URL and adding `steps` parameters with increased indeces.

### Use a Zap template

**Before you start:** you need to know the required input fields for each trigger or action step. You can find the fields as defined in your [Zapier integration](https://developer.zapier.com/).

<Steps>
  <Step title="Fetch the Zap template's create_url">
    Get the appropriate `create_url` property from the specific Zap template desired. This can be retrieved from the [zap-templates](/powered-by-zapier/api-reference/zap-templates/get-zap-templates) endpoint. It follows the following format: `https://api.zapier.com/v1/embed/{app_name}/create/{template_id}`
  </Step>

  <Step title="Define the input values">
    The url params should be defines as follows; `step[{step_index}][params][{param_name}]`- with steps being zero-indexed. As an example, Trello could prefill the name of a Trello card `name` in the second step of the Zap template using the following:

    `https://api.zapier.com/v1/embed/trello/create/113?steps[1][params][name]=hello`

    where the `create_url` of `https://api.zapier.com/v1/embed/trello/create/113` was retrieved from the [zap-templates](/powered-by-zapier/api-reference/zap-templates/get-zap-templates) endpoint, and input fields defined in their Zapier integration.
  </Step>
</Steps>

Here's what it would look like in the editor:

<Frame caption="Zap editor showing `hello` pre-filled into the name field of a new Zap titled Create Card in Trello">
  <img src="https://cdn.zappy.app/415ac51b31ab86dbf2b1589fe524395c.png" />
</Frame>

You can pre-fill multiple values for the user. In this example, `name` and `desc` are pre-filled:

```text theme={null}
https://api.zapier.com/v1/embed/trello/create/113?steps[1][params][name]=yoyoyo&steps[1][params][desc]=yeehaw
```

| Parameter | Value | What it does |
| - | - | - |
| `steps[1][params][name]` | `yoyoyo` | Pre-fills the card name in the second step |
| `steps[1][params][desc]` | `yeehaw` | Pre-fills the card description in the second step |

<Frame caption="Zap editor showing `yoyoyo` pre-filled into the name field, and `yeehaw` pre-filled into the description field of a new Zap titled Create Card in Trello">
  <img src="https://cdn.zappy.app/278dc4d00844240ff8289bb0267db63c.png" />
</Frame>

You can provide a label for pre-filled dropdown fields. Zapier does not load every page of dropdown choices until the user opens the dropdown, so the label shows the user which option is selected:

```text theme={null}
https://api.zapier.com/v1/embed/trello/create/113?steps[1][params][board]=1234&steps[1][meta][parammap][board]=Test
```

| Parameter | Value | What it does |
| - | - | - |
| `steps[1][params][board]` | `1234` | Pre-fills the board ID in the second step |
| `steps[1][meta][parammap][board]` | `Test` | Sets the label shown for that board in the dropdown |

<Frame caption="Zap editor showing `Test` pre-filled into the board field of a new Zap titled Create Card in Trello">
  <img src="https://cdn.zappy.app/ecadae9e61631a7cb1a456b581ab4705.png" />
</Frame>
