web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / ExpressionEvaluationFa...
Power Automate
Unanswered

ExpressionEvaluationFailed. The execution of template action 'Apply_to_each_9' failed: the result of the evaluation of 'foreach' expression '@body('Parse_JSON_5')?['body']?['items']' is of type 'Null'. The result must be a valid array.

(0) ShareShare
ReportReport
Posted on by 4

Hi, I am having issues with a flow that I have built, which is displaying the following error message:

 

ExpressionEvaluationFailed. The execution of template action 'Apply_to_each_9' failed: the result of the evaluation of 'foreach' expression '@body('Parse_JSON_5')?['body']?['items']' is of type 'Null'. The result must be a valid array.

 

ollyberry7_1-1707753303309.png

 

This is what the flow looks like:

 

ollyberry7_2-1707753406645.png

 

Essentially, the Parse JSON runs correctly, however the information is not populating the SharePoint List at all and skipping past these.

 

Is there a way to fix this? I have tried rebuilding, etc and nothing seems to be working...

 

Any repsonses appreicated, thank you in advance.

 

Olly

 

 

Categories:
I have the same question (0)
  • David_MA Profile Picture
    13,912 Super User 2026 Season 1 on at

    I think if you add a condition after your Parse JSON 5 action you will be all set. You'll want to set the condition to where the length of the body of the Parse JSON 5 action is greater than zero. The length expression counts how many items are in the array. According to the error, your array contains no values. By adding the condition, you can add the Apply to each action to the yes side of the condition when it contains items. The expression would be length(outputs('Parse_JSON_5))

  • ollyberry7 Profile Picture
    4 on at

    Hi David,

     

    Thank you for this.

     

    I have tried your suggestion and am now getting the following error:

     

    InvalidTemplate. Unable to process template language expressions for action 'Condition_5' at line '0' and column '0': 'The template language function 'length' expects its parameter to be an array or a string. The provided value is of type 'Object'. Please see https://aka.ms/logicexpressions#length for usage details.'.

     

    See below the error and the build:

     

    ollyberry7_0-1707822516955.png

     

    ollyberry7_1-1707822677786.png

    Does this look correct to you?

     

    Thank you for your help.

     

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.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 251 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 239

#3
Expiscornovus Profile Picture

Expiscornovus 220 Most Valuable Professional

Last 30 days Overall leaderboard