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

# Categorize text

> Classify text into categories you define using AI.

Classify text into predefined categories using AI. Use this to route support tickets, tag content by topic, or sort any text into groups you define.

**1. Add the action**

In the Workflow builder, click **+** between blocks and select **Categorize Text** from the action library.

![Action library with Categorize Text highlighted](https://mintcdn.com/cassidy/Z6P2Z1FAlUR83Sw5/images/reference/categorize-text-img-0.png?fit=max\&auto=format\&n=Z6P2Z1FAlUR83Sw5\&q=85\&s=b6aab4279e3f3e43a9e1de294c0b9b48)

![Categorize Text action added to the Workflow](https://mintcdn.com/cassidy/Z6P2Z1FAlUR83Sw5/images/reference/categorize-text-img-1.png?fit=max\&auto=format\&n=Z6P2Z1FAlUR83Sw5\&q=85\&s=753308d63346a7f5d4092a16718aafff)

**2. Provide the text to categorize**

In the **Text to Categorize** field, enter or reference the content to classify. Use **#** to [reference variables](https://docs.cassidyai.com/guides/prompt-engineering.md#workflow-prompts) from previous steps or the trigger.

![Text to Categorize field with variable reference](https://mintcdn.com/cassidy/Z6P2Z1FAlUR83Sw5/images/reference/categorize-text-img-3.png?fit=max\&auto=format\&n=Z6P2Z1FAlUR83Sw5\&q=85\&s=7f93d95c0de8679dc5c8b724148c5df4)

**3. Define your categories**

Under the **Categories** section, add a **Key** and **Value** pair for each category. The **Key** is a unique identifier for the category, and the **Value** provides instructions that tell the AI when to assign that category.

![Categories section showing Key and Value pairs](https://mintcdn.com/cassidy/Z6P2Z1FAlUR83Sw5/images/reference/categorize-text-img-4.png?fit=max\&auto=format\&n=Z6P2Z1FAlUR83Sw5\&q=85\&s=d717daa5730359546620f55d66b085cc)

> [!TIP]
>
> Combine Categorize Text with [Paths](https://docs.cassidyai.com/reference/actions/paths.md) to route your Workflow differently based on the assigned category.

## Related

* [Paths](https://docs.cassidyai.com/reference/actions/paths.md)
* [Only Continue If](https://docs.cassidyai.com/reference/actions/only-continue-if.md)
* [Analyze Sentiment](https://docs.cassidyai.com/reference/actions/analyze-sentiment.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.