# JSON Template not being read sometimes by the Webhook

**URL:** <https://community.glideapps.com/t/json-template-not-being-read-sometimes-by-the-webhook/73366>\
**Category:** Ask for Help\
**Created:** [May 14, 2024, 3:54pm UTC](https://community.glideapps.com/t/json-template-not-being-read-sometimes-by-the-webhook/73366 "2024-05-14T15:54:12Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![CarloA](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/carloa/32/74297_2.png) [@CarloA](https://community.glideapps.com/u/CarloA)\
**Post date:** [May 14, 2024, 3:54pm UTC](https://community.glideapps.com/t/json-template-not-being-read-sometimes-by-the-webhook/73366/1 "2024-05-14T15:54:12Z")

</div>

Hello Glide Community,

I have set up a webhook in Glide that sends a JSON body to Make. The JSON body is generated from a JSON template column in a Glide table.

The problem is that sometimes the JSON template is read and processed correctly, while other times it is not and it results in the webhook as a empty body.

The JSON template has two variables, whose values are generated following an “add row” action performed by the user in a table different from the one containing the JSON template.  
Once the row is added, a die is rolled and a multiplier is generated.  
The multiplier is brought into the JSON template table using a single value column, and then, through a math column and several if-then-else conditions, the values that fill the JSON template are generated.

Observing the behavior of the JSON template from the data section in Glide, it seems to always function correctly and updates very quickly when the variables change.

I have also added a 15-second delay to see if the issue could be due to insufficient time for the template to update, but I noticed that sometimes with a 15-second delay it doesn’t get read, while other times with a 5-second delay it does get read. So it doesn’t seem to be a timing issue.

What could be the possible causes of this issue?  
Any insights or advice would be greatly appreciated.

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [May 14, 2024, 4:02pm UTC](https://community.glideapps.com/t/json-template-not-being-read-sometimes-by-the-webhook/73366/2 "2024-05-14T16:02:40Z")

</div>

I have suspected for a while that the JSON Object and JSON Template columns are not 100% reliable when used in combination with webhooks.

Here is something to try: replace your JSON Template column with a regular template column to create the JSON payload, then send that instead. I’ll be interested to hear how that works out.

---

<div class="post-metadata">

**Author:** ![CarloA](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/carloa/32/74297_2.png) [@CarloA](https://community.glideapps.com/u/CarloA)\
**Post date:** [May 14, 2024, 4:47pm UTC](https://community.glideapps.com/t/json-template-not-being-read-sometimes-by-the-webhook/73366/3 "2024-05-14T16:47:37Z")

</div>

Now with the regular template column, it seems that the webhook reads the body 100% of the time (after 5 tests), but I get the following problem in the Create JSON module in Make.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/4/5/4572a791d75fd8e19891bb68390bd40678cc3fdd.png)

This is what Make Webhook receives:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/5/6/566c4d878e277b7d7657e4acee22523864de99aa.png)

I believe it is due to the numeric value, maybe because my numeric value uses a comma. When using the JSON template column it automatically becomes a point, but with the regular template it remains a comma, and the JSON results invalid.

To work around the issue, I set the numeric value without decimals (so the comma should no longer be present because the number is an integer), but the issue persists.

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [May 14, 2024, 4:54pm UTC](https://community.glideapps.com/t/json-template-not-being-read-sometimes-by-the-webhook/73366/4 "2024-05-14T16:54:12Z")

</div>

Try removing the Create JSON module from the scenario path, and pass the payload directly from the webhook to the HTTP module. Don’t ask me to explain why, but I think that will work.

---

<div class="post-metadata">

**Author:** ![CarloA](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/carloa/32/74297_2.png) [@CarloA](https://community.glideapps.com/u/CarloA)\
**Post date:** [May 14, 2024, 5:10pm UTC](https://community.glideapps.com/t/json-template-not-being-read-sometimes-by-the-webhook/73366/5 "2024-05-14T17:10:46Z")

</div>

Please help me to set the request content (previously I was using the resulting string from the Create JSON module).

I tried to set it this way, but I get the following error:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/6/a/6a0fa25d515cf621e1dbc7cc23294b4f311f34a6.png)  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/4/d/4dff9bf7a6f138b6f8ebc98b79fcdac1c5d5bf62.png)  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/5/5/558f01b1803ae507cb302c9d11d94877f29b9e75.png)

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [May 15, 2024, 1:45am UTC](https://community.glideapps.com/t/json-template-not-being-read-sometimes-by-the-webhook/73366/6 "2024-05-15T01:45:20Z")

</div>

That request content looks incorrect. Can you try pointing it to the “Body” level so it reference everything in the body?

---

<div class="post-metadata">

**Author:** ![CarloA](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/carloa/32/74297_2.png) [@CarloA](https://community.glideapps.com/u/CarloA)\
**Post date:** [May 15, 2024, 8:56am UTC](https://community.glideapps.com/t/json-template-not-being-read-sometimes-by-the-webhook/73366/7 "2024-05-15T08:56:50Z")

</div>

Hey @ThinhDinh

this is the error I receive if I fill the request content with the “body” variable

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/e/6/e675cf54a457f45de7efecf2cd7ee956bf2a070c.png)

This is what the webhook passes to the HTTP module:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/7/6/76b2d80dacdbe56dacbf8ce7424a4e5b3cb2d117.png)

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [May 15, 2024, 9:37am UTC](https://community.glideapps.com/t/json-template-not-being-read-sometimes-by-the-webhook/73366/8 "2024-05-15T09:37:08Z")

</div>

Can you show the payload that is sent from Glide? (you can copy it from the action run log)

The structure of your mutations looks a bit off.

---

<div class="post-metadata">

**Author:** ![CarloA](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/carloa/32/74297_2.png) [@CarloA](https://community.glideapps.com/u/CarloA)\
**Post date:** [May 15, 2024, 10:00am UTC](https://community.glideapps.com/t/json-template-not-being-read-sometimes-by-the-webhook/73366/9 "2024-05-15T10:00:06Z")

</div>

Sure!

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/1/1/1199136c3d40ba9f9c57002f7584819cd98aa897.png)

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [May 15, 2024, 10:04am UTC](https://community.glideapps.com/t/json-template-not-being-read-sometimes-by-the-webhook/73366/10 "2024-05-15T10:04:14Z")

</div>

Yeah, your mutations are not constructed correctly. Compare what you have to what was created by the JSON Template column. They should be the same. You probably need to adjust your template column.

Actually, are you feeding a lookup column into the template?  
If you are, that’s probably the issue. When constructing the JSON manually in this way, you should use a joined list. I know that contradicts what I told you earlier, but it’s a different method. Confusing, I know…

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [May 15, 2024, 10:24am UTC](https://community.glideapps.com/t/json-template-not-being-read-sometimes-by-the-webhook/73366/12 "2024-05-15T10:24:49Z")

</div>

> [@CarloA](#):
>
> Now with the regular template column, it seems that the webhook reads the body 100% of the time

This is what I was most interested in. Once you get the full flow working, can you please let me know if it continues to reliably send the full payload 100% of the time?

---

<div class="post-metadata">

**Author:** ![CarloA](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/carloa/32/74297_2.png) [@CarloA](https://community.glideapps.com/u/CarloA)\
**Post date:** [May 15, 2024, 11:31am UTC](https://community.glideapps.com/t/json-template-not-being-read-sometimes-by-the-webhook/73366/14 "2024-05-15T11:31:29Z")

</div>

Ok, it was my fault… I was missing the fact that also the JSON body template needed to be converted to a regular template.

Now it works perfectly!!

After about 20 tests, the payload was sent correctly 100% of the time. I will update you if it fails in any situation.

Thanks again so much!🙏

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [May 15, 2024, 2:22pm UTC](https://community.glideapps.com/t/json-template-not-being-read-sometimes-by-the-webhook/73366/15 "2024-05-15T14:22:24Z")

</div>

Great to hear!
