ai flow builder.md

AI Flow builder

AI Flow builder helps you design automation flows faster using natural language prompts and guided suggestions.

Instead of starting from an empty canvas, you describe what you want to automate. AI Flow builder proposes a draft flow that you can review, adjust, and run like any other Leapwork flow.

Use AI Flow builder when you want to:

Before you start

To use AI Flow builder, you need:

If your organization restricts AI usage, check with your administrator before using AI Flow builder in production projects.

Open AI Flow builder

You can start AI Flow builder from Leapwork Flow:

  1. Open Leapwork Flow.
  2. Go to the Design area.
  3. Select a Project where you want to create or update flows.
  4. Do one of the following:
    • To create a new flow with AI:
      • Select New flow with AI (or AI Flow builder) from the toolbar or context menu.
    • To improve an existing flow:
      • Open the flow.
      • Select AI Flow builder from the toolbar or flow menu.

AI Flow builder opens with a prompt panel and a preview of the proposed flow.

Create a new flow from a prompt

When you create a new flow with AI, you describe the scenario in your own words. AI Flow builder converts this description into a draft flow.

  1. In the AI Flow builder panel, enter a description of your scenario. For example:
    • "Log in to Salesforce, create a new account, and verify the account appears in the account list."
    • "Open our D365 F&O environment and validate that today's orders have a status of Confirmed."
  2. (Optional) Add more context:
    • The application you use (web, desktop, Salesforce, D365, SAP, etc.).
    • Any data you want to reuse (test data, credentials, variables).
    • Preconditions (for example, "user is already created").
  3. Select Generate flow.

AI Flow builder analyzes your prompt and proposes a draft flow:

Review and refine the draft flow

The draft produced by AI Flow builder is a starting point. You remain in control of the final design.

Inspect the generated flow

  1. Review the structure:
    • Start block.
    • Main steps that match your description.
    • Any loops, conditions, or sub-flows suggested by AI.
  2. Check key actions:
    • Log in steps.
    • Navigation blocks.
    • Validation or "Get and Validate" actions.
  3. Confirm that the flow follows your intended business logic.

If the structure looks correct, continue with configuration. If not, adjust the prompt and regenerate (see below).

Configure details

AI Flow builder can propose a structure, but you still need to connect the flow to your environment and data.

Update the generated blocks to:

Run the flow against a test environment and refine as needed.

Regenerate or extend the flow

If the generated flow does not match your needs, you can:

AI Flow builder is iterative. Use it to explore options, then settle on the design that best fits your use case.

Use AI Flow builder with existing flows

You can also use AI Flow builder to analyze and improve an existing flow.

  1. Open the flow in Leapwork Flow.
  2. Start AI Flow builder from the toolbar or menu.
  3. Describe what you want to improve. Examples:
    • "Simplify login logic and remove duplicate steps."
    • "Refactor this flow into a main flow plus two sub-flows."
    • "Add validation for the order total before submitting."
  4. Select Analyze flow (or equivalent action).

AI Flow builder reviews the current flow and proposes changes:

You decide which changes to accept. All updates are made through the regular flow editor so the logic remains transparent.

Best practices

When working with AI Flow builder:

Limitations

AI Flow builder does not:

If you work in a regulated environment, ensure that your review and approval process covers flows generated or modified with AI Flow builder.