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

# Classify Text

> Assign text to one or more categories with OpenAI.

**Classify Text** maps a string to categories you define. It returns both the
selected category name and a boolean output for every configured category, so
downstream branches do not need to compare strings.

## Inputs

| Input                         | Type           | Required | Description                                                         |
| ----------------------------- | -------------- | -------- | ------------------------------------------------------------------- |
| **Third-party account**       | OpenAI account | Yes      | The API key used for classification.                                |
| **Model**                     | OpenAI model   | Yes      | Defaults to GPT-5 Mini.                                             |
| **Text**                      | String         | Yes      | The content to classify.                                            |
| **Include 'Other' Category**  | Boolean        | No       | Adds `other` for text that matches none of the supplied categories. |
| **Allow Multiple Categories** | Boolean        | No       | Lets more than one category be selected.                            |
| **Categories**                | List           | Yes      | At least two key/description entries in the current implementation. |

Each category contains:

* **Key** — The exact string returned by the model.
* **Description** — Optional guidance that distinguishes this category.

<Warning>
  Category keys must be unique. Use short, stable keys such as `billing` or
  `security`; put nuance in the description.
</Warning>

## Outputs

<Tabs>
  <Tab title="Single category">
    **Selected Category** contains one category key. Each configured category
    also creates an **Is "key"** boolean output.
  </Tab>

  <Tab title="Multiple categories">
    **Selected Categories** contains a list of keys. Every **Is "key"** output
    indicates whether that category was selected.
  </Tab>
</Tabs>

When **Include 'Other' Category** is on, **Is Other** is also available.

## Example: route inbound email

| Key       | Description                                    |
| --------- | ---------------------------------------------- |
| `billing` | Invoices, charges, refunds, or payment methods |
| `bug`     | Something is broken or behaves unexpectedly    |
| `sales`   | Pricing, evaluation, or purchase questions     |

Enable **Other** so unrelated messages have a safe route. Leave multiple
categories off when every email must have one owning queue.
