Creating and running workflows
As you work with your database, you might want to run repeatable tasks such as:
Generating additional data
Posting data to another location
Generating unstructured files from the data
Starting tests
Validating data
Instead of issuing a separate prompt every time, you can have the agent create a repeatable workflow. The workflow runs the exact same way every time.
Configuring required connections for the workflow
A workflow might need to connect to external domains in order to complete its tasks.
To enable these connections:
In your account settings, you configure and then request or confirm access to the domains that workflows can connect to. For more information, go to Managing allowed domains for an account.
In your workspace settings, configure the secrets to use to connect to the domains. For more information, go to Configuring available secrets for a workspace.
Creating a workflow
To create a workflow, 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 and secret must already be configured in your account and workspace.
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 Workflows list in the left panel.

Running a workflow
To run a workflow, you can issue a prompt to run the workflow. For example:
Run the Add Customers with Orders workflow to add 10 more customers.
Alternatively:
In the Workflows list, click the workflow name. The workflow details display the required parameters for the workflow.

After you fill in the parameter fields, click Run Workflow.
Viewing the workflow script
To create the workflow, Fabricate generates a script.
To view the script:
In the Workflows list, click the workflow name.
On the workflow details, click the script view icon.

Updating a workflow
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 with Orders workflow to also return the number of records that were added.
Deleting a workflow
To delete a workflow:
In the Workflows list, click the workflow name.
On the workflow details, click the delete icon.
Last updated
Was this helpful?