Mapping set of multiple variables from different data root payload
What is the problem & what have you tried?
I want to map the exact same set of variables coming from the exact same bundle, with the unique difference that the mapping root is not the same (look at the attached screenshots) :
{{1.workflow.children.children}}
{{1.payload.workflow.children.children}}
{{1.payload.job.workflow.children.children}}
I tried to create a variable of those variable roots but it didn’t work. In other words, I tried to get “payload.job.workflow” or “payload.workflow” or “workflow” depending on my input flow.
Make doesn’t allow truly dynamic mapping paths (you can’t build {{payload.job.workflow}} on the fly). Best fix is to standardize the JSON first (Parse JSON / Set variable) so you always map from one stable path like workflow.children.children.
what’s the problem exactly? The data is supposed to come as one of the three variables, but you don’t know which one it is?
If that is the case, you can have a nested ifempty() function that checks one, if its empty, checks the second and keeps going until one variable returns an output.
Also your map() function in the attached PDF is wrong. The first argument should be an array.