cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SecretAsianMan
Regular Visitor

Workflow to Check-In File that is Checked-Out by another user with no version

Problem: Documents are checked-out by user that has never checked-in document after INITIAL upload.

Looking for: Workflow to automatically check in files regardless of user and version.

Attempt: I've tried screenshot below logic with a recurring workflow running every hour, as well as with a workflow that is triggered by creation or modification. In both scenarios, workflows do NOT see files that are currently checked out by another user's initial upload.

 

CheckinFlow.JPG

 

Is this even possible to do at the moment??

6 REPLIES 6
MarvinBangert
Memorable Member
Memorable Member

Hey @SecretAsianMan 

so, your users create/upload a document in/to a SharePoint library, but there is no first version of that document within your library? The "get files" action only returns documents that either have a first version or are created by you (even if it does not have a first version yet / has never been checked in before). Also there is not REST API to get all documents, that have never been checked out before, checkout this discussion: How to get all the checked out files in a library with rest - Microsoft Tech Community

 

Is there a reason, that the checkin/checkout is enabled within that library, if you don't want to use it? Otherwise you would need to consider to use a manual trigger by the users, so they need to start the flow, you can get all documents checked out by them using "get files" and check them in).

 

Does this help you? Otherwise please give me some more information.

Best regards
Marvin

If you like this post, give a Thumbs up. If it solved your request, Mark it as a Solution to enable other users to find it.

Blog: Cloudkumpel

Hello @MarvinBangert,

 

Thank you for the prompt response. Current situation is this... SharePoint Online document library has the check-in/check-out featured turned OFF. However... when documents are uploaded, they are STILL being automatically checked-out to the user. Have no clue why, so I figured we could create a workflow that would automatically check these documents in. However, workflow is unable to see these initially uploaded currently checked-out files to check them in. Through the Library settings UI, we can see all check-out files and take ownership and check them in, but I am trying to automate this process with workflow. Hope this gives a little more background information.

 

Thank you!

MarvinBangert
Memorable Member
Memorable Member

Hey @SecretAsianMan 

OK, so your setting:

MarvinBangert_0-1636586293481.png

is set to "No" (Library settings - Versioning settings). Do you have any required fields within your library, so the documents are maybe checked out? I would recommend to look for the problem, that the documents are not checked in automatically, rather than looking for a workaround on how to automatically check them in.

 

Does this help you? Otherwise please give me some more information.

Best regards
Marvin

If you like this post, give a Thumbs up. If it solved your request, Mark it as a Solution to enable other users to find it.

Blog: Cloudkumpel

@MarvinBangert that is correct. That setting is set to "No". Additionally, document library uses doc sets and content types, but verified every single field is set to optional other than the "Name" field being set to required. We even used a migration tool, ShareGate, to copy the site to different environment as an attempt to re-create the issue but there were no issues in copied environment with documents automatically being checked out after initial upload which ultimately left me with trying to attempt a workflow solution.

Please_Help_Me
New Member

Struggling with the same as @SecretAsianMan 

Please_Help_Me
New Member

In my case, this only happens when we use Drag & drop functionality, not when going through The upload file (file explorer) option

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (3,587)