Create folders in Google Drive

Hi! I’m trying to create folders in my G Drive based off a Sheet I have. I would like the flow to only create folders that don’t already exist. I’ve tried so many things but none seem to work… Either filtering doesn’t work and it creates only already existing folders or it doesn’t create any at all. I’ve succeeded to retrieve existing folders but not creating the new ones. Any help greatly appreciated!

Here’s an overview of my flow

  • Get rows and get folders actions work well


  • If Condition only retrieves the first two items from the get rows action, I’ve also tried does not contain and does not start with and name is empty

  • When I switch from schema to table view and I click on the expression I see the if looping through the items but retrieving the wrong row

  • I’ve also tried adding a loop but it stops at the third folder

  • If condition only receive 2 items which are the folders already created

You can try this:

This is my Google Sheet:

and got the output as:

1 Like

Thank you so much it worked!!! Do you know by any chance what was wrong with my flow?

It’s hard to say simply from your screenshot as I don’t have your workflow’s JSON to inspect. But on a high level, you needed a loop to work with this effectively, so that’s what I’ve added in my example.

Please consider marking it as a solution if it helped! :slight_smile: