May 16 2024 12:47 AM - edited May 16 2024 12:47 AM
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?
May 18 2024 07:25 AM
SolutionHi @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.
May 19 2024 12:46 AM
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)
May 20 2024 06:28 AM
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,
May 20 2024 06:31 AM
May 18 2024 07:25 AM
SolutionHi @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.