Creating and running workflows
The workflows feature is currently in private preview. To request access, contact Tonic.ai.
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.
In your workspace settings, configure the secrets to use for the connections.
Configuring the domains that a workflow can connect to
For information on how to configure allowed domains, go to Managing allowed domains for an account.
Configuring the secrets to use for the connections
To enable workflows to connect to the configured domains, you must also configure the secrets to use to authenticate to the domain.
While you configure the domains for the account, you configure the secrets for the workspace. If workflows connect to the same domain from multiple workspaces, then you must configure the secrets in each workspace.
You configure the secrets in the Secrets section of the workspace settings page.

Adding a secret
To add a secret:
Click Add Secret.

In the Name field, provide the name of the secret. The name can only contain letters, numbers, and underscores. After you save the secret, you cannot change the name.
In the Secret field, provide the text of the secret.
Under Allowed Domains, provide the list of domains to use the secret to connect to. Place each domain on a separate line. The domains must be configured and verified in the account settings.
Click Save.
Editing a secret
After you add a secret, you can change the secret and the domains that it can be used for.
You cannot change the secret name.
To edit a secret:
In the Secrets list, click the Edit option for the secret.
On the details panel, you can:
Change the text of the secret.
Change the domains. The domains must be configured and verified in the account settings.
Click Save.
Removing a secret
To remove a secret, in the Secrets list, click the Delete option for the secret.
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?