AI Generate

The Artificial Intelligence Generate block is designed to generate structured test data from a prompt. Use it to create values such as names, emails, addresses, and other automation-friendly data, and return them in the fields you define in the block.

This block helps you quickly generate consistent, structured values for use in your flows, useful for testing and validating how systems behave with varied but controlled input data.

Note: AI accuracy is not guaranteed, as it relies on probabilities and the daily performance of OpenAI's technology. While we strive to provide the best experience, occasional inaccuracies or errors may occur due to the inherent limitations of the technology itself. For more details, please refer to OpenAI's documentation.

Fully expanded, the AI Generate block shows the following properties:

image-20260207-123218.png

Note:

  • The screenshot on this page uses the Elegance Design, introduced in 2025.3. If you are using an earlier version, your layout may look different.

  • To use this block, cloud blocks must be activated for your tenant in the add-ons section of Customer Portal. Make sure this is enabled before adding the block to your flows.

Quick-start

  1. Drag AI Generate onto the canvas.

  2. Enter a prompt in Input to specify what kind of data should be generated.

  3. Use Add field to generate to create a field for each parameter you want to generate. Each field must correspond to an item you request in the input.

  4. Connect the green input and output connectors.

  5. Run the flow when it’s ready.

Building block parameters

Parameters
  • Block header: The green input connector in the header triggers the block to start executing. The title of the block (“AI Generate”) can be changed by double-clicking on it and typing in a new title.

  • Input: Field used to specify the data and attributes required for dataset generation (e.g., names, emails, addresses).

  • Fields: Use Add field to generate to define one or more fields containing dynamic content. Each field must match an item you request in the input. (Note: fields cannot include special characters).

  • Default timeout: If enabled, the block will use the flow’s global timeout setting.

  • Timeout (sec): Define a specific timeout in seconds for the block execution (default: 30 seconds).

  • Failed: Output connector that triggers if dataset generation fails.

Resources

Topic

Description

Flows FAQ

Common questions about creating, running, and managing flows in Leapwork.

Flows Troubleshooting

Guidelines and solutions for identifying and fixing issues that occur when building or running flows in Leapwork.

Customer Portal Add-ons

Customer portal section to activate your cloud blocks.

Guidelines for using AI blocks

Common guidelines for prompting, generating, validating, extracting, and transforming AI-driven test data in Leapwork’s AI Blocks.