Notifications
Announcements
Hi,
I'm having trouble trying to extract the iteration path/ name so I can add it to a 'Create Item in Azure DevOps' action. My flow is shaped like this. I 'Compose' a HTML, send HTML in an Email, after this I use the 'Send HTTP request to DevOps' to GET the iteration path data
The Schema I'm using to Parse the data is:
{ "type": "object", "properties": { "count": { "type": "integer" }, "value": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "path": { "type": "string" }, "attributes": { "type": "object", "properties": { "startDate": { "type": "string", "format": "date-time" }, "finishDate": { "type": "string", "format": "date-time" }, "timeFrame": { "type": "string" } }, "required": [ "startDate", "finishDate", "timeFrame" ] }, "url": { "type": "string" } }, "required": [ "id", "name", "path", "attributes", "url" ] } } }, "required": [ "count", "value" ]}
when I try to extract iteration path to use in 'Create Work Item' I get this error: ExpressionEvaluationFailed. The execution of template action 'Apply_to_each_3' failed: the result of the evaluation of 'foreach' expression '@body('Parse_JSON_3')' is of type 'Object'. The result must be a valid array.
I have tried both array and object in Parse JSON 3 action but I'm still unable to use in the Create Work Item in Azure DevOps (can anyone help?
{"type": "array","items": {"type": "object","properties": {"id": {"type": "string"},"name": {"type": "string"},"path": {"type": "string"},"attributes": {"type": "object","properties": {"startDate": {"type": "string","format": "date-time"},"finishDate": {"type": "string","format": "date-time"},"timeFrame": {"type": "string"}},"required": ["startDate","finishDate","timeFrame"]},"url": {"type": "string"}},"required": ["id","name","path","attributes","url"]}}
{"type": "object","properties": {"count": {"type": "integer"},"value": {"type": "array","items": {"type": "object","properties": {"id": {"type": "string"},"name": {"type": "string"},"path": {"type": "string"},"attributes": {"type": "object","properties": {"startDate": {"type": "string","format": "date-time"},"finishDate": {"type": "string","format": "date-time"},"timeFrame": {"type": "string"}},"required": ["startDate","finishDate","timeFrame"]},"url": {"type": "string"}},"required": ["id","name","path","attributes","url"]}}},"required": ["count","value"]}
Hi , @NiiruK
This error code means that you need to pass an array in your Apply to each 3 input .
And in your screenshot , you are using the body of the Parse Json3 output , so can you show me the Parse Json3 output in your flow run history?
Best Regards,
Yueyun Zhang
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
In our never-ending quest to improve we are simplifying the forum hierarchy…
We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Michael E. Gernaey 522 Super User 2025 Season 2
Tomac 364 Moderator
abm abm 243 Most Valuable Professional