> For the complete documentation index, see [llms.txt](https://docs.tonic.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tonic.ai/fabricate/data-agent-tools/workflows/creating-editing-and-deleting-a-workflow.md).

# Creating, editing, and deleting a workflow

## Creating a workflow <a href="#workflow-create" id="workflow-create"></a>

The Data Agent automatically creates a workflow when the [Reusable Generator approach](/fabricate/databases-and-data/reusable-generator-approach.md) is used and when you [create a simulation](/fabricate/databases-and-data/simulations/simulation-start.md).

To create a workflow manually, you issue a prompt that tells the Data Agent to create a workflow and explain what the workflow accomplishes. The workflow prompt can include parameters that you provide whenever you run the workflow.

For example:

`Create a workflow that adds records to the customers table and then adds an order for each of those new customers to the orders table. Prompt for the number of customers to add.`

If the workflow requires a connection to an external domain, then you can include the required credentials in the prompt. The [domain must be configured in your account](/fabricate/fabricate-accounts-and-users/account-domains.md), and the [secrets must be configured in your workspace](/fabricate/workspaces/workspace-secrets.md).

For example, you can provide the name of a configured secret to use.

`Create a workflow that pushes the data to the API. Use the secret my_secret_name.`

Or you can make the secret a parameter that you provide when you run the workflow.

`Create a workflow that pushes the data to the API. Prompt for the secret to use for the connection.`

The Data Agent adds the workflow to the project **Workflows** list.

<figure><img src="https://4109733485-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmoU4gTR9LxlzHeWmQCUZ%2Fuploads%2FxD6IzGeOXxGv3aZrIEn4%2FProject_WorkflowsList.png?alt=media&amp;token=dfb1e0fb-1fac-44e6-a192-a8a1bccd2b0c" alt=""><figcaption><p>Workflows list for a project</p></figcaption></figure>

## Updating a workflow <a href="#workflow-update" id="workflow-update"></a>

You can use the Data Agent to make corrections to the workflow.

For example, to update the workflow that adds customers so that it also return the number of customers that were added:

`Update the Add Customers and Orders workflow to also return the number of records that were added.`

## Deleting a workflow <a href="#workflow-delete" id="workflow-delete"></a>

To delete a workflow:

1. In the **Workflows** list, click the workflow name.
2. On the workflow details, click the delete icon.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.tonic.ai/fabricate/data-agent-tools/workflows/creating-editing-and-deleting-a-workflow.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
