# Adding comments

The **Add Comment** action makes it possible to add comments to an email. **Split regexp** can be used keep only the first part of the email body before a pattern that is specified in the regexp.

<figure><img src="https://880912854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mf8H-oTE_fhOrUtfYrN-2724419853%2Fuploads%2FXmcMvMXwbEI80GHxgvXX%2F2024-12-02_15h16_04.png?alt=media&#x26;token=5a8818a4-7e03-4f53-81af-70b28fa16974" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
**Note**: Multiple regular expressions can be defined (each on a new line) and they must begin and end with a / sign, like: /Re:/
{% endhint %}

{% hint style="warning" %}
**Important**: During processing, before splitting the mail body by a regexp, the whole body is converted to Jira wiki format. The regexp is applied on the converted value after this process.
{% endhint %}

For more details, see [Using split regexp](https://docs.meta-inf.hu/email-this-issue/adding-editing-a-mail-handler/email-this-issue-for-jira-cloud-mail-handler-actions/using-split-regexp).

**Visibility** allows you to restrict the comment added by the mail handler. The values are grouped into the following groups:

* Service Management: allows for making the comment private
* Project Roles: allows you to restrict comment visibility on Project Roles
* Groups allows you to restrict comment visibility on Groups

If you don't want to put any restriction on the comment, just set it to **All Users**.

The **Add comment** action has the same **Attachment handling** strategies as the creating an issue action has. See [Creating an issue](https://docs.meta-inf.hu/email-this-issue/adding-editing-a-mail-handler/email-this-issue-for-jira-cloud-mail-handler-actions/creating-an-issue).

By switching the toggle under **Attach the original email as .eml file**, incoming emails that reach this step in the mail handler will automatically be attached to the issue as an eml file. This step is always done in the name of the Default Reporter, so please make sure they have the correct permissions to do so.

{% hint style="info" %}
**Note**: Comments now can be added to sub-tasks in Service Management projects. The visibility of the comments can be internal, but attachments cannot be internal.
{% endhint %}


---

# 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.meta-inf.hu/email-this-issue/adding-editing-a-mail-handler/email-this-issue-for-jira-cloud-mail-handler-actions/adding-comments.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.
