> 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.

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%2F52PwqXO6woAIbp5BRew2%2FProject_WorkflowsList.png?alt=media&amp;token=0d88d529-cdfd-450d-92f5-6d7c909a5c4b" 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
