cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
BhanuChintha2
Frequent Visitor

Invoke a trigger on check-in of document

Hello Team,

 

Can you please let me know if there is any option to trigger a flow when a document is checked-in/checked-out/published/minor versio checked-in.

 

Thanks in advance.

 

 

Thanks & Regards,

Bhanu

1 ACCEPTED SOLUTION

Accepted Solutions
bobandted
Advocate I
Advocate I

I managed to achieve this function.  Although the process is a bit convoluted. It does work.

 

Steps are

1. "when file is created or modified"

2. "Send a HTTP Request to SharePoint"

3. Parse JSON

4. Check Condition

5. is status == checked in, then do something, else terminate

 

HTTP URI is:

_api/web/getFileByServerRelativeUrl('/sites/TestFileShare/@{body('Get_file_properties')['{Path}']}@{body('Get_file_properties')['{FilenameWithExtension}']}')/checkOutType

 

t1.PNG

 

 

t2.PNG

 

t3.PNG

View solution in original post

13 REPLIES 13
vecerpa
Memorable Member
Memorable Member

 I'm also interested for answer to this as from description about this trigger there is bigger detail what modified exactly means. But I'm pretty sure that the level you are asking @BhanuChintha2 will not be reached for checking of item.

P.

Laskewitz
MVP

Currently, there aren't any triggers available for this. If you want these as a trigger, make sure to add this to the ideas forum!







Did I answer your question? Mark my post as a solution!


Proud to be a Flownaut!






v-yuazh-msft
Community Support
Community Support

Hi @ BhanuChintha2,

 

To trigger a flow when a document is “checked-in/checked-out/published/minor versio checked-in” in sharepoint document library is not supported in Microsoft flow currently.

If you would like this feature to be added in Microsoft Flow, please submit an idea to Flow Ideas Forum:

https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas

 

 

Regards,
Alice Zhang

deolgoria
Regular Visitor

@BhanuChintha2  I need this same functionality.  Two weeks ago I created an idea for the Flow team here: https://powerusers.microsoft.com/t5/Flow-Ideas/Expose-SharePoint-Library-quot-Checked-Out-To-quot-co...

 

At this point I'm going to have to use an old-style SharePoint workflow until this is implemented.   

 

bobandted
Advocate I
Advocate I

I managed to achieve this function.  Although the process is a bit convoluted. It does work.

 

Steps are

1. "when file is created or modified"

2. "Send a HTTP Request to SharePoint"

3. Parse JSON

4. Check Condition

5. is status == checked in, then do something, else terminate

 

HTTP URI is:

_api/web/getFileByServerRelativeUrl('/sites/TestFileShare/@{body('Get_file_properties')['{Path}']}@{body('Get_file_properties')['{FilenameWithExtension}']}')/checkOutType

 

t1.PNG

 

 

t2.PNG

 

t3.PNG

Thanks for this. 

bobandted
Advocate I
Advocate I

As a follow up - one problem I ran into was if I updated the file properties I ran into the recursion issue whereby the modified file trigger was called again so I was stuck in an infinite loop.  I have resolved this by checking the approved status of my file.  If the file was approved there was nothing for me to do.  1 is approved, so just terminate the flow. One could also check the checkout status or some other variable.

 

x1.PNGx2.PNG

Anonymous
Not applicable

Thanks for the clue...and if you want to get the Approval status (by leveraging the out-of-the box SharePoint content approval feature).. here's how I did it:

 

2019-01-21_15-17-40.jpg

spot28
Frequent Visitor

Simpler Method. In the file properties is a property 'Checked Out'

Capture2.JPG

I get this from the dynamic content and before performing the desired action, check if 'Checked Out' equals false. If it is  then perform the action, otherwise cancel.Capture.JPGo

ALP1
Continued Contributor
Continued Contributor

Thank you i was searching a simpler way to test my condition and i saw your post. Wonderful 😉

@spot28  I've found more success when setting "false" as an expression.

2022-06-16 11_44_37-Window.jpg

morantng
Regular Visitor

Make document library flow process easier by enabling check-out when creating a flow.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (1,690)