> ## Documentation Index
> Fetch the complete documentation index at: https://docsv4.mile.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Build with AI

> Describe your work in your own words and get a ready-made flow.

**Build with AI** creates a flow from a short description of your work. It picks the pages and components for you, so you get a working starting point without adding every field by hand. You can change anything afterwards.

> [!NOTE]
>
> Required permission:
>
> * View flow
> * Create flow

The **Build with AI** button is next to **New** at the top right of **Workflow › Flow**. It only shows to users who can create flows.

## Generate a flow

1. Click **Build with AI**.
2. Fill in the dialog and click **Generate**.

![Build a flow with AI](https://mintcdn.com/mileappv4/-MCTwHCeWrNJwJq6/images/v4/workflow/flow-ai.png?fit=max\&auto=format\&n=-MCTwHCeWrNJwJq6\&q=85\&s=9e8745b16762a0a5e61023a567e31a2d)

1. **Flow name**: the name of the new flow. It cannot be empty, can only use letters, numbers and spaces, and must not already be used by another flow in your organization.
2. **What should this flow do?**: describe your process. The AI reads this to decide the pages and components. It needs at least 20 characters and takes up to 400; the counter on the right shows how many you have used.
3. **Generate**: start building. Close the dialog with **×** to cancel instead.

While it works, the dialog shows **Generating your flow. This takes a few moments.**

**Write a good description**

* Describe each step of the work, in order.
* Say what information needs to be captured at each step: addresses, photos, signatures, payments, times.

For example:

> We manage parcel deliveries between city branches. Each courier logs the customer address, confirms pickup and drop-off with GPS, captures proof photos at delivery, and tracks how long the delivery takes.

> [!WARNING]
>
> Avoid vague or meaningless sentences. If the AI cannot understand the description, it says **Your description is unclear or invalid** and asks you to add more detail and try again.

## After it is generated

* The message **Flow generated successfully!** appears and the dialog closes.
* The new flow opens in the [builder](https://docsv4.mile.app/pages/workflow/flow/builder.md).
* Check every page in the [mobile app preview](https://docsv4.mile.app/pages/workflow/flow/mobile-preview.md), change the components you need, set the [configuration](https://docsv4.mile.app/pages/workflow/flow/configuration.md) and click **Save**.

## Related

* [Templates](https://docsv4.mile.app/pages/workflow/flow/templates.md)
* [Managing Flows](https://docsv4.mile.app/pages/workflow/flow/managing-flows.md)
* [Components](https://docsv4.mile.app/pages/workflow/flow/components/introduction.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.