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 / Apply to each failure ...
Power Automate
Unanswered

Apply to each failure due to null value from parsing JSON

(0) ShareShare
ReportReport
Posted on by 13

So I am in the process of trying to build a Flow for Office 365 alerts, one that actually includes the messages and not simply an alert status (those exist out there).  However, the messages portion of the Office 365 Service Communications API, when parsed in Flow, seems to return some Null values in the array.  So whenever I try to run it, I get the error below.  At least, I assume some of the values are null, since I am getting a boatload of output back from MS and it is being parsed.  I have yet to find any kind of definitive answer on how to get the "Apply to each" to simply ignore null values and move on.  Any assistance would be greatly appreciated.  Thank you!

 

Flow.png

Categories:
I have the same question (0)
  • Gristy Profile Picture
    2,429 on at

    I think you would need to do some clean up before the apply to each.

     

    I do not have the exact solution, but i expect you can create an array variable and then add to it for each record in the JSON skipping the ones that are null.

  • v-litu-msft Profile Picture
    Microsoft Employee on at

    Hi @JSGarrett,

     

    You could try these methods, one is creating a condition to determine the output of Parse JSON whether is null by using empty() function or length() function, if you use the empty(), the condition on the right side should null, if using the length, the right side should be 0; the other is use the Configure after run to select has failed, you could set it at the following action, if the output of Parse JSON is null, the apply to each will failed, and then the following action will continue run:

    Annotation 2019-12-09 170557.png

     

    Annotation 2019-12-09 170611.png

     

    Best Regards,
    Community Support Team _ Lin Tu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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 103 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 87

#3
trice602 Profile Picture

trice602 63 Super User 2026 Season 1

Last 30 days Overall leaderboard