# Running

There are three different ways to run a flow:

1. Using the **Run** button within the editor
2. Triggering your flow using code, e.g. JavaScript
3. Navigating to the flow URL in your browser (`GET` requests only)

### Run button

The fastest way to run your flow is to use the **Run** button within the editor. This option is perfect for testing.

If the flow does not have any parameters or authentication integrations configured, the flow will be run instantly, and the execution path will be indicated in green.

### Running with parameters

When attempting to run a flow with parameters configured, the run modal will be displayed, allowing you to specify the data included within the request.

### Running with authentication

Similar to running a flow with parameters, if the flow has authentication enabled, the run modal will be displayed, prompting for the user's JWT token.

{% hint style="info" %}
To get a JWT token, please take a look at the [auth integrations](/authentication/overview.md).
{% endhint %}

## JavaScript

You can use JavaScript to make a [fetch request](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch) which will run the flow and return the response.

```javascript
fetch('https://live.api-server.io/run/v1/YOUR_FLOW_ID')
  .then((response) => response.json())
  .then((data) => console.log(data));
```

{% hint style="warning" %}
If your page builder includes the ability to make HTTP requests, you do not need to use JavaScript. For example, WeWeb includes the ability to make HTTP requests.
{% endhint %}

## Browser

To run a flow directly in the browser, copy the flow URL and paste it into the address bar.

{% hint style="info" %}
Only flows with the method `GET` can be run directly in the browser.
{% 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.alphi.dev/flow-builder/running.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.
