I am getting this raw data from a mobile at my scenario webhook. I need to parse it as a json, however, the payload is treated as a variable, not a real value. Considering the data received from the external system will not change, how can I parse this raw data? I already tried all kinds of json, tools and text parsing modules but the object return empty. Any suggestions will be more than welcome!
Hello @sguedelha,
If you go to your webhooks page, find that webhook, edit, enable Advanced Settings, you will see some options. Maybe you can toggle JSON pass-through?
Hi Donald, Thanks for your contribution. I tried both ways (JSON pass through on and off) but regardless, MAKE still identifies the data as a variable.
If I had to guess you are stringifying the payload when you post the data (double stringified), thus the parsed value remains a string.
Can you check the payload?
Basically it seems like the webhook is being called like this:
https://hook.us1.make.com/uk2jb5f54e286vrryusojvyukchabvlj?{"mode":"selection","msidsn":"5511"}=&Method=POST
Where the data is in the form of a query parameter’s key.
Honestly have no idea how to get this! I feel like I’ve learnt it before at some point but it’s so rare I just can’t recall…
Have you got any control at all over the way the webhook is called from the service that’s calling it? If not, I can think of only 1 workaround at the moment…
Build a helper relay scenario that basically accepts the initial request, goes and grabs the Webhook Logs, iterate the logs (filtering out those that have already been processed), get the ID, Get the Webhook Execution Detail using the ID from the logs, then the execuction detail will contain a payload section.
Parse that out, format it into valid JSON, then use HTTP module to call your main scenario that does the actual processing.
The execution detail contains the data that was parsed and the original request, including the URL so there are multiple ways to get your data out of it.
Then you just need to make sure the main scenario doesn’t run twice for the same data, if that’s a concern.
Hi, Donald! Thanks again for you contribution! Actually users interact with this scenario either using a Web App or a Mobile App. The problem happens only with the mobiles. I understood your suggestion, that goes down to the MAKE API, but still a bit too far for my limited knowledge.
I have no control over the way the webhook is called, but will discuss it with the provider (Streamwide - France). If the come out with a solution for the mobiles, the problem will be resolved. If not (more probable), your suggestion can definitely be a solution.
This is the scenario, which works fine for users from the Web App:
This is how the data comes in, for both type of users:
Hi Edward,
Thanks for your contribution
If I got your point, the data has double stringfield both for PC and Mobile users. Please refer to the images on my reply to Donald.
Cheers!
Yea seems like the people over there at Streamwide need to fix their mobile app as it is causing some inconsistency.
Hi Donald, good morning.
Actually Streamwide cannot modify the mobile data string because it would affect other customers which already use this API service. Thanks to a suggestion from @hugoassuncao, I sent both mobile and computer data to hookdeck and transformed them to get always the same output format sent to MAKE. I used a JS built by CLAUDE.
BTW, hookdeck is a very powerful tool which can fill certain gaps on MAKE webhooks.
Thanks again for your very enlightening contribution, which lead me to the right direction.
Cheers!