> For the complete documentation index, see [llms.txt](https://docs.fabricplan.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fabricplan.com/powertable-sheets/how-tos/automation/configure-automation-workflows.md).

# Configure automation workflows

This article explains how to create an automation workflow. You learn how to configure workflow triggers and actions to automate tasks such as creating records and cascading updates across related tables.

{% hint style="info" %}

### Note

To learn about the concept of automation, see [Automation](/powertable-sheets/concepts/automation.md).
{% endhint %}

### Create an automation flow

1. To create an automation for a table, go to **Setup** > **Automations**.

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2FHAhc5xSCDXigcy273mTm%2Fimage.png?alt=media&amp;token=eb26026b-9319-46fb-8db7-a9ebb7a854f9" alt=""><figcaption></figcaption></figure>

2. In the new window, select **Create Automation** to create a new automation flow.

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2FOhMqIb8EJkk13IxcY7V5%2Fimage.png?alt=media&amp;token=ff9fa00b-0074-4a99-b732-a799d4079027" alt=""><figcaption></figcaption></figure>

3. A new automation workflow is created for you to configure the trigger and actions. Name your automation flow by selecting the pencil icon.

### Add trigger

1. Select **Add Trigger** and choose a trigger. Alternatively, select one of the suggested triggers directly.

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2FiVaE01v80GkaIPh5Prov%2Fimage.png?alt=media&amp;token=722650fc-44a9-4fe0-9912-0b5e2c6eea30" alt=""><figcaption></figcaption></figure>

* **When a record is created:** Triggers the workflow when a user creates a record.
* **When a record is updated:** Triggers the workflow when a user updates a record.
* **When a record is deleted:** Triggers the workflow when a user deletes a record.
* **When a form is submitted:** Triggers the workflow when a user submits a form that creates a record.
* **When a button is clicked:** Triggers the workflow when a user selects a button in a button column.

{% hint style="info" %}

### Note

All triggers monitor events in the current table where you configure the automation.
{% endhint %}

2. After you select a trigger, the **Properties** pane opens.

* Enter a description.
* Select **+ Add** to add one or more rules that determine when the trigger starts.
* Use **AND** or **OR** to combine multiple rules. The trigger runs only when the specified record or the data changes meet the configured conditions.
* For **Update Record** trigger, you can specify which fields to monitor for data changes. If you specify all fields, the workflow includes any new fields that you add in the future.
* The available operators depend on the selected field's data type. You can use operators such as **Equals**, **Less than**, **Greater than**, **Is**, **Is empty**, and **Contains**, and more.
* The rules support using predefined built-in functions such as **Current date**, **Current user email**, and any field references that are available through forms or **Find Record(s)**.

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2FPKjH9eBwtTNuH41jVbQW%2Fimage.png?alt=media&amp;token=41f93f06-106f-4c14-abb6-8f2a769f2e6f" alt=""><figcaption></figcaption></figure>

### Add actions

Select **Add Action** to add one or more actions. Each action type is explained in the following sections.

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2F3cjLdS8ru55sxEm7S2FR%2Fimage.png?alt=media&amp;token=c3338f2c-7083-4aea-a47f-f1349ddd8ef6" alt="" width="375"><figcaption></figcaption></figure>

#### Create Record

This action creates a new record in the specified table.

1. Enter the schema and table name.
2. Select **Add Fields** to specify the fields for the new record.
3. Use the current table's field values or pre-defined functions to fill in their corresponding values.

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2FdPxkC5Y4nNEKNUOiYZD3%2Fimage.png?alt=media&amp;token=44aa1821-ca85-47d1-b003-f0cb69508f11" alt=""><figcaption></figcaption></figure>

#### Update Record

This action updates one or more records that meet the specified conditions.

1. Enter the schema and table name to update.
2. Select **Update type**.
   * **Single Update**: Updates only the first record that matches the specified condition.
   * **Multiple Updates**: Updates all records that match the condition.
3. Configure the conditions for update.
4. Select **Add Fields** to add the fields that you want to update.

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2FRwwQDdFrZC9Vtgm01QuX%2Fimage.png?alt=media&amp;token=077892fe-13f4-4ec9-8c6c-48361c96188c" alt=""><figcaption></figcaption></figure>

5. Replace the existing values with static values or dynamically calculated values by using formulas, or clear the existing values.

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2F1fIGBejRwDKzN2d6xZbD%2Fimage.png?alt=media&amp;token=aff930d4-3476-445d-9069-023fc3e84a7f" alt=""><figcaption></figcaption></figure>

#### Delete Record

This action deletes one or more records from the specified table that meet the configured conditions.

#### Find Record(s)

Use **Find Record(s)** to retrieve one or more records from the specified table that meet the configured conditions.

1. After entering the schema and table name, select the **Fetch type**.
   * Select **Single Record** to retrieve a single record.
   * Select **Multiple Records** to retrieve multiple records in a single action. You can retrieve up to 1,000 records. Configure the **Retrieve Limit** to specify the maximum number of records to return.
2. Select the field values to retrieve.
3. Optionally sort the retrieved records in ascending or descending order. The action returns the records in the specified order.
4. Configure the conditions used to find the records.

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2FbqAvqVdVNtwUIf1ixU68%2Fimage.png?alt=media&amp;token=1dceca6e-b312-406d-8bb2-11fe5ac66949" alt=""><figcaption></figcaption></figure>

#### Bulk Create Records

This creates multiple records in the specified table by using the records returned by the **Find Record(s)** action.

1. Include a [**Find Record(s)**](#find-record-s) action in your flow before adding records in bulk.
2. Select **Add Action** and select **Bulk Create Record**.
3. Specify the schema and table Name where you want to create the records.
4. For **Input List**, select the records returned by the **Find Record(s)** action.
5. Select **Add Fields** to map the destination table fields.
6. Map each destination field to a value from the current table or from the records returned by the **Find Record(s)** action.

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2F1US5pSQyyqxeSZLwK14Q%2Fimage.png?alt=media&amp;token=0398ce07-65dc-4709-b7ef-6a2c9f49d1bd" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}

### Note

An automation flow can include multiple **Find Record(s)** actions. If so, select the action that returns the records you want to use as the input list.
{% endhint %}

#### Execute Stored Procedure

Use this action to run a stored procedure that you created in the database.

#### Conditional Group

**Conditional Group** defines **If/Otherwise** branching logic. It evaluates one or more conditions and runs the corresponding actions based on the conditions that are met.

1. Select **Add Action**, and then select **Conditional Group**.
2. In the **Properties** pane, add one or more conditions for the **If** branch.

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2F2hiodBV897G9qHq1PYiW%2Fimage.png?alt=media&amp;token=ff6c7ace-aec4-4658-9cb1-fc3903ed7940" alt=""><figcaption></figcaption></figure>

3. Select **Add Action** within the **If** branch to add an action to run when the conditions are met. Hover over to select **+** and add more actions if necessary.

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2FutFiTaDf5L69BwzJMqJO%2Fimage.png?alt=media&amp;token=bbdbd82e-d836-4264-a25f-da0105eac14f" alt=""><figcaption></figcaption></figure>

4. Select **Add Condition** to add an **Otherwise If** branch, and then configure its conditions.

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2FDnybhELBn5qjdF2VpMU6%2Fimage.png?alt=media&amp;token=52f7b56f-d20c-4582-a8bf-75b15f630c08" alt=""><figcaption></figcaption></figure>

5. Select **Add Action** within the **Otherwise** **If** branch to add one or more actions when the conditions are met.
6. Repeat these steps to add additional **Otherwise If** branches and their corresponding actions.
7. To add a final **Otherwise** branch, select **If no other conditions are met** in the **Properties** pane. The actions in this branch run only when none of the preceding conditions are met.

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2FSGbUzzdigBE5O1hJZBTs%2Fimage.png?alt=media&amp;token=8ba2d093-d819-4c31-80c7-34c47ac41591" alt=""><figcaption></figcaption></figure>

#### Repeating Group

**Repeating Group** repeats the same set of actions for each record returned by a **Find Record(s)** action.

1. Include a [**Find Record(s)**](#find-record-s) action in your flow before adding a repeating group.
2. Select **Add Action** and then select **Repeating Group**.
3. Enter a description optionally.
4. For **Input List**, select the records returned by the **Find Record(s)** action.

{% hint style="info" %}

### Note

An automation flow can include multiple **Find Record(s)** actions. If so, select the action that returns the records you want to use as the input list.
{% endhint %}

5. If an iteration fails, choose whether to continue processing the remaining records or stop the workflow.

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2FqtYfJv0SrhcJ6e8jCOvz%2Fimage.png?alt=media&amp;token=545671b1-274f-4433-bb4b-c23556119dea" alt=""><figcaption></figcaption></figure>

6. Within the **Repeat for each** block, select **Add Action**, and then select an action that runs for each record in the input list. Use **+** to include more actions.

### Duplicate, delete, or rearrange actions

* Use the **More options** (**...**) menu on an action to duplicate or delete it.
* Use the **drag handle** (six-dot icon) to drag and drop the action and reorder the workflow.
* To insert an action between existing actions, select the **+** icon at the required location in the workflow.

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2FljH0gcAX7kj8Vi5HsxSy%2Fimage.png?alt=media&amp;token=1c2b64d9-dd1c-4b5d-bccb-98160ccf22e7" alt=""><figcaption></figcaption></figure>

### Save the workflow

After all configurations are complete, the **Save** option gets enabled. Select **Save** to save the workflow. You can go back to the previous page by selecting **Back to Setup**.

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2F8QoXYU6CcnujOGhBKhnR%2Fimage.png?alt=media&amp;token=8a104ba9-c477-4caf-a8cf-35c523f42902" alt=""><figcaption></figcaption></figure>

### Manage automations

You can create multiple automation workflows for a table. To view the workflows that you created, select **Setup** > **Automations**.

* **Enable or disable a workflow:** Use the toggle to enable or disable a workflow.
* **Duplicate a workflow:** Select **More options** (**...**), and then select **Duplicate** to create a copy of a workflow. Modify the copied workflow as needed instead of creating one from scratch.
* **Delete a workflow:** Select **More options** (**...**), and then select **Delete** to permanently remove a workflow. Note that, before you can delete a workflow, you must disable it.
* **Search**: Use the search box to find a specific automation flow using its name.

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2FOaPavF5R15YeuwnUwfg9%2Fimage.png?alt=media&amp;token=b81557db-bbf9-49d5-9b39-3febc34fdd60" alt=""><figcaption></figcaption></figure>

### View run history

Use the **Run History** pane to monitor workflow executions and review the status of each run.

Open the required automation workflow and select **Run History**.

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2FEF9yejmxX5wHYBqMWsQx%2Fimage.png?alt=media&amp;token=b91fdc67-6402-420a-8ad1-bae12329adf9" alt=""><figcaption></figcaption></figure>

The pane lists all workflow runs along with details such as:

<table><thead><tr><th width="141.27276611328125">Column</th><th>Description</th></tr></thead><tbody><tr><td><strong>Job ID</strong></td><td>Unique identifier for the workflow run.</td></tr><tr><td><strong>Started At</strong></td><td>Date and time when the workflow started.</td></tr><tr><td><strong>Status</strong></td><td>Current execution status, such as <strong>Success</strong> or <strong>Failed</strong>.</td></tr><tr><td><strong>Duration</strong></td><td>Total time taken to complete the workflow run.</td></tr><tr><td><strong>Started By</strong></td><td>User who triggered the workflow.</td></tr><tr><td><strong>Details</strong></td><td>Select <strong>View Details</strong> to view the full execution details for the workflow run.</td></tr></tbody></table>

You can also use the following options:

* **Retry**: Failed runs display a **Retry** option. Select it to rerun the workflow after resolving the issue.
* **Refresh**: Use **Refresh** to refresh the run history and display the latest workflow runs.

### Related content

[Create a sample automation](/powertable-sheets/how-tos/automation/create-a-sample-automation.md).


---

# 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.fabricplan.com/powertable-sheets/how-tos/automation/configure-automation-workflows.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.
