Access value of a webhook that has been POST to xano API.
Options
![Tim](https://us.v-cdn.net/6037124/user_avatars/4124812.jpg)
Tim
Member ✭
It all sounds unbelievebly simple doesn't it.
I've watch a few tutorials and gone through the docs.
But in my webhook i don't get any variable i just get a big json object.
For example in the tutorials you guys make it super simple and your webhook has
data {
email: "value"
etc.etc.
}
My webhook i just get a JSON object how can i store the whole thing as a variable or something?
Because right now i need to access the id in the webhook and i've got no idea.
Any help woule be greatly appreciated.
I've watch a few tutorials and gone through the docs.
But in my webhook i don't get any variable i just get a big json object.
For example in the tutorials you guys make it super simple and your webhook has
data {
email: "value"
etc.etc.
}
My webhook i just get a JSON object how can i store the whole thing as a variable or something?
Because right now i need to access the id in the webhook and i've got no idea.
Any help woule be greatly appreciated.
Comments
-
You have to use dot notation like data.id or data.name to access the values.
Remember JSON is a text "object" (a string really) that can contain just about anything including arrays. "Objects" are noted in {curly braces} and arrays in [brackets]. It helps to know a little about JavaScript to understand the notation.
There are a host of data manipulations available in the API function stack (revealed when you add anything to your function stack). It's a bit overwhelming at first but stay with it. It gets easier.
In one of the videos there is a mention of webhooks.site
It offers a URL that redirects form submissions (from your front end) to that site where you can see what the JSON looks like formatted and unformatted. Helpful. -
Remove the input object and use the Utility Function Get All Input (Webhook).[Captura de Tela 2022-04-19 às 14.58.07.png]
-
thanks Mauro that’s what im chasing
Thanks
Categories
- All Categories
- 53 ? Announcements
- 47 ? Releases
- 37 ? Welcome
- 983 ? Help! I'm a Noob
- 125 ? No-Code Front-Ends
- 633 ? Working with APIs
- 439 ? Transforming data
- 126 ? Connect Xano to ...
- 50 ?? Find an Expert
- 348 ❓Other questions
- 35 ? Security
- 22 ✂️ Snippets
- 19 ? Showcase
- 7 ?️ Xano Chatter
- 62 ? Video Tutorials
- 171 ? Request a feature
- 229 ? Report a Bug
- 19 ? Templates & Extensions
- 7 ? Feedback