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

Notifications

Announcements

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
    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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 406 Moderator

#3
abm abm Profile Picture

abm abm 245 Most Valuable Professional

Last 30 days Overall leaderboard