JSON Validation Error

  • In this scenario, I am reading responses from Tally.so and triggering a MSG91 Whatsapp API
  • I’ve read the Tally.so response and created a JSON (Body) for the MSG91 Whatsapp API
  • This JSON (Body) when I trigger from Postman, triggers the whatsapp message (indicating that the body is correct)
  • However, on triggering this API in Make, I get a JSON Validation Error (on the ‘Make’ backend, even before it hits the MSG91 API)

Error Screenshot

Make_JSON_Error

I’ve initiated a support ticket but haven’t heard anything back from them and there is no location to go and check the update on the ticket via the make portal and hence looking for community wisdom.

Appreciate the help in advance!

Hi @Varun_Parikh ,

If it is possible, could you upload the JSON?
Currently it is almost impossible to investigate.

BR,

PBI

2 Likes

Welcome to the Make community!

1. Screenshots of module fields and filters

Please share screenshots of relevant module fields and filters in question? It would really help other community members to see what you’re looking at.

You can upload images here using the Upload icon in the text editor:
Screenshot_2023-10-07_111039

2. Scenario blueprint

Please export the scenario blueprint file to allow others to view the mappings and settings. At the bottom of the scenario editor, you can click on the three dots to find the Export Blueprint menu item.

Screenshot_2023-08-24_230826
(Note: Exporting your scenario will not include private information or keys to your connections)

Uploading it here will look like this:

blueprint.json (12.3 KB)

3. And most importantly, Output bundles

Please provide the output bundles of all the modules by running the scenario, then click the white speech bubble on the top-right of each module, save the bundle contents in your text editor as a bundle.json file, and upload it here into this discussion thread.
Screenshot_2023-10-06_141025

Providing the output bundles will allow others to replicate what is going on in the scenario even if they do not use the external service.

Following these steps will allow others to assist you here. Thanks!

Absolutely @Philippe_Billet

I’ve just made a few changes to the values in the JSON.
Thanks for the assist
JSON below:

{
“payload”: {
“type”: “template”,
“template”: {
“name”: “welcome_event_2”,
“language”: {
“code”: “En”,
“policy”: “deterministic”
},
“to_and_components”: [
{
“to”: [
“918888899999”
],
“components”: {
“body_1”: {
“type”: “text”,
“value”: “XXX”
},
“body_2”: {
“type”: “text”,
“value”: “YYY”
},
“header_1”: {
“type”: “component type”,
“value”: “https://storage.googleapis.com/production-file-system/372845/qcsqtw
}
}
}
]
},
“messaging_product”: “whatsapp”
},
“content_type”: “template”,
“integrated_number”: “919999988888”
}

That’s true your JSON is valid.
Please follow the instructions given by @samliew, he gives the “perfect” modus operandi for problem solving.

2 Likes

Output_Bundle_Step_1.json (4.4 KB)
Output_Bundle_Step_2.json (851 Bytes)
Thanks @Philippe_Billet

As mentioned by @samliew & recommended by you, I am attaching the:

  1. Export Scenario
  2. Output Bundle Step 1 (with a few values - PII changed)
  3. Output Bundle Step 2 (with a few values - PII changed)

Looking forward to your kind assist.

blueprint.json (38.6 KB)

1 Like

Last screenshot (I hope), could you add the full message error (with the data and so on)?

1 Like

Error Screen
Make_JSON_Error
shot here:

Expanded screenshot. Hit send, sooner than I intended…

In fact, it is the “parseError” function that produce the error, it looks like if Make wasn’t able to manage correctly the error from MSG91…
Unfortunately, I don’t know how to see it.

3 Likes

The funny thing is, it doesn’t look like make is even hitting msg91’s servers.

When I log in to msg91, it doesn’t show an api request.

To my novice eye, it looks like make is validating the json and erroring out without hitting msg91…

don’t know the target platform, but with twilio i have to “extract” the inner json before i can process it …

2 Likes

@OckertCameron thanks for the reply. what do you mean by ‘Extract’ the inner json? Is there a module for that?

Hi @Varun_Parikh - busy looking at the different platforms and their interfaces. With Twilio, I have to use pre-approved templates. I see MSG91 you also have the need for templates. it might be that nothing is wrong, and that the template is the problem. To answer you question, I use JSON Object Transform.

So from Tally.SO you follow the integration defined here (Make integration). You then want to extract / transform / create a message to go out via MSG91 correct? if this message is whatsapp, the whatsapp sender must be registered with facebook, and the specific whatsapp message template approved by facebook. are all of these items in place?

2 Likes

That’s correct.

The Sender is registered with Facebook.
The specific whatsapp message template is approved.

Let me try with JSON object transform and hope it works :slight_smile:

@OckertCameron Can’t find this module in make ‘JSON Object Transform’. Is there another name?

At the bottom of the JSON tool - Transform to JSON.

3 Likes

Got It. I had already tried with that. Earlier this scenario was a 4-step process:
Step 1: Read from Tally
Step 2: Create JSON
Step 3: Transform to JSON Object
Step 4: Hit MSG91 API

Since, I was getting the same error, I removed Step 3. I think, I also removed Step 3 as using the output from Step 3 in Postman was causing an error but using the output from Step 2 in Postman, completed the msg91 api call successfully…

Is this a production tool or your own? There is no whatsapp message bulk send option in the API? and many of the url reference links are invalid (https://control.msg91.com/api/v5/whatsapp//whatsapp-outbound-message/) - the double slash …

Busy looking at their documentation here Start your Cloud Communication.

The endpoint is: https://control.msg91.com/api/v5/whatsapp/whatsapp-outbound-message/bulk/

This is a production tool. I’m able to trigger this API via PostMan.

2 Likes