Access value of a webhook that has been POST to xano API.

Options
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.

Comments

  • David Richardson
    Options
    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]
  • Tim
    Tim Member
    Options
     thanks Mauro that’s what im chasing 

    Thanks