MS Automate | Identify all SharePoint files and create row in Excel

Copper Contributor

Hi everyone

 

I am currently working at a flow to identify all documents in a SharePoint Document library and list them in an Excel. After that I would like to filter all files older than 10 years and delete them - but will try this once the following flow works:

 

SandroBe_0-1687342106277.png

 

SandroBe_2-1687341347561.png

 

However, I only get the file saved in this immediate folder and none from subfolders:

 

SandroBe_4-1687341647052.png

 

Plus there is an error in the apply to each (no valid array):

SandroBe_5-1687341701823.png

 

My concrete questions:

1) What do I have to amend that files of subfolders are also listed?

2) How can I create a valid array so that for each found file a new row is created within an Excel document?

 

Many thanks for your kind support and taking your time for me.

Sandro

 

 

1 Reply

@SandroBe 

 

Hi,

 

You can use Information Management Policy settings to delete files older than 10 years 

 

How to delete old documents from a site using retention policies | SharePoint Maven

 

-

If my post was helpful in resolving your issue, kindly click on "Mark as Best Response" and give it a Like. This will make it easier for others to find the correct solution and will also close the item. If you found the post useful in other ways, please consider giving it a Like as well.

 

For SharePoint/Power Platform consulting, please visit the following link: Premkumar T D | LinkedIn