cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JesperTorp
Level: Powered On

how do i check-in document after creation ?

Hi all,

I have a flow which takes a document in a mail and saves it in a folder based on the document name. Everything works great, but the doucument is check-out. I want to add an action that checks in the docvument after creation ...how do i do that ?

 

 

8 REPLIES 8
Community Support Team
Community Support Team

Re: how do i check-in document after creation ?

Hi @ JesperTorp,

 

Do you want to check in the a file in sharepoint library using microsoft flow?

 

Checking in/out a file in sharepoint library is not supported in microsoft flow currently,

I afraid that there is no way to achieve your needs 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

makp
Level: Powered On

Re: how do i check-in document after creation ?

Use Send HTTP request to SharePoint then you can checkin and out

 

In my Flow i update a document library with the URL to which tenant i have copied files, so i do filtering on what is needed to be updated, then i Check out on all the files, update and so on and check in as last step, the reason is in my case Flow can update 1 property 3 times in same flow.

 

And the variables is going to be deleted in my flow, so disregard them its only the value in them there is interesting:

 

_api/web/getFileByServerRelativeUrl('/********/FILE.DOCX')/checkin()

_api/web/getFileByServerRelativeUrl('/********/FILE.DOCX')/checkout()

 

Flow1.PNGFlow.PNG

Administrator
Administrator

Re: how do i check-in document after creation ?

Hello, @JesperTorp!

Have you had an opportunity to apply @v-yuazh-msft‘s recommendation to adapt your Flow? If yes, and you find that solution to be satisfactory, please go ahead and click “Accept as Solution” so that this thread will be marked for other users to easily identify! Thank you for being an active member of the Flow Community!

 

-Gabriel

Flow Community Manager

-Gabriel
Microsoft Power Automate Community Manager
Are YOU a member of your local Power Automate User Group?
Fill out This Form to claim your Community User Group Member Badge!
sayedhaider300
Level: Powered On

Re: how do i check-in document after creation ?

Is there any method of discardcheckout()??

makp
Level: Powered On

Re: how do i check-in document after creation ?

Shahid
Level: Power Up

Re: how do i check-in document after creation ?

Before going to flow, one conern when your file is created in the library,
it seems its get checked out by the flow user(modified by and created by).
It means in your library settings there is a file checked out rule there.
If not checked out required, why we don't remove that rule?

To me rule is here: Library-->Library Settings-->Versioning Settings-->Require Check Out (Yes/No)
If you select No, your document will not be checked out.

BrendanMurphy
Level: Powered On

Re: how do i check-in document after creation ?

@makp , I've tired your recommendation but keep getting an error when trying to check out the document that says: 

"Server relative urls must start with SPWeb.ServerRelativeUrl\r\nclientRequestId: 1b2c18bd-e45b-48ff-8600-c9d6a2381748\r\nserviceRequestId: 1f93de9e-e035-8000-8f19-346734c97f3d"
 
Any idea on why I'd be getting this error?  Here is how my HTTP is setup, however I've tried it about a dozen different ways and always get the same error. 
 
HTTP_Request_Check_Out_File.png
 
HTTP_Request_Check_Out_File_Error.png
 
Highlighted
BrendanMurphy
Level: Powered On

Re: how do i check-in document after creation ?

I figured it out.  I needed to add more of the url.  So this is what I changed the relative url to and it worked. 

 

_api/web/getFileByServerRelativeUrl('/sites/ABT/mgmt/StaffTracking/

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

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 Kudoed Authors (Last 30 Days)
Users online (5,047)