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
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (1,487)