web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : VbywoAu3X1qIEVzB+A92u0
Power Automate - Building Flows
Unanswered

how do i check-in document after creation ?

Like (0) ShareShare
ReportReport
Posted on 6 Jun 2018 11:10:48 by 5

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 ?

 

 

  • Community Power Platform Member Profile Picture
    on 20 May 2019 at 21:26:58
    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/

  • Community Power Platform Member Profile Picture
    on 20 May 2019 at 21:10:03
    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
     
  • Community Power Platform Member Profile Picture
    on 13 Dec 2018 at 08:44:04
    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.

  • makp Profile Picture
    40 on 15 Nov 2018 at 10:54:20
    Re: how do i check-in document after creation ?

    Should be possible:
    https://msdn.microsoft.com/en-us/library/office/dn450841.aspx#bk_FileUndoCheckOut

  • sayedhaider300 Profile Picture
    8 on 14 Nov 2018 at 12:13:48
    Re: how do i check-in document after creation ?

    Is there any method of discardcheckout()??

  • GabrielStJohn Profile Picture
    on 29 Jun 2018 at 21:20:46
    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

  • makp Profile Picture
    40 on 26 Jun 2018 at 21:11:33
    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

  • v-yuazh-msft Profile Picture
    on 07 Jun 2018 at 02:27:01
    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

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 2

Loading complete