Webhook: Data is too low in output to get variables

Hello Makers,
I’m quite embarassed because I’m looking for very complex alternative to get variables in Make from Webhook, while Make is able to preview data in output bundles.

Here I can preview data from very low array in the output :

On the other hand, I can’t catch the data in the next module because it’s too low :

As an example, in this output I’d like to use those lines :
output.json (113.1 KB)

  • Line 137 - Title
  • Line 90 - Subtitle
  • Line 161 - Price
  • Line 203 - First name
  • Line 218 - Last name
  • Line 233 - Email

Is it possible to do this in Make and how? If not, do you know any alternative to get those variables from external tools and import them in Make?

Thank you

To extract the variables you’ve mentioned, there are a few ways you could go about it:

Manual Mapping: If you can see the data in the output bundle of the webhook module, it is not automatically available for mapping, you can access it by manually typing the JSON dot notation path way into field of the module where you want to use the data.

For example, if you know the path to the “Title” field is something like pay_load.children[1].children[2].data.value, you would type this exactly into the mapping field in the following module where you would like to use the “Title”.

Array aggregator tool: If the data you’re trying to map is in an array, you should use an Array aggregator and “flatten” the structure, making it easier to map, you will get deep array elements and then you can map the fields accordingly.

2 Likes

Thank you @ThakurHemansh, I will try Manual mapping so.

Anyway, I’m curious to understand how Array aggregator works, because I tried it and I got nothing more.

Here you can see that mapping doesn’t go lower than without Array aggregator :

Best

Hello again, so I tried manual mapping as @ThakurHemansh described me but it didn’t work.

As you can see in my screenshots, my final input bundle is the path that I wrote in my field :
image

image

I feel like I should use function in the field. Do you have please any solution?

Thank you

Array aggregator as name suggests
Aggregates Bundles into Arrays
Lets say you had three bundles, you can convert them into three elements inside one array
The aggregated fields you select will be part of that element
It will only give you the values that you have selected in aggregated fields

2 Likes

Hey @Garry_V you actually copy pasted the value i gave you
You have to actually map them from you items
When you map them you get coloured boxes

2 Likes

Hi @Garry_V ,

I had a look at your JSON data and I see what you mean. To map your Title field (on line 137 of your JSON file), you need 1.payload.job.workflow.children.children.children.data.value, but Make.com only shows 1.payload.job.workflow.children.children.children.reference etc.

Make.com has generated that list from the last item in the collection, and that item doesn’t have a data field.

As @ThakurHemansh mentioned, you can manually map values that you cannot see in the mapping list. You do this by putting {{}} around your values, so the title field for you would be:
{{1.payload.job.workflow.children[].children[].children[].data.value}}

Make.com should recognise that as a reference to your data, and make it look like this:

image

Your Subtitle can be mapped directly:

These methods would only work for you when the field you are looking for is the first item in your collection. To map more complex collections, you’ll want to use the map() function to make sure you’re always pulling out the correct “children”.

For example, the Price field is the third “children” of the “Qualification besoin” section. To get to this value, you need to filter your “children”. Like this:

This formula is saying “show the field at data.value, when reference = Prix_estime”.

I recommend you have look at the help file for the array functions to help you navigate through your JSON and get the information you need.
https://www.make.com/en/help/functions/array-functions

Of course, come back here if you have any questions.

2 Likes

Thank you so much @Terry_Hopper and sorry for the delay. I was waiting to have time to test your solution before answering.

Well, it’s a manual mapping as @ThakurHemansh suggested and I do understand very well the principle, but in the fact, more difficult :upside_down_face:

For example, how to target the fifth collection in my 1st Children array? As you mentionned “Prix_estime”, I want “Prix final” which is {{1.payload.job.workflow.children[5].children[1].children[4].data.value}}, how can I get it?

As a designer, I need visualizing to understand and I promise that I will be autonomous with this example :nerd_face: Hope you understand

Hi @Garry_V,

It is possible to write the mapping exactly as you have.

These two are the same:


So you can navigate using numbers, but only if the data will always be in that order. “Prix final” would look like this:

However, it is better to filter the “children” like in my previous example, so that it will still pick the correct “children” if the data structure changes in the future.

1: Getting payload.job.workflow.children[5].children

So first we filter your top-level “children” to find the 5th one. The 5th “children” has a label of “Rapport d’intervention”, so we’ll use that. Like this:

That is now returning: 1.payload.job.workflow.children[5].children

2: Getting payload.job.workflow.children[5].children[1].children

That “children” only has one “children”, so, instead of filtering the next level of “children” we can amend our formula to look like this.

That is now returning: 1.payload.job.workflow.children[5].children[1].children.

3: Getting payload.job.workflow.children[5].children[1].children[4].data.value

The final step is to filter these “children” to find your “Prix final”. So we’re going to wrap all of that formula in another filter:

And that will return: 1.payload.job.workflow.children[5].children[1].children[4].data.value.

Voila!
image

Let us know how it goes.

2 Likes

@Terry_Hopper you are the teacher I would have loved to have at the university. It works and thanks to your clear explanations, I found the way to reach “payload.job.workflow.children[1].children[2].children[1].children[3].data.value → Email” on my own.

Thank you again :raised_hands: :raised_hands: :raised_hands:

1 Like

Hi @Garry_V.

You are very welcome. Thank you for your kinds words! That made my day.

3 Likes