> ## 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.

<Steps>
  <Step title="Add the action">
    In the Workflow builder, click **+** between blocks and select **Categorize Text** from the action library.

    <Frame>
      <img src="https://mintcdn.com/cassidy/Z6P2Z1FAlUR83Sw5/images/reference/categorize-text-img-0.png?fit=max&auto=format&n=Z6P2Z1FAlUR83Sw5&q=85&s=b6aab4279e3f3e43a9e1de294c0b9b48" alt="Action library with Categorize Text highlighted" width="948" height="308" data-path="images/reference/categorize-text-img-0.png" />
    </Frame>

    <Frame>
      <img src="https://mintcdn.com/cassidy/Z6P2Z1FAlUR83Sw5/images/reference/categorize-text-img-1.png?fit=max&auto=format&n=Z6P2Z1FAlUR83Sw5&q=85&s=753308d63346a7f5d4092a16718aafff" alt="Categorize Text action added to the Workflow" width="998" height="1284" data-path="images/reference/categorize-text-img-1.png" />
    </Frame>
  </Step>

  <Step title="Provide the text to categorize">
    In the **Text to Categorize** field, enter or reference the content to classify. Use **#** to [reference variables](/guides/prompt-engineering#workflow-prompts) from previous steps or the trigger.

    <Frame>
      <img src="https://mintcdn.com/cassidy/Z6P2Z1FAlUR83Sw5/images/reference/categorize-text-img-3.png?fit=max&auto=format&n=Z6P2Z1FAlUR83Sw5&q=85&s=7f93d95c0de8679dc5c8b724148c5df4" alt="Text to Categorize field with variable reference" width="1000" height="740" data-path="images/reference/categorize-text-img-3.png" />
    </Frame>
  </Step>

  <Step title="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.

    <Frame>
      <img src="https://mintcdn.com/cassidy/Z6P2Z1FAlUR83Sw5/images/reference/categorize-text-img-4.png?fit=max&auto=format&n=Z6P2Z1FAlUR83Sw5&q=85&s=d717daa5730359546620f55d66b085cc" alt="Categories section showing Key and Value pairs" width="998" height="1176" data-path="images/reference/categorize-text-img-4.png" />
    </Frame>
  </Step>
</Steps>

<Tip>Combine Categorize Text with [Paths](/reference/actions/paths) to route your Workflow differently based on the assigned category.</Tip>

## Related

* [Paths](/reference/actions/paths)
* [Only Continue If](/reference/actions/only-continue-if)
* [Analyze Sentiment](/reference/actions/analyze-sentiment)
