# Environment Variables & Profiles

Workflow **Environment Variables** in Looply allow you to define reusable sets of values that can be injected into your workflow at runtime. Each environment consists of a **profile -** a JSON object containing key-value pairs - that can be used to dynamically configure workflow behaviour. You can create multiple profiles per workflow, select which one to use at runtime, and set a **default profile** to fall back on when no specific selection is made. This helps keep your workflows clean, flexible, and easy to maintain across different environments or use cases.

## Managing & Using Environment Variable Profiles

Environment variables in Looply make it easy to configure workflow behaviour dynamically - without hardcoding values into each step. With environment profiles, you can switch between sets of values tailored for different environments like `dev`, `qa`, `staging`, or `prod`.

<figure><img src="/files/5h7KIWyKO3OupwQj1c3k" alt=""><figcaption></figcaption></figure>

### Creating & Managing Profiles

To manage environment variable profiles:

1. Open your workflow in the **Workflow Studio**.
2. Click the **workflow settings menu (⋮)** and select **Environment Variables**.
3. In this section, you can:
   * **Create** new profiles for different environments.
   * **Edit** each profile’s JSON data to suit the needs of that environment.
   * **Set a default profile**, which is used when no other profile is specified.
   * **Rename** existing profiles.
   * **Duplicate** profiles
   * **Delete** profiles that are no longer needed.

Each profile is essentially a JSON object of key-value pairs that will be injected into the workflow’s payload at runtime.

### Selecting a Profile for Execution

<figure><img src="/files/qcveYsw2LNVyG8eThsEP" alt=""><figcaption></figcaption></figure>

Once profiles are set up, executing a workflow with a specific profile is easy:

1. Click **Execute** in the top-right of your workflow.
2. A dialog will appear prompting you to select an **Execution Profile** from a dropdown.
3. Choose the profile you want (e.g. `prod`, `staging`, `dev`) and click **Execute**.

The selected profile’s environment variable data will be injected into the payload and accessible to all steps in the workflow.

{% hint style="info" %}
💡 **Tip:** You can also reference environment variables as parameters in function steps, conditions, or integrations using the workflow data binding menu.
{% endhint %}

#### Developer API

For advanced usage or automated execution, environment variable profiles can also be selected programmatically via the **Developer API**. See the Developer API documentation for details on how to pass a profile name as part of your workflow execution payload.

{% content-ref url="/pages/s4gM4N2pksrevybhfCC6" %}
[Workflow API](/api-reference/workflow-api.md)
{% endcontent-ref %}


---

# 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://academy.looply.ai/workflows/environment-variables-and-profiles.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.
