# User.given\_name is rendering in welcome email template's body as empty space

**URL:** <https://community.auth0.com/t/user-given-name-is-rendering-in-welcome-email-templates-body-as-empty-space/55068>\
**Category:** Get Help\
**Tags:** welcome-email, email, email-template\
**Created:** [December 18, 2020, 7:11am UTC](https://community.auth0.com/t/user-given-name-is-rendering-in-welcome-email-templates-body-as-empty-space/55068 "2020-12-18T07:11:12Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jennagoldman](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jennagoldman/32/12681_2.png) [@jennagoldman](https://community.auth0.com/u/jennagoldman)\
**Post date:** [December 18, 2020, 7:11am UTC](https://community.auth0.com/t/user-given-name-is-rendering-in-welcome-email-templates-body-as-empty-space/55068/1 "2020-12-18T07:11:12Z")

</div>

I have set up the following liquid syntax if/else statement in the body of my customized welcome email template so that we can fallback to the given\_name field if the email is sent before our rule to populate the custom user\_metadata field is run:

```
{% if user.user_metadata.firstName %}
    Hey {{ user.user_metadata.firstName }}, your new account awaits!
{% else %}
    Hey {{ user.given_name }}, your new account awaits!
{% endif %}

```

When I trigger the welcome email for a user with an empty user\_metadata.firstname field, but with a populated user.given\_name field (“Jenna”), the value that is rendered in the sent email is an empty empty string (“Hey , your new account awaits!”).

Can someone please help me figure out the problem here? user.given\_name is listed in the support documentation on fields that are available when customizing emails, and I am seeing this behavior in testing both through signing up as a new user and by triggering the email template to myself via the template’s “Try” button.

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [December 18, 2020, 2:45pm UTC](https://community.auth0.com/t/user-given-name-is-rendering-in-welcome-email-templates-body-as-empty-space/55068/3 "2020-12-18T14:45:23Z")

</div>

Hey there!

I’m just checking our docs on this. Will get back to you shortly!

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [December 18, 2020, 3:30pm UTC](https://community.auth0.com/t/user-given-name-is-rendering-in-welcome-email-templates-body-as-empty-space/55068/4 "2020-12-18T15:30:56Z")

</div>

Sooo reading this doc:

> **[Customize Email Templates](https://auth0.com/docs/customize/email/email-templates)**
>
> Learn how to customize your emails with Liquid templating syntax.

it seems that both of the options should work BUT to be honest here conditional checking is not necessary (you’re only checking if given\_name or user\_metadata.first\_name exists). Can you try configuring it the way so for every case it just use liquid syntax to welcome specific person and see if such syntax works so:

```auto
Hello {{ user.given_name }}, your new account awaits!

```

---

<div class="post-metadata">

**Author:** ![jennagoldman](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jennagoldman/32/12681_2.png) [@jennagoldman](https://community.auth0.com/u/jennagoldman)\
**Post date:** [December 18, 2020, 6:06pm UTC](https://community.auth0.com/t/user-given-name-is-rendering-in-welcome-email-templates-body-as-empty-space/55068/5 "2020-12-18T18:06:53Z")

</div>

Hi Konrad!

Thanks for your quick reply! I tried changing to just `Hello {{ user.given_name }}, your new account awaits!`, and that does work correctly. But we only want to use user.given\_name if user.user\_metadata.firstName is not yet filled out. How do you suggest we get to that solution? Ultimately, we’d actually also like to default to a static text value (“there”) if neither of the other values is available.

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [December 23, 2020, 5:07pm UTC](https://community.auth0.com/t/user-given-name-is-rendering-in-welcome-email-templates-body-as-empty-space/55068/6 "2020-12-23T17:07:40Z")

</div>

Let me talk it over with the appropriate team and get back to you as soon as I have news to share!
