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 / Check if folder is emp...
Power Automate
Answered

Check if folder is empty - "response is not in a JSON format"

(0) ShareShare
ReportReport
Posted on by 304

Hello,

I'm trying to build a flow that checks if a folder in a SP library is empty and if yes, update an element in a list with a blank value.

I found some threads here that did it with the list folder action and a length function in a condition. Somehow for me it already fails at the list folder action. I always get an error saying "the response is not in a JSON format.  The resource you are looking for has been removed, had its name changed, or is temporarily unavailable." But I can confirm that the folder does exist, so I'm confused. I'll share my flow below:

 

LisKr_0-1714638323619.png

 

Some additional info:

The flow is triggered in a PowerApp and the folder name is also handed over through the app (that's "InstructionID"). That works correctly, as I can see in the action input. But still it says that the folder cannot be found. Is it because it is empty? Or is there another mistake?

And would the steps to check if it's empty and update the list element to blank value work like this? The expression I use is the following:

 

 

 

 

#in the condition
length(outputs('Ordner_auflisten')?['body'])

# for updating the list element:
null()

 

 

Edit: the length and null expressions are working. So the only question remaining is the one with the folder name

 

 

 

Categories:
I have the same question (0)
  • LisKr Profile Picture
    304 on at

    So I tried using a static folder name, e.g. "1". Then it works perfectly, so the problem must be the input folder name from the power app.

    What I don't understand, If I trigger the flow from the app with input parameter "1", it throws the error, but if I use static "1" it works. I mean, the folder name and the path are the same in both cases?! Where could that behaviour come from? Or am I missing something?

  • Verified answer
    LisKr Profile Picture
    304 on at

    Found a soultion:

    I changed the flow to using a variable for the folder path and in the list folder action I put the variable into a uriComponent() function. That way seems to work.

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 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard