Skip to content

Build your first flow ​

In this tutorial you build a small flow that fetches a user from a public test API and turns their name into capital letters. Along the way you'll add a trigger and two steps, pass one step's output into the next, run the flow, read the result, and publish it. It takes about ten minutes.

1. Create the flow ​

  1. Open Flows in the sidebar.
  2. Click Create a Flow, then From Scratch.
  3. Enter a Flow Name, such as My first flow, and optionally a Description. Click Save.

The flow opens on the canvas with two empty boxes: Select a trigger at the top, and Select a node for the first step. Your changes are saved automatically as you work.

2. Add a trigger ​

A trigger decides when the flow runs. While you build, use the Manual trigger, which runs the flow when you click Run.

  1. Click Select a trigger. Choose a trigger opens.
  2. Open Built-in, choose Manual, then Run Flow.

The Run button only works when the flow has a Manual trigger. Later you can add a webhook or schedule trigger next to it.

3. Fetch data with HTTP ​

  1. Click Select a node. Add a step opens.

  2. Open Built-in, choose HTTP, then GET.

  3. Set URL to:

    https://jsonplaceholder.typicode.com/users/1

    This is a free test API. It returns a JSON user with fields such as name and email.

  4. Click Continue.

To rename the step, click the pencil icon next to its name in the settings panel, for example to Get user. A clear name makes the step easier to find later.

4. Use the HTTP output in the next step ​

  1. Below the HTTP step, click Add Step. Open Built-in, choose Formatter, then Text To Upper Case.

  2. In Input Text, enter a reference to the user's name:

    $.<HTTP step ID>.output.body.name

    Replace <HTTP step ID> with the HTTP step's ID. To copy it, open the HTTP step and click the ID shown under its name.

The HTTP step puts the parsed response in body, so body.name is the user's name. When the flow runs, AI Studio replaces the reference with that value. For other ways to insert references, such as typing $ and picking from the list, see Using data from earlier steps.

5. Run and check the result ​

  1. Click Run. Each step shows its progress on the canvas, and a message tells you when the flow has completed.
  2. Open Run history to see the run in Recent Runs. Expand a step to see its Input and Output.

The Formatter step's output should be:

json
{
  "output_text": "LEANNE GRAHAM"
}

If a step failed, its output shows the error. Fix the setting and click Run again. Runs started with Run also appear in Executions, marked as test runs.

6. Publish ​

Click Publish. Publishing saves this version of the flow and turns the flow on, so its triggers start runs automatically. Edits you make afterwards stay in a draft until you publish again. See Versions and publishing.

A Manual trigger never starts a run on its own. To run this flow without clicking Run, add a trigger such as a webhook or a schedule, then publish again.

Next steps ​