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

# Triggers & Actions: Event-Based Automation Rules in ChatbotX

> Build event-driven automation rules in ChatbotX that fire when tags change, sequences update, or new contacts arrive — without any manual monitoring.

**Triggers & Actions** lets you build automation rules that follow the logic: *"When X happens → the system automatically does Y"* — without anyone needing to monitor or handle the task manually. You define a condition (the trigger) and one or more actions that fire instantly when that condition is met. For example:

* When a customer receives the Tag `VIP` → automatically transfer the chat to a human agent
* When a customer subscribes to a Sequence → automatically add the Tag `Being nurtured`
* When a new contact arrives through an Entry Point Link → automatically start a welcome Flow

Open **Triggers** from the left navigation menu to get started.

## How to Create a Rule

<Steps>
  <Step title="Open Triggers">
    In the left navigation menu, open **Triggers**.
  </Step>

  <Step title="Create a new rule">
    Click **+ Create Rule**. A new rule editor opens, split into two columns: **When this happens** on the left and **Actions** on the right.
  </Step>

  <Step title="Add your conditions">
    In the left column, click **+ Add Condition** and choose the event you want to monitor from the grouped list below.
  </Step>

  <Step title="Add your actions">
    In the right column, click **+ Add Action** and choose what the system should do automatically when the condition is met.
  </Step>

  <Step title="Save the rule">
    Name your rule, then save it. The rule becomes active immediately.
  </Step>
</Steps>

## When This Happens — Conditions

Click **+ Add Condition** and select from the following grouped events:

### Tags

| Condition       | When it fires                        |
| --------------- | ------------------------------------ |
| **Tag Applied** | When a Tag is applied to a contact   |
| **Tag Removed** | When a Tag is removed from a contact |

### Custom Fields & Conversation Events

| Condition                               | When it fires                                                                      |
| --------------------------------------- | ---------------------------------------------------------------------------------- |
| **Custom Field Changed**                | When the value of a Custom Field changes                                           |
| **DateTime Based Trigger**              | At a specific date or time — for example, sending a reminder before an appointment |
| **Conversation transferred to human**   | When a chat is transferred to a team member                                        |
| **Conversation transferred to bot**     | When a chat is handed back to the bot                                              |
| **New Contact**                         | When a new contact is created in ChatbotX                                          |
| **Contact Unsubscribed From Broadcast** | When a customer unsubscribes from Broadcasts                                       |
| **Archived**                            | When a conversation is archived                                                    |
| **Follow Up**                           | When a conversation is marked for follow-up                                        |
| **Conversation Assigned**               | When a conversation is assigned to a person or team                                |
| **Conversation Unassigned**             | When a conversation is unassigned                                                  |

### Sequences

| Condition                      | When it fires                                |
| ------------------------------ | -------------------------------------------- |
| **Subscribed To Sequence**     | When a customer subscribes to a Sequence     |
| **Unsubscribed From Sequence** | When a customer unsubscribes from a Sequence |

### Entry Point Links

| Condition                             | When it fires                                                              |
| ------------------------------------- | -------------------------------------------------------------------------- |
| **Contact Referred A New Contact**    | When a contact refers a completely new contact through an Entry Point Link |
| **Contact Referred Existing Contact** | When a contact refers someone who already exists in the system             |

## Actions — What the System Does

Click **+ Add Action** and choose from the following:

| Action                             | What the system does                               |
| ---------------------------------- | -------------------------------------------------- |
| **Add Tag**                        | Applies a Tag to the contact                       |
| **Remove Tag**                     | Removes a Tag from the contact                     |
| **Set Custom Field**               | Writes a value into a Custom Field                 |
| **Clear Custom Field**             | Clears the value from a Custom Field               |
| **Start Another Flow**             | Starts any Flow you choose                         |
| **Transfer Conversation to Human** | Transfers the chat to a team member                |
| **Google Sheets**                  | Writes contact data to a Google Sheets spreadsheet |

## Real-World Example

**Scenario:** You want to automatically save a new contact's name and details to Google Sheets whenever they arrive from an ad campaign.

| Step          | Configuration                                                 |
| ------------- | ------------------------------------------------------------- |
| **Condition** | New Contact                                                   |
| **Action**    | Google Sheets → select the sheet and map the matching columns |

**Result:** Every time a new customer messages you from an ad link, their name and other details are added to the sheet automatically — no manual copy and paste needed.

## Combining Multiple Conditions

A single rule can include multiple conditions and multiple actions simultaneously.

<Note>
  When you add multiple conditions to a rule, the system only fires the rule when **all** conditions are met at the same time. Design your rules with this "AND" logic in mind — if you need "OR" logic, create separate rules for each condition.
</Note>

<Tip>
  Use the **DateTime Based Trigger** condition to build time-sensitive automations — for instance, automatically sending a reminder message one day before a scheduled appointment by reading the appointment date from a Custom Field.
</Tip>
