> For the complete documentation index, see [llms.txt](https://help.zaapi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.zaapi.com/automations/basic-automations/assign-labels-to-chats.md).

# Assign labels to chats

### Overview

The **Assign Labels to Chats** automation allows you to automatically tag customer conversations based on specific keywords. This helps categorize chats for better organization and enables you to track trends in the **Analytics Dashboard**.

For example, you can automatically assign a **"Refund"** label when a customer mentions *"Refund"*, *"Money back"*, or similar phrases. This makes it easier to monitor and analyze refund-related inquiries over time.

***

### How to set up label automation

1. **Go to Basic Automations** – Navigate to the **Basic Automations** tab in the side navigation.
2. **Click "Create New Automation"** – This will open the automation setup.
3. **Select "Assign Labels to Chats"** – This option enables automatic labeling based on keywords.
4. **Choose Messaging Channels** – Select the channels where this automation should apply.
5. **Enter Trigger Keywords** – Add words or phrases that will trigger the label assignment.
   * You can also use **AI variables** such as `"Address"` or `"Mobile Number"`, ensuring the label is applied when relevant information is detected.
6. **Assign a Label** – Choose which label should be applied when a keyword is detected.
7. **Name Your Automation** – Give it a recognizable name for easy reference.
8. **Click "Create Automation"** – The system will now automatically assign labels when a customer’s message contains a specified keyword.
