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 / Create folder if does ...
Power Automate
Answered

Create folder if does not exist then insert create file/If folder exist insert create file

(0) ShareShare
ReportReport
Posted on by 1,151

HI All
I hope everyone is doing ok 🙂
I need some help with a flow i am creating which has me confused.

my desired scenario is
When list item created
Check if folder exists
If does then insert new create file (html)
if not create Folder then insert create file (html) file

I have searched and read numerous post to this forum and others , read blogs and tried to create my requirement from the examples they provide.
So here is my flow  so far

gazzo1967_5-1606866645055.png

All works fine 🙂

gazzo1967_6-1606866713207.png

next

gazzo1967_7-1606866790235.png

 

 

My issue is that on list folder i get a 'The response is not in a JSON format.' and it says resource not there but it is because on the first test run inserting a sharepoint list item it created the folder! (still has the same fault on List Folder though)

gazzo1967_8-1606866901456.png

So it creates the folder again!

gazzo1967_9-1606866956350.png

 


My FolderName Variable is is

gazzo1967_10-1606867122698.png

Dynamic content is a Person field and  from share point list 'get item'

 

My List folder  is this

gazzo1967_11-1606867198948.png

 

Path  is the Get folder metadata

so
my first pass creating a list item creates a folder if not there!
But if i then create another item with the FolderName with the same data (the reviewer.displayname the same) the condition runs but staes there s no folder when there is so runs the false condition again 😞

The email functions are just for testing 

Must of this was taken adapted from @abm  blog post

Help would be gratefully received 🙂
Gary 

Categories:
I have the same question (0)
  • Verified answer
    v-litu-msft Profile Picture
    on at

    Hi @gazzo1967,

     

    There is no need to confirm the folder if it exists.

    You could use the Create file action directly to create a folder if it does not exist, if exists, then it will create the file under the folder, for example:

    Screenshot 2020-12-02 160354.jpg

     

    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.

  • gazzo1967 Profile Picture
    1,151 on at

    @v-litu-msft 
    So simple...
    Thank you

  • jaiswalmayurMJ Profile Picture
    3 on at

    Thank you, you are are timesaver.

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