# HUBL Email module issue

**URL:** <https://community.hubspot.com/t/hubl-email-module-issue/32109>\
**Category:** APIs & Integrations\
**Tags:** developer-tools\
**Created:** [February 22, 2021, 6:19pm UTC](https://community.hubspot.com/t/hubl-email-module-issue/32109 "2021-02-22T18:19:22Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![ehearty](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/ehearty/32/32521_2.png) [@ehearty](https://community.hubspot.com/u/ehearty)\
**Post date:** [February 22, 2021, 6:19pm UTC](https://community.hubspot.com/t/hubl-email-module-issue/32109/1 "2021-02-22T18:19:22Z")

</div>

I’m experiencing an issue where the “request\_contact” variable (referenced here as one that should be available to all hubl templates:

[HubL variables - HubSpot docs](https://developers.hubspot.com/docs/cms/hubl/variables)) is available when _previewing_ a custom email module, but _empty when the actual email is sent_. Am I doing something wrong?

To add a little more context, I need the vid in order to pull the user’s associated deals into the email body. Again, everything works great in the preview 😞

Inside the preview:

 ![38413i771794E54A8193F4.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/0/f/0f6866cb8d9a5575a0726df90e056c3a77ea463d.png)

^^ NOTE THAT THE CONTACT VID IS POPULATED IN ABOVE

When viewing in my inbox:

 ![38412i01386352BEF4957C.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/9/f/9f33a0ae708dfc2541fc33543dd8e739d7400f5b.png)

Does anyone have any insight into what’s going on? I keep rereading the documentation and I don’t see anything indicating that I shouldn’t have access to that object from the email module.

Thanks,

Elena

---

<div class="post-metadata">

**Author:** ![dennisedson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dennisedson/32/28044_2.png) [@dennisedson](https://community.hubspot.com/u/dennisedson)\
**Post date:** [February 23, 2021, 4:05pm UTC](https://community.hubspot.com/t/hubl-email-module-issue/32109/2 "2021-02-23T16:05:52Z")

</div>

Hello @ehearty

Could you add your code here as well to look at?

@Kevin-C might be able to help!

---

<div class="post-metadata">

**Author:** ![Kevin-C](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/kevin-c/32/34570_2.png) [@Kevin-C](https://community.hubspot.com/u/Kevin-C)\
**Post date:** [February 23, 2021, 5:20pm UTC](https://community.hubspot.com/t/hubl-email-module-issue/32109/3 "2021-02-23T17:20:40Z")

</div>

Thanks @ehearty

Hey @ehearty

I am able to replicate this. But not sure if this is a bug or intended as I didn’t see anything in the documentation.

Test:

```lia-code-sample
{{ request_contact }} {# returns null #}

{{ request_contact|pprint }} {# returns null #}

{{ request_contact ? true : false }} {# returns false #}

{% for obj in request_contact %} {# returns ' ' #}
 {{ obj|pprint }}<br><br>
{% endfor %}

```

---

<div class="post-metadata">

**Author:** ![ehearty](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/ehearty/32/32521_2.png) [@ehearty](https://community.hubspot.com/u/ehearty)\
**Post date:** [February 23, 2021, 6:40pm UTC](https://community.hubspot.com/t/hubl-email-module-issue/32109/4 "2021-02-23T18:40:27Z")

</div>

> * * *
> 
> @Kevin-C wrote:
> 
> I am able to replicate this. But not sure if this is a bug or intended as I didn’t see anything in the documentation.
> 
> * * *

Thanks @Kevin-C ! My hunch is that it’s a bug, given that “request\_contact” is listed as one of the variables available to all templates here: [HubL variables - HubSpot docs](https://developers.hubspot.com/docs/cms/hubl/variables#variables-available-in-all-templates), and of course that it works in the preview. Otherwise I’d think it amounts to a bug in the documentation/preview. 🤔

---

<div class="post-metadata">

**Author:** ![ehearty](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/ehearty/32/32521_2.png) [@ehearty](https://community.hubspot.com/u/ehearty)\
**Post date:** [February 23, 2021, 4:19pm UTC](https://community.hubspot.com/t/hubl-email-module-issue/32109/5 "2021-02-23T16:19:26Z")

</div>

Thanks so much for getting back to me! Here’s the code that I’m using to print the contact vid in my custom email module:

`REQUEST CONTACT VID is: {{request_contact.contactVid}} `

At this point, I’ve commented out all other code, so I can say with complete certainty that:

a) The line prints the correct vid when shown for a selected contact in the preview, and

b) The line prints nothing when the email is actually sent (either through the test email option or via workflow)

Thanks so much for taking a look!

--Elena

---

<div class="post-metadata">

**Author:** ![ehearty](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/ehearty/32/32521_2.png) [@ehearty](https://community.hubspot.com/u/ehearty)\
**Post date:** [March 1, 2021, 2:59pm UTC](https://community.hubspot.com/t/hubl-email-module-issue/32109/6 "2021-03-01T14:59:30Z")

</div>

@dennisedson & @Kevin-C,

Apologies, I’m still new to the platform, but is there some way I can follow up on this with the tech team? For example, is there somewhere I can submit a bug report?

Thanks,

Elena Hearty

---

<div class="post-metadata">

**Author:** ![dennisedson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dennisedson/32/28044_2.png) [@dennisedson](https://community.hubspot.com/u/dennisedson)\
**Post date:** [March 1, 2021, 3:56pm UTC](https://community.hubspot.com/t/hubl-email-module-issue/32109/7 "2021-03-01T15:56:30Z")

</div>

Heyo @ehearty

You can always contact [support](https://help.hubspot.com/), but in for this one specifically, I have been asking about. It looks like it is more a documentation issue rather than a bug. I spoken with documentation team and they have added a note to that specific variable in the docs.

---

<div class="post-metadata">

**Author:** ![ehearty](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/ehearty/32/32521_2.png) [@ehearty](https://community.hubspot.com/u/ehearty)\
**Post date:** [March 1, 2021, 7:04pm UTC](https://community.hubspot.com/t/hubl-email-module-issue/32109/8 "2021-03-01T19:04:46Z")

</div>

Much appreciated, thank you @dennisedson!
