cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Merel
Level: Powered On

Compose 1 flow that runs on multiple Sharepoint lists

Hi there,

 

I would like to create a flow that runs through all Sharepoint lists on my Sharepoint subsite and deletes items that are older than X years. Does anyone know if you can create a flow that checks each list without having to add that list manually to the flow? There will be lists added to this site and they all need to be in the scope of the flow, with as little manual updating necessary as possible 🙂

 

Thanks in advance!

 

Merel

2 ACCEPTED SOLUTIONS

Accepted Solutions
v-zhos-msft
Level 10

Re: Compose 1 flow that runs on multiple Sharepoint lists

Hi @Merel ,

It seems you want to get all the lists in your SharePoint subsite.

Then checking each item whether they older than X years. 

I suggest you use the 'Get lists' action of SP.

Capture3.PNG

Best Regards,

Community Support Team _ Zhongys

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
v-zhos-msft
Level 10

Re: Compose 1 flow that runs on multiple Sharepoint lists

Hi @Merel ,

You should use the expression to get the 'Created' here:

Capture.PNG

Best Regards,

Community Support Team _ Zhongys

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

4 REPLIES 4
Super User
Super User

Re: Compose 1 flow that runs on multiple Sharepoint lists

Theoretically this should be something that you can accomplish, althought it isn't possible with the built-in SharePoint connectors. Currently, you must explicitly name the SharePoint list you want to update with the SharePoint Connectors, but if you'd like multiple list selection as a default functionality, you may submit a request here

You could likely do this with custom functions and logical expressions in Flow, utilizing the SharePoint REST API, but as I stated, it would be quite complex. The SharePoint REST web service works great with Microsoft Flow, and allows you to do pretty much anything you want with SharePoint data, you just have to build it. 

For more information about the REST service and Flow, please see the following links: 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. THANKS!

v-zhos-msft
Level 10

Re: Compose 1 flow that runs on multiple Sharepoint lists

Hi @Merel ,

It seems you want to get all the lists in your SharePoint subsite.

Then checking each item whether they older than X years. 

I suggest you use the 'Get lists' action of SP.

Capture3.PNG

Best Regards,

Community Support Team _ Zhongys

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

Merel
Level: Powered On

Re: Compose 1 flow that runs on multiple Sharepoint lists

Hi @Brad_Groux and @v-zhos-msft ,

 

Thank you both very much for your suggestions! I have been playing around with @v-zhos-msft 's suggestion and I hope this will lead me to the final solution. The problem that I encouter is that I cannot seem to load the 'Created' column of the lists in order to be able to filter on items older than X years. See below for my flow. 

 

Do you have any suggestions on how to deal with this? Thanks again in advance!

 

Flow.PNG

 

 

Highlighted
v-zhos-msft
Level 10

Re: Compose 1 flow that runs on multiple Sharepoint lists

Hi @Merel ,

You should use the expression to get the 'Created' here:

Capture.PNG

Best Regards,

Community Support Team _ Zhongys

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

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (4,794)