Postmark Template - Null Values


I have started using Postmark to send updates to customers and the template is set up and the data is pulling through just as it should, everything is running perfectly except when there is no data to send to the template and the received email shows “null”

In Bubble, the user inputs the data on a form like this;

Screenshot 2021-07-02 at 16.10.11

In this instance there is data which pulls through to the resulting email like this;

The problem arise when there is no data, for instance this field has no data;

Screenshot 2021-07-02 at 16.15.13

and the resulting email shows this;

I am looking for a way to have the template show either no data or have a placeholder that shows “TBC” or something similar. I have looked through the Postmark documentation and found this link which seems to suggest it is possible through the use of an inverted group.

I have (i think) followed the instructions here:

but that just removes all data in the resulting email like this;

Has anyone had and solved this issue, point out where I have gone wrong or point me in the right direction at all?


Your substitution tabs should be {{{ variable }}}

Thanks for the reply @johnny

I wasn’t 100% sure how to do this so I have tried

{{^mor_date}} {{{TBC}}} {{/mor_date}} and this doesn’t bring through any data

So I tried {{{^mor_date}}} TBC {{{/mor_date}}} but that threw this error

Hi @michael.edwards,

It should just be {{{ mor_date }}} where ever you want the variable value to be.

Thanks @johnny, I am little confused though. That pulls data if it’s there, but if not the resulting email show null which I am trying to solve

Appreciate your help and patience

Ooooooops @michael.edwards, I’ve been reading your post the whole way wrong lol I thought you were having troubles pushing data to your Postmark template.

But in your case, you can just make a condition in a Bubble workflow where if there’s no data to send, you can pass to the Postmark template X

Thanks @johnny, I think I have found a way to do it through the API call where it shows TBC.

Unfortunately I have hit my test limits on my Postmark account so having to wait until it’s activated to carry on testing!

Hey Michael,

I’m running into the same issue you had, how did you come about solving it?

My order confirmation email has a table with subtotal, discount, shipping, tax, total and discount, shipping, tax could be empty so I get a null.

I want to hide that from the email without having to do a condition in Bubble.

Any help is appreciated. Thanks!

Hi @thedew I ended up manually adding in a value in the call, in my case “TBC” (see image) so if there is no value it shows TBC, I couldn’t get it to be blank but in my use case this worked perfectly