Using < and > in API Connector body

To use Postmark to send messages with friendly-formatted To and From headers like:

To: Jo Bloggs <jo@bloggs.com>
From: Mbasa Xu <m@xu.org>

… I need to actually use < and > in the body of my API connector. However, Bubble uses < and > to denote placeholders, and doesn’t provide any (at least, documented) way to escape < and >. So it initially looks impossible to use < and > in the body, something like this:

{
    "From": "<From_Name> <From_Email>",
    "To": "<To_Name> <To_Email>",
    "MesssageStream": "sharing",
    "TemplateAlias": "sharing-invitation",
    "TemplateModel": {
        "sender_name": "<From Name>",
        "recipient_name": "<To Name>"
    }
}

In the above, Postmark really needs to receive a < and > around From_Email and To_Email.

So how to do this?

So, I found a way. Create placeholders <LessThan> and <GreaterThan> and use them where you need the symbols:

image

Then fill the parameters in as follows and set them to Private:

image

And you get the result you’re looking for!

2 Likes