cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Post Patron
Post Patron

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
Highlighted
Super User II
Super User II

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.

 

Highlighted
Post Patron
Post Patron

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

Highlighted
Super User II
Super User II

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.

Highlighted
Super User II
Super User II

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.

Highlighted
Post Patron
Post Patron

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. 

Highlighted
Post Patron
Post Patron

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

Whoops, forgot to tag you @DeepakS 

Highlighted
Super User II
Super User II

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 🙂

Highlighted
Post Patron
Post Patron

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.

Highlighted
Super User II
Super User II

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.

Highlighted
Post Patron
Post Patron

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

Highlighted
Super User II
Super User II

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.

Highlighted
Post Patron
Post Patron

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

Highlighted
Super User II
Super User II

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Upcoming Events

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Top Solution Authors
Top Kudoed Authors
Users online (7,056)