SOLVED

Bulk Checkin in Sharepoint

Copper Contributor

I want to create a manually triggered flow in Power Automate to check in all files checked out by me in SharePoint, which are located in different folders. Is it possible to have such a flow?

4 Replies
best response confirmed by omergunduz (Copper Contributor)
Solution

Hi @omergunduz - in your document library, create a view:

1. Make it a private view

2. Filter by checked out to = [me]

3. Set Folders option to view all items without folders

 

Create a flow that runs on a regular cadence, I used the 'describe it' feature to get the base of the flow created pretty quickly. Point it to your Library and your view of your checked out items. It can then loop through your items and check them back in. 

@omergunduz 

 

Assuming you want to only look through files within a single Library (the same Library each time) this should get what you're after.

 

For this example, I'm using the following library. There is one document checked out at the root, and another file checked out within the folder called Test.

gjen020_2-1716104178789.png

 

gjen020_3-1716104200856.png

 

See full flow below. I'll go into each of the actions.

gjen020_0-1716104022202.png

 

The trigger is just a Manually trigger a flow without any inputs.

gjen020_1-1716104071535.png

 

Get files (properties only) retrieves the files from your library. I've set Include Nested Items to Yes, Top Count to 5000 (by default Get files will only return the first 100 results) and added a Filter Query to only retrieve files that are checked out to me (the person that ran the flow). Below is the filter applied (note that User email is a dynamic property as part of the trigger.

 

CheckoutUser/EMail eq '@{triggerOutputs()['headers']['x-ms-user-email-encoded']}'

gjen020_4-1716104279656.png

 

Foreach is an Apply to each that iterates over each of the files returned from Get files and checks in each one using the action Check in file. Note that you have different options for how you want to check in the files (Check in type).

gjen020_5-1716104498622.png

 

Hopefully this is what you were after. If not, you might want to repost your query in the Power Automate > Building Flows forum: Building Flows - Power Platform Community (microsoft.com)

Dear @Kelly_Edinger thank you very much for your help. I ve created a new view just following your instructions and it allowed me to make a bulk checkin w/o even running any flow. That is amazing. Thank you again.

 

Regards,

Dear @gjen020 there was a mistake with the filter you suggested, it didnt work for a reason but I ve solved my problem. Thnx for your help!!
1 best response

Accepted Solutions
best response confirmed by omergunduz (Copper Contributor)
Solution

Hi @omergunduz - in your document library, create a view:

1. Make it a private view

2. Filter by checked out to = [me]

3. Set Folders option to view all items without folders

 

Create a flow that runs on a regular cadence, I used the 'describe it' feature to get the base of the flow created pretty quickly. Point it to your Library and your view of your checked out items. It can then loop through your items and check them back in. 

View solution in original post