Reply
Level: Powered On
Posts: 6
Registered: ‎04-04-2017
Accepted Solution

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


Accepted Solutions
Community Support Team
Posts: 4,744
Registered: ‎09-20-2016

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

 

View solution in original post


All Replies
Community Support Team
Posts: 4,744
Registered: ‎09-20-2016

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

 

Level: Powered On
Posts: 6
Registered: ‎04-04-2017

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

Level: Powered On
Posts: 6
Registered: ‎04-04-2017

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!