# Postmark Errors

**URL:** <https://forum.bubble.io/t/postmark-errors/180839>\
**Category:** Need help\
**Created:** [December 2, 2021, 11:44pm UTC](https://forum.bubble.io/t/postmark-errors/180839 "2021-12-02T23:44:53Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![openocean.tampa](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/openocean.tampa/32/119226_2.png) [@openocean.tampa](https://forum.bubble.io/u/openocean.tampa)\
**Post date:** [December 2, 2021, 11:44pm UTC](https://forum.bubble.io/t/postmark-errors/180839/1 "2021-12-02T23:44:53Z")

</div>

Continuing the discussion from [Ignore quote in Email](http://forum.bubble.io/t/ignore-quote-in-email/159033):

Not sure if this is the same problem or not, but it is the only similar thing I have seen in the forum.

I had recently set up my app to use postmark transactional emails. It is a social networking app and I am using postmark to send emails for things like a welcome email, notifications, messages, etc.

In the beginning I struggled to set everything up, but after a few hours I got it all working. But for some reason two of the api calls just stopped working. The call to send an email when a User receives a new message and the call for a new notification. The error that shows up in the server logs is:

Workflow error - The service Postmark Message - Message just returned an error (HTTP 422). Please consult their documentation to ensure your call is setup properly. Raw error: {"ErrorCode":402,"Message":"Received invalid JSON input."}

I have checked the JSON in a validator, no issues were found, then I worked with postmark support, and nothing they could see, so I feel like this is a bubble issue. I can’t figure out what happened and would love to know if anyone else ran into a similar issue and has input on how to solve.

---

<div class="post-metadata">

**Author:** ![johnny](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/johnny/32/203020_2.png) [@johnny](https://forum.bubble.io/u/johnny)\
**Post date:** [December 2, 2021, 11:52pm UTC](https://forum.bubble.io/t/postmark-errors/180839/2 "2021-12-02T23:52:56Z")

</div>

Can you send a screenshot of how your JSON code looks like right now?

---

<div class="post-metadata">

**Author:** ![openocean.tampa](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/openocean.tampa/32/119226_2.png) [@openocean.tampa](https://forum.bubble.io/u/openocean.tampa)\
**Post date:** [December 2, 2021, 11:54pm UTC](https://forum.bubble.io/t/postmark-errors/180839/3 "2021-12-02T23:54:18Z")

</div>

So fast, I love it! And yes:

 ![Screen Shot 2021-12-02 at 6.53.55 PM](https://us1.discourse-cdn.com/bubble/original/3X/3/d/3d9ac3b5ebcd47ccba350d332d38eb3ae7e49e2a.png)

---

<div class="post-metadata">

**Author:** ![johnny](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/johnny/32/203020_2.png) [@johnny](https://forum.bubble.io/u/johnny)\
**Post date:** [December 3, 2021, 12:13am UTC](https://forum.bubble.io/t/postmark-errors/180839/4 "2021-12-03T00:13:13Z")

</div>

Are you using the default outbound stream? Or another message stream?

---

<div class="post-metadata">

**Author:** ![openocean.tampa](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/openocean.tampa/32/119226_2.png) [@openocean.tampa](https://forum.bubble.io/u/openocean.tampa)\
**Post date:** [December 3, 2021, 12:14am UTC](https://forum.bubble.io/t/postmark-errors/180839/5 "2021-12-03T00:14:57Z")

</div>

Default Transactional Stream, not sure if that is the same thing or not.

---

<div class="post-metadata">

**Author:** ![johnny](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/johnny/32/203020_2.png) [@johnny](https://forum.bubble.io/u/johnny)\
**Post date:** [December 3, 2021, 12:15am UTC](https://forum.bubble.io/t/postmark-errors/180839/6 "2021-12-03T00:15:24Z")

</div>

The actual JSON code looks right. Have you tried escaping quotes and other characters that can throw your code off?

---

<div class="post-metadata">

**Author:** ![openocean.tampa](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/openocean.tampa/32/119226_2.png) [@openocean.tampa](https://forum.bubble.io/u/openocean.tampa)\
**Post date:** [December 3, 2021, 12:18am UTC](https://forum.bubble.io/t/postmark-errors/180839/7 "2021-12-03T00:18:22Z")

</div>

Yeah, I have been working at it all day trying to remove spaces and characters to see if it will work to no avail. I am not a coder though, so in all honesty I am not confident enough to say for sure.

---

<div class="post-metadata">

**Author:** ![johnny](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/johnny/32/203020_2.png) [@johnny](https://forum.bubble.io/u/johnny)\
**Post date:** [December 3, 2021, 2:31am UTC](https://forum.bubble.io/t/postmark-errors/180839/8 "2021-12-03T02:31:27Z")

</div>

Can you send an example message of what you’re trying to pass through?

---

<div class="post-metadata">

**Author:** ![openocean.tampa](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/openocean.tampa/32/119226_2.png) [@openocean.tampa](https://forum.bubble.io/u/openocean.tampa)\
**Post date:** [December 3, 2021, 3:40am UTC](https://forum.bubble.io/t/postmark-errors/180839/9 "2021-12-03T03:40:13Z")

</div>

So this is what I am doing. Have it set up so that when a new message is sent from one User to another it schedules a backend workflow. Then the workflow triggers an api call for the postmark email.

The weird part is, this was all working fine yesterday, and today it randomly just stopped working for this api call and also the one for new notifications that I have.

Here are some screenshots to give some insight, hopefully this is what you meant.

 ![Screen Shot 2021-12-02 at 10.30.45 PM](https://us1.discourse-cdn.com/bubble/original/3X/6/8/6800b325dce13e14139a74c5c2334271df7fd05c.png)

 ![Screen Shot 2021-12-02 at 10.32.03 PM](https://us1.discourse-cdn.com/bubble/original/3X/6/1/6170a2037fabd0ba809b5d88105d93950ec10697.png)

 ![Screen Shot 2021-12-02 at 10.32.52 PM](https://us1.discourse-cdn.com/bubble/original/3X/1/2/1252185a3a7d09cd5a3a01f6a5e3e1c9925c4fc2.png)

 ![Screen Shot 2021-12-02 at 10.33.47 PM](https://us1.discourse-cdn.com/bubble/original/3X/d/a/da9cc9647435d90a2b1ba7fd6b257b2fb4c4ae1b.png)

---

<div class="post-metadata">

**Author:** ![johnny](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/johnny/32/203020_2.png) [@johnny](https://forum.bubble.io/u/johnny)\
**Post date:** [December 3, 2021, 5:49am UTC](https://forum.bubble.io/t/postmark-errors/180839/10 "2021-12-03T05:49:38Z")

</div>

I believe it’s your “message content” where the quotes need to be escaped using \”

---

<div class="post-metadata">

**Author:** ![openocean.tampa](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/openocean.tampa/32/119226_2.png) [@openocean.tampa](https://forum.bubble.io/u/openocean.tampa)\
**Post date:** [December 3, 2021, 4:24pm UTC](https://forum.bubble.io/t/postmark-errors/180839/11 "2021-12-03T16:24:49Z")

</div>

In the workflow or the API JSON? I tried both and still have same issue 😕

---

<div class="post-metadata">

**Author:** ![openocean.tampa](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/openocean.tampa/32/119226_2.png) [@openocean.tampa](https://forum.bubble.io/u/openocean.tampa)\
**Post date:** [December 3, 2021, 4:34pm UTC](https://forum.bubble.io/t/postmark-errors/180839/12 "2021-12-03T16:34:29Z")

</div>

That actually led me to something though! I finally got it to work by removing all punctuations.

So it seems like having any punctuations in the workflow caused an error.

For example before I had:

 ![Screen Shot 2021-12-02 at 10.32.52 PM](https://us1.discourse-cdn.com/bubble/original/3X/1/2/1252185a3a7d09cd5a3a01f6a5e3e1c9925c4fc2.png)

As you can see there is a . at the end of company\_name, and “” marks and … in the message\_content.

I removed this so now it looks like:

 ![Screen Shot 2021-12-03 at 11.32.44 AM](https://us1.discourse-cdn.com/bubble/original/3X/a/e/ae6a3af95d9f3d5e3d5b9149565e3f96df957a0b.png)

And it seems to be working now.

---

<div class="post-metadata">

**Author:** ![johnny](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/johnny/32/203020_2.png) [@johnny](https://forum.bubble.io/u/johnny)\
**Post date:** [December 3, 2021, 4:37pm UTC](https://forum.bubble.io/t/postmark-errors/180839/13 "2021-12-03T16:37:50Z")

</div>

Yay! Yeah, I was talking about in the Wf Action. If you still want the quotes then you can do \” to escape it

---

<div class="post-metadata">

**Author:** ![openocean.tampa](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/openocean.tampa/32/119226_2.png) [@openocean.tampa](https://forum.bubble.io/u/openocean.tampa)\
**Post date:** [December 3, 2021, 4:43pm UTC](https://forum.bubble.io/t/postmark-errors/180839/14 "2021-12-03T16:43:50Z")

</div>

That’s what I was trying to do, but it still wasn’t working for some reason. Is it supposed to be like this?

It gives me the error again when I have it like this.

![Screen Shot 2021-12-03 at 11.43.07 AM](https://us1.discourse-cdn.com/bubble/original/3X/6/d/6da0bb441b792b554e8a1291663492f610c5fac2.png)

---

<div class="post-metadata">

**Author:** ![johnny](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/johnny/32/203020_2.png) [@johnny](https://forum.bubble.io/u/johnny)\
**Post date:** [December 3, 2021, 5:38pm UTC](https://forum.bubble.io/t/postmark-errors/180839/15 "2021-12-03T17:38:14Z")

</div>

You need it For both quotes

The one that the beginning and end

---

<div class="post-metadata">

**Author:** ![openocean.tampa](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/openocean.tampa/32/119226_2.png) [@openocean.tampa](https://forum.bubble.io/u/openocean.tampa)\
**Post date:** [December 3, 2021, 5:54pm UTC](https://forum.bubble.io/t/postmark-errors/180839/16 "2021-12-03T17:54:49Z")

</div>

Still shows the error that way. For the meantime, I can work around by just adding the punctuation to the template on Postmark, but I will play around with it tonight and update if I can make it work.

Thanks Johnny!

---

<div class="post-metadata">

**Author:** ![johnny](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/johnny/32/203020_2.png) [@johnny](https://forum.bubble.io/u/johnny)\
**Post date:** [December 3, 2021, 9:40pm UTC](https://forum.bubble.io/t/postmark-errors/180839/17 "2021-12-03T21:40:38Z")

</div>

Maybe try this? Determined to figure this out 😄

> <https://stackoverflow.com/questions/15637429/how-to-escape-double-quotes-in-json>

---

<div class="post-metadata">

**Author:** ![openocean.tampa](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/openocean.tampa/32/119226_2.png) [@openocean.tampa](https://forum.bubble.io/u/openocean.tampa)\
**Post date:** [December 3, 2021, 10:13pm UTC](https://forum.bubble.io/t/postmark-errors/180839/18 "2021-12-03T22:13:50Z")

</div>

It worked! Okay so maybe I just didn’t know the correct way to format.

For anyone else that runs into this, "whatever text you are sending through"

![Screen Shot 2021-12-03 at 5.13.17 PM](https://us1.discourse-cdn.com/bubble/original/3X/3/c/3c41583aaff52ffcdd9b753bbf3c100fff877ab5.png)

---

<div class="post-metadata">

**Author:** ![johnny](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/johnny/32/203020_2.png) [@johnny](https://forum.bubble.io/u/johnny)\
**Post date:** [December 3, 2021, 10:41pm UTC](https://forum.bubble.io/t/postmark-errors/180839/19 "2021-12-03T22:41:50Z")

</div>

Yay! Glad we solved it :))

---

<div class="post-metadata">

**Author:** ![karshypr](https://avatars.discourse-cdn.com/v4/letter/k/839c29/32.png) [@karshypr](https://forum.bubble.io/u/karshypr)\
**Post date:** [December 31, 2021, 3:08am UTC](https://forum.bubble.io/t/postmark-errors/180839/20 "2021-12-31T03:08:00Z")

</div>

I seem to be running into a similar issue when trying to send a email using the postmark Api, If I type plain text into the body I am able to send. Its only when I try using a email template we receive a ( HTTP 422 ) Im guessing this is a formatting issue ?? Any help would be appreciated !

[Next page](https://forum.bubble.io/t/postmark-errors/180839.md?page=2)
