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 / The execution of templ...
Power Automate
Unanswered

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

(0) ShareShare
ReportReport
Posted on by

Trying read data from Salesforce Accounts object and inserting to Sqlserver table , when I ran the flow getting below error

 

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

 

Any thoughts?

Categories:
  • MJain Profile Picture
    2,450 on at

    Hi @ssivalasett ,

     

    As the error suggests you need to put null check for the result before processing the array. 

     

    @empty(body('Get_records')?['value']) is equal to true do nothing 

     

    Thanks

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 426

#2
11manish Profile Picture

11manish 345 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 308

Last 30 days Overall leaderboard