Power Automate SharePoint list comments

If you and your team are using the Check-out feature in SharePoint, then you will definitely benefit from this tip I am about to share in this article. In this post, I would like to explain how you can display the last check-in comment in a document library.

Check In/Check Out feature

While I am all for real-time collaboration and co-authoring, Check out feature still has its place. It allows the user to lock the document for editing. If you want to learn more about the check-out feature, read this post.

Check-in Comment

One of the “bonus” advantages of the check-in feature is that you can leave an optional comment when checking in the document. This can be a great business practice to let others know what exactly you did to the document.

Accessing Check-in Comment

The primary way to access the Check-in Comments would be via the Version History. This allows the user to see check-in comments for all the versions that exist.

Display the last check-in comment in a document library

Here is another cool trick you can take advantage of. Instead of navigating to the Version History all the time, you can display that last check-in comment in a library as a column. Here is how.

  1. Within the library, click +Add Column, then choose Show/Hide columns
  2. Check the box next to Check In Comment and click Apply
  3. The column will now be displayed at the library view

In this tutorial, I’ll show you how to disable comments on a SharePoint modern page using Power Automate. This is extremely handy when you are creating pages based on a template using a flow. Even if you have already disabled comments on the template page, it will not stay disabled on the copied page.

Time to read: About 5 minutes
Intended for: SharePoint developers who use Power Automate
Key takeaway: In this tutorial I will demonstrate how to disable comments on a modern SharePoint page.

For this tutorial, we will be using Office 365 SharePoint Online and Power Automate.

**Click on any of the images to see a larger view**
Step 1 – Create a new flowIn Power Automate, select “My Flows”, click on the “New” drop down, and then click on “Instant-from blank”:

Name the flow “Disable Comments”, select “Manually trigger a flow”, and then click on the “Create” button:


Step 2 – Add actionsClick on the “+ New step” button, search for the “Get file metadata” action, and add it:

Select the Site Address from the drop down menu:

Click on the folder icon in the “File Identifier” field, and then click on the right arrow:

To select a page that you would like to disable the comments on, scroll down and select the page. For our example, I am selecting a page entitled PageTestOne.aspx:

Click on the “+ New step” button, search for the “Send an HTTP request to SharePoint”, and then click on it to add it:

Select the “Site Address” and set the “Method” as “POST”:


Copy the following URI and put it in the “Uri: field:

Code zealot in a connected world

Out of curiosity, and because I think listing outstanding comments might be a product feature in Flow Studio, I did some research, experimenting with REST query and general exploring on a late Friday night. This was done on Twitter, a bunch of people chipped in but also we ended up with pictures all over the place. This blog post is to collect everything in one place as a reference.

The record is stored as a top level Container [with an artifactid]

Then top level records [kind=Threads] with Container[commentid = containerid]
Then records [kind=Reply]

We can query Dataverse to get the rows back. Here’s how to do it in one request.


We can query Dataverse comments from WITHIN the flow about the current flow [via workflow[].name expression]

I think this fulfills some sort of inception criteria

This also qualifies this research to be #FlowNinja hack 125

Here is a Reply record.

Comments are tied to an Anchor - which is an action within the Flow.
The corresponding Flow has metadata.operationMetadataId created as a reference when this happens.

Comments can be resolved [state =1, Resolved] or deleted [statuscode = 2, Inactive].

I expect the same data structure design will be suitable for other Power Platform products, so I’m keen to see it.

Video liên quan

Chủ Đề