# Adding custom macro to email templates

To add custom macro to an email template, do the following:

1\. Go to **Email Templates** under **OUTGOING EMAILS**.

2\. Click the three dots next to the name of the template you want to edit, and choose the **Edit HTML** option.

3\. In the **HTML Body Template** editor under the **Edit Template** panel, you can insert your velocity code at the top of the HTML code between `<!--` and `-->`, then save it.

![](https://4173056255-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FY44m7ZY1jU4Arh2tzwNn%2Fuploads%2F0vbOKqyKqC7UCPbbATz1%2Fimage.png?alt=media\&token=1e7b0147-1455-48da-ad71-5a2cb1028fc1)

{% hint style="success" %}
**Result**: If the velocity code is correct, you can use the macro in your email template.
{% endhint %}

<br>

<br>

<br>
