cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
notj
Level 8

Iterate through libraries on a site, find all checked out documents, notify the person checked out to

I'm trying to iterate through all the libraries on a site, get all the documents that are checked out, then send one notification to each person who has files checked out with a list of the documents they have checked out.

I was using a Get All Lists and Libraries, then a for each to do a Get Items.

Then I was going to follow https://powerusers.microsoft.com/t5/Building-Flows/Invoke-a-trigger-on-check-in-of-document/td-p/960... and do a HTTP Request, but I don't have "Folder Path" or "File name with extension" available in my dynamic content. All I have is Display Name from the Get All Lists and Libraries.

 

Can someone explain how I could do that with a Flow? I feel like I'm missing something obvious here.

13 REPLIES 13
DeepakS
Level 8

Re: Iterate through libraries on a site, find all checked out documents, notify the person checked out to

Hi @notj i think you are missing second request of Get Items for each list/library. Path and File name are properties of an Item not List. Add another Loop to get all items for each list, response will have following properties (Not included all):

"{Link}": "https://<>/Shared%20Documents/Tasks.xlsx?d=w959096a1a0a84a45a409c5eecd70b13e",
"{Name}": "Tasks",
"{FilenameWithExtension}": "Tasks.xlsx",
"{Path}": "Shared Documents/",
"{IsCheckedOut}": false,
"{VersionNumber}": "9.0"
}
You can use IsCheckedOut  flag to know if file is checkout or not. OR you can make a http call.
 

 

 

-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

 

notj
Level 8

Re: Iterate through libraries on a site, find all checked out documents, notify the person checked out to

I have a Get Items for each of the list/library though.

2020-01-08 09_35_46-.png

DeepakS
Level 8

Re: Iterate through libraries on a site, find all checked out documents, notify the person checked out to

Hi @notj 

Get Items returns collection of items so you need to loop through each item to be able to read the properties for an item.

 

 

-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

DeepakS
Level 8

Re: Iterate through libraries on a site, find all checked out documents, notify the person checked out to

@notj  one more point if you are working only on checkout files you should considering filtering your results of Get all lists and libraries with  "Type": "101"  (Only Document Library)

 

 

 

-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

notj
Level 8

Re: Iterate through libraries on a site, find all checked out documents, notify the person checked out to

Ah, OK! Both points make sense.

Can you help me with the notification part? I'd like to send out one email per person who has items checked out, and then list all the items they have checked out inside that one email. 

notj
Level 8

Re: Iterate through libraries on a site, find all checked out documents, notify the person checked out to

Whoops, forgot to tag you @DeepakS 

DeepakS
Level 8

Re: Iterate through libraries on a site, find all checked out documents, notify the person checked out to

Hi @notj, if i answered your original question  could you please mark this completed and lets start another thread , i would be happy to help you on second question too 🙂

notj
Level 8

Re: Iterate through libraries on a site, find all checked out documents, notify the person checked out to

It's actually part of the same problem. I described it in the first part of the original post. Since the notification aspect comes from the results of the items returned it seems like it would be the the same topic.

DeepakS
Level 8

Re: Iterate through libraries on a site, find all checked out documents, notify the person checked out to

Hi @notj 

Check this thread that i replied yesterday (it has a similar requirements) 

https://powerusers.microsoft.com/t5/Building-Flows/Automatically-send-email-based-on-Excel-data/m-p/...  

 

it will help you get the logic. 

 

-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

notj
Level 8

Re: Iterate through libraries on a site, find all checked out documents, notify the person checked out to

@DeepakS I feel like I'm just repeating myself another level in.

 

How do I retrieve the files properties, such as file name, checked out to, url, etc.? Also, is that correct for the ID? I feel like that isn't going to work.


2020-01-08 10_29_28-Window.png

DeepakS
Level 8

Re: Iterate through libraries on a site, find all checked out documents, notify the person checked out to

Hi @notj 

Here is an sample you can refer to:

PA6.png

 

-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

notj
Level 8

Re: Iterate through libraries on a site, find all checked out documents, notify the person checked out to

@DeepakS does that work for you? I've got "IsCheckedOut" and true in the Tracked Properties part of the bottom "Get Items" action but it's still returning items that are not checked out. 

 

2020-01-08 16_06_12-Window.png

DeepakS
Level 8

Re: Iterate through libraries on a site, find all checked out documents, notify the person checked out to

Hi @notj  GetItems will returns all Items , you may need to add a condition and filter only ChekOut files.

Helpful resources

Announcements
firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

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 Solution Authors
Top Kudoed Authors
Users online (4,786)