👟Running

Executing a flow

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.

To get a JWT token, please take a look at the auth integrations.

JavaScript

You can use JavaScript to make a fetch request which will run the flow and return the response.

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

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.

Browser

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

Only flows with the method GET can be run directly in the browser.

Last updated