# Table of contents generator

This add-on / plugin lets you insert an automatically generated table of contents in your emails based on their contents.

{% hint style="info" %}
Note that you may need to save the email first if you want to base the table of contents on dynamically inserted content (like articles, products, events, etc...)
{% endhint %}

## Example

Let's say you inserted the 3 latest articles of your website in an email, and the upcoming events:

![](/files/-MMGqUvV_pQAWeimDaGd)

The big titles are "\<h1>" tags, and the title of inserted content is always "\<h2>" tags, so by inserting a table of contents with the following options:

![](/files/-MMGoavlkCatXVlZp4fa)

We obtain something like this:

![](/files/-MMGrSFlrpKFgG7W1VW7)

Clicking on the links will scroll down to the corresponding article (in this example the articles descriptions aren't shown to make it easier to follow). This is especially useful when you insert articles that have long descriptions and when using [automatic campaigns](/main-pages/campaigns/automatic-campaigns.md).


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.acymailing.com/addons/all-cms-add-ons/table-of-contents-generator.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
