Forum Discussion
Bulk Checkin in Sharepoint
- May 18, 2024
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.
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.
See full flow below. I'll go into each of the actions.
The trigger is just a Manually trigger a flow without any inputs.
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']}'
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).
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)