> For the complete documentation index, see [llms.txt](https://helpcenter.channable.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://helpcenter.channable.com/manage-improve-product-data/rules-bulk-edit-and-enrich/how-to-use-actions-then-in-rules/rule-action-maximum-length.md).

# Rule action: Maximum length

### Use cases

{% hint style="info" %}
Shorten product titles

Use the **maximum length** action to shorten/trim the length of values in your product data. Some channels, like Google Ads and Marktplaats, require fields such as "title" to have a character limit.
{% endhint %}

### Shorten product titles (to 30 characters)

Using **maximum length**, you can cut off the title at 30 characters so every title fits the export channel's maximum length.

{% stepper %}
{% step %}

### Add a rule with the Maximum length action

* Create or edit a rule where you want to shorten the product title.
* Add a THEN action and choose the **Maximum length** action.
  {% endstep %}

{% step %}

### Configure the maximum length

* Set the maximum length to 30 characters (or the limit required by your channel).
* Choose how the text should be trimmed:
  * Trim directly: cut the title directly after 30 characters.
  * Trim on words: trim the title after the last complete word that fits within the 30 character limit.
    {% endstep %}

{% step %}

### Result

The THEN (and AND) statements will produce the trimmed titles according to your configuration.
{% endstep %}
{% endstepper %}

Images showing the configuration and resulting trimmed titles:

<figure><img src="https://content.gitbook.com/content/u8whzIfip72Kvn3M1bsc/blobs/ZJgqLfXytD8JPlqSw4p8/360007538399" alt=""><figcaption></figcaption></figure>

<figure><img src="https://content.gitbook.com/content/u8whzIfip72Kvn3M1bsc/blobs/pFh1lPPOp9nHvmhCok4g/360007523800" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://helpcenter.channable.com/manage-improve-product-data/rules-bulk-edit-and-enrich/how-to-use-actions-then-in-rules/rule-action-maximum-length.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
