Problem with data outputs

#1

Hi
I get this Data from a Webhook http request using json:

Data
[
{
“Title”: “alpha”
}
{
“Title”: “beta”
}
]

And I want to post a message with this result.
I tried this:

{{make_a_http_request.data__title}}

and also this

{{make_a_http_request.data__0__title}}

But it doesn’t work. May be because ‘Data’ is starting with ‘[’ instead of ‘{’
Please, could you help me?

(Daniel Beckett) #2

Hi Kiki,

Could you share an example of your webhook that’s sending the data?

It’s a bit strange that “Title” has two separated values with both of them being surrounded by quotation marks. I’d expect to see something like

“Title”: Alpha

When you click on the xo icon in your send message action what outputs are showing for the webhook?

Thanks,
Dan

#3

Hi
This is the real Data answer received by flowxo:

and the following one:

The webhook is a GET to https://haveibeenpwned.com/api/v2/breachedaccount/[email_account]

The send message result is:

(Daniel Beckett) #4

Hi Kiko,

Thanks for sharing that. Much clearer now.

You’re probably going to find this annoying but it looks like you already had your answer. :smiley:
The only problem is that the variables being passed back by the API are case sensitive. Your output for title:

{{make_a_http_request.data__0__title}}

Should be:

{{make_a_http_request.data__0__Title}}

That should work for you then. If it’s still giving out a blank message please let me know, there’s an example flow I can share which shows this working.

Thanks,
Dan