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
v-micsh-msft
Community Support
Community Support

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
v-micsh-msft
Community Support
Community Support

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

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.'."

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
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Kudoed Authors
Users online (1,610)