cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Melakh Advocate II
Advocate II

Comparing File Lists

Hi,

 

I'm trying to use Flow to download all files that don't exist in a target directory (to get around the issue that the Google Drive connector doesn't have a trigger for File Created).

 

Open to a better solution, but what I'm trying (and am stuck with) is:

 

  1. Use a "List files in folder" for File System Task to retrieve an array of files
  2. Use a "List files in folder" for Google Drive to retrieve an array of files
  3. Use some form of filter array on #1 and #2 to result in only items that are in array 2 but not in array 1
  4. Use output of #4 to download the relevant files

Could anyone help me work out how to do step #3?

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Re: Comparing File Lists

Hi @Melakh,

 

So here the issue is you would like to create new file in File system for the files newly added in Google Drive, right?

For your situation, we could add the filter array within the Apply to each, follow the example below:

36.PNG

 

Things you should note:

The folder under Google Drive should not contain any subfolders, if there are any, it will cause the flow to a fail status, but won't affect the process. The file uploaded into that folder could be created in the File System successfully.

 

Regards,

Michael

 

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Community Support
Community Support

Re: Comparing File Lists

Hi @Melakh,

 

So here the issue is you would like to create new file in File system for the files newly added in Google Drive, right?

For your situation, we could add the filter array within the Apply to each, follow the example below:

36.PNG

 

Things you should note:

The folder under Google Drive should not contain any subfolders, if there are any, it will cause the flow to a fail status, but won't affect the process. The file uploaded into that folder could be created in the File System successfully.

 

Regards,

Michael

 

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Melakh Advocate II
Advocate II

Re: Comparing File Lists

Thanks.

 

I gave that a go but the @empty(body('Filter array')) step appears not to validate when saving. I get the error message: "The template validation failed: 'The action(s) 'Filter array' referenced by 'inputs' in action 'Condition' are not defined in the template.'."

Melakh Advocate II
Advocate II

Re: Comparing File Lists

Worked it out, i was missing the underscore, the posted image was too blurry to see it properly. Works now, thank you!

Helpful resources

Announcements
firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Users online (8,100)