> ## Documentation Index
> Fetch the complete documentation index at: https://help.teable.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Run different actions based on record values

> Use conditional logic to branch your workflow and perform different actions depending on field values

<Tip>We recommend building automation examples directly in AI chat. Just describe the workflow you want, and AI will handle the full setup for you, including the trigger, actions, script, and configuration.</Tip>

## Build with AI

Open the AI Chat in your table's right sidebar and tell AI what you want. For example, you can say:

*"When a new ticket is created, check the priority field. If it's Urgent, email the on-call team. Otherwise, email the general support queue"*

AI will create the complete workflow automatically. You can review the generated script, test it with real data, and enable the workflow when ready.

## Manual setup

1. **Create a workflow** with trigger **When Record Created**.
2. Select your **Tickets** table.
3. Click **Test** to get a sample record.
4. **Add a Condition** node.
5. Set the rule: **Priority** `is` **Urgent**.
6. Click **Test**.
7. **On the true path** → add a **Send Email** action:
   * To: `oncall@yourcompany.com`
   * Subject: `Urgent ticket: ` + ticket title (via **+**)
   * Body: ticket description (via **+**)
8. **On the false path** → add a **Send Email** action:
   * To: `support@yourcompany.com`
   * Subject: `New ticket: ` + ticket title
   * Body: ticket description
9. Test both paths, then **enable**.

## Tips

* You can nest conditions: add another condition inside the false path to separate "High" from "Low" priority.
* Combine rules with AND/OR — e.g. `Priority is Urgent AND Assignee is empty`.
