# How does macros like {{application.name}}, {{url}} etc are made available to the email templates?

**URL:** <https://community.auth0.com/t/how-does-macros-like-application-name-url-etc-are-made-available-to-the-email-templates/7370>\
**Category:** Get Help\
**Tags:** email-template, macros\
**Created:** [July 3, 2017, 1:15pm UTC](https://community.auth0.com/t/how-does-macros-like-application-name-url-etc-are-made-available-to-the-email-templates/7370 "2017-07-03T13:15:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![prakharkumar79](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/prakharkumar79/32/7042_2.png) [@prakharkumar79](https://community.auth0.com/u/prakharkumar79)\
**Post date:** [July 3, 2017, 1:15pm UTC](https://community.auth0.com/t/how-does-macros-like-application-name-url-etc-are-made-available-to-the-email-templates/7370/1 "2017-07-03T13:15:37Z")

</div>

I’m trying to figure out how these macros are available in the email templates. Is there any way to create/customize one and use in the template?

---

<div class="post-metadata">

**Author:** ![prashantT](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/prashantt/32/6002_2.png) [@prashantT](https://community.auth0.com/u/prashantT)\
**Post date:** [July 4, 2017, 5:38am UTC](https://community.auth0.com/t/how-does-macros-like-application-name-url-etc-are-made-available-to-the-email-templates/7370/2 "2017-07-04T05:38:34Z")

</div>

The macros available in the email templates are a controlled set, and cannot be customized. Depending on your use case, you could use metadata attributes, e.g.

```
{{ user.user_metadata.foo }}

```

---

<div class="post-metadata">

**Author:** ![prakharkumar79](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/prakharkumar79/32/7042_2.png) [@prakharkumar79](https://community.auth0.com/u/prakharkumar79)\
**Post date:** [July 4, 2017, 12:24pm UTC](https://community.auth0.com/t/how-does-macros-like-application-name-url-etc-are-made-available-to-the-email-templates/7370/3 "2017-07-04T12:24:19Z")

</div>

Thanks, @prashant for guiding in the right direction. I’ve also figured out that application and client are synonyms of each other and we can make use of client\_metadata for application-level modifications in the email templates. E.g.

```
{{ client.client_metadata.foo }}

```

And this attribute ‘foo’ can be set in the client\_metadata using the advanced settings section of the client panel. Please refer to the screenshot below.

![alt text][1]

---

<div class="post-metadata">

**Author:** ![jagpreet.kaur40](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@jagpreet.kaur40](https://community.auth0.com/u/jagpreet.kaur40)\
**Post date:** [July 4, 2017, 1:46pm UTC](https://community.auth0.com/t/how-does-macros-like-application-name-url-etc-are-made-available-to-the-email-templates/7370/4 "2017-07-04T13:46:09Z")

</div>

The macros available application and clients can not be modified but we can add some attributes in client object as per @prakharkumar79 suggested. and that can be accessed in email template as

{{ client.client\_metadata.foo }}

This is the case can be used when we need to customize the URL in the email, rather than setting that field in {{user.user\_metadata.foo}} this can be set in client.

But I think if we will use URL from client object will that be expired after the given URL lifetime?  
@prashant your thoughts are valuable here.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [March 2, 2018, 5:55am UTC](https://community.auth0.com/t/how-does-macros-like-application-name-url-etc-are-made-available-to-the-email-templates/7370/5 "2018-03-02T05:55:08Z")

</div>


