I need to use the results of my Parse JSON action to complete an apply to each action and each time i try the value of 'ID" is coming thru as NULL.
If i hardcode the value that i get from my Parse JSON output into the HTTP action it works fine, but that's defeating the purpose to try and automate it.
This is what happens when it is contained in a Apply to Each Action
The error is:
The execution of template action 'Apply_to_each' failed: the result of the evaluation of 'foreach' expression '@body('Parse_JSON_2')?['id']' is of type 'Null'. The result must be a valid array.
What the heck am i missing here?
This should be easier than it is.
Solved! Go to Solution.
So the answer for some reason is to parse the body of the first JSON parse of the API body. Have no idea why that worked, and at this point don't care.
Hi @timalex,
In your error message it says it is referring to a Parse Json action with the name 'Parse JSON 2'. However, in your screenshot the name of the action is Parse JSON to then perform a ForEach Retry SSL Validation.
Is the reference to the id field correct in your HTTP request action?
I would have expected this:
body('Parse_JSON_to_then_perform_a_ForEach_Retry_SSL_Validation')?['id']
So that's a very good catch, my screenshots are from different iterations of that flow which is why you've caught that.
Please let me know what information i can provide that will help you help me. I really need to get this thing working and i don't understand why i can't USE the data in the JSON to kick off a apply for each on my HTTP patch call.
i appreciate the help.
So the answer for some reason is to parse the body of the first JSON parse of the API body. Have no idea why that worked, and at this point don't care.
Oh, and i failed to mention that you use the dynamic results from the SECOND 'ParseJSON' action within your Apply to each action.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Read the latest about new experiences and capabilities in the Power Automate product blog.
If you are a small business ISV/Reseller, share your thoughts with our research team.
User | Count |
---|---|
26 | |
25 | |
22 | |
22 | |
11 |
User | Count |
---|---|
45 | |
33 | |
31 | |
30 | |
30 |