How to get data from nested json? – Need help


I’m trying to get the data from “content” but I’m struggling how to access it in this nested json

I already tried content.text but its not working

image

You should use auto-detect feature, send the payload to your endpoint and let Bubble parse the JSON. You will have option after to select request data’s query content text…

Auto-detect is available with POST. Can you change your endpoint to POST? (normally, this is what webhooks use)

I already did that but it does not detect data after the event was triggered.

That’s why I’m using Trigger workflow with GET Method and now I’m receiving data from the webhook I setup from external service, my problem is whenever I include the “content” parameter, it does not save the data.

Once you have detected data, did you remove /initialize from url?
What is the payload (in JSON) you are sending exactly? I understand that you are able to parse mobile_number?

It does not detect anything that’s why I can’t initialize it.

I just copy the payload from the webhook.site since it can receive the data.

Yes, I can get mobile_number and other parameter, except the content

What are you doing when you “post” the request when auto-detect is activated?

Save the request data from my database

Can you share the raw body received?

What I mean is what are you doing on both Bubble when you try to initialize the call and on the website that is posting the call. Maybe you can share some screenshot

This is what I’m receiving

haaaa. this is different. You are not sending a json, but a query string.
You will need to set content as the parameters name and use regex or a json tool to decode the value of the content. Content is a string like mobile number…



1 Like

You cannot probably use POST and initialize. Bubble struggle with querystring in POST. What you can do however, is to send it a urlformencoded content-type instead (better if you can send it as JSON)

Get will accept querystring. This is why it work. But you need to use content as the parameters and not content.text. You will use regex or a JSON plugin to parse the content value.



1 Like



Source link

Leave a Comment