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 / How to write a conditi...
Power Automate
Answered

How to write a condition that will determine if body is []

(0) ShareShare
ReportReport
Posted on by 3,347

I have tried to write a condition block to determine if the body in this action is [].  I tried null(), but that did not work.  Is there another way?

 

martinav_0-1708704790846.png

 

Categories:
  • Verified answer
    Ellis Karim Profile Picture
    12,379 Super User 2026 Season 2 on at

    Hi @martinav ,

     

    Try:

     

    length(body('List_files_in_folder'))
     
    If the value return from the length function is 0, then no files were returned by the List_files_in_folder action.
     

    Ellis
    ____________________________________
    If I have answered your question, please mark the post as ☑️ Solved.
    If you like my response, please give it a Thumbs Up.
    My Blog Site
  • martinav Profile Picture
    3,347 on at

    Perfect!  Many 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
11manish Profile Picture

11manish 298 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 289

#3
Henil Profile Picture

Henil 125

Last 30 days Overall leaderboard