How to Add Comments to SharePoint List Items Using Power Automate?

While working on a SharePoint list, you might want to keep track of updates, changes, or feedback on specific items. SharePoint lists have a built-in comments feature, but what if you could automate this process? For example, adding a comment automatically when the status of a task changes.

With Power Automate, we can set up a flow to add comments to list items automatically. This makes it easy to log updates and add timestamps without doing it manually.

In this tutorial, I will show you how to add comments to SharePoint list items using Power Automate. I will also explain how to add comments with mentions and retrieve comments using Power Automate.

Add Comments to SharePoint List Items Using Power Automate

Imagine you are managing tasks in a SharePoint list called Task Tracker, which includes columns like Task Name, Assigned To, Due Date, and Status.

power automate add comment to sharepoint list item

Every time the Status of a task changes (e.g., from In Progress to Completed), you want to add a comment to the item that logs the new status along with the date and time of the change.

Now follow the below steps:

1Create an automated cloud flow. Give the flow name and select the trigger When an item is created or modified. Also, provide the Site Address and List Name.

Mention multiple people in list item comments using Power Automate

2. Then add a Send an HTTP request to SharePoint action from sharePoint Connector with the below parameter:

  • Site Address: Select the SharePoint Site Address
  • Method: Select “POST” as the method
  • URI: Provide the below URI:
_api/web/lists/getbytitle('List Name')/items(' ItemID ')/Comments

Change the List Name and ItemID to match your list names.

  • Header: Use the below headers to make REST API calls to SharePoint:
accept: application/json;odata=verbose
  • Body: Provide the below JSON format:
{
    "text": "Status changed to @{triggerBody()?['TaskStatus/Value']} on @{formatDateTime(utcNow(),'yyyy-MM-dd at HH:mm tt')}."
}
Mention people in list item comments using Power Automate flow

You can provide your comments.

Now, it’s time to save the flow. Click on Test -> Select Manually. Add or Update items to the SharePoint list.

Add Comments to SharePoint List Items in Power Automate

Once the flow runs successfully, refresh the SharePoint list, and you will see the added comment.

how to Add Comments to SharePoint List Items in Power Automate

Add Comments with Mention People in SharePoint list Item Comments using Power Automate

In this example, I am using the same Task Tracker list, but now I want to mention the person assigned to the task in the comment so they get notified about the status change.

Now follow the below steps:

Create an automated cloud flow with a trigger: When an item is created or modified. Then add a Send an HTTP request to SharePoint action from sharePoint Connector with the below parameter:

  • Site Address: Select the SharePoint Site Address
  • Method: Select “POST” as the method
  • URI: Provide the below URI:
_api/web/lists/getbytitle('List Name')/items(' ItemID ')/Comments

Change the List Name and ItemID to match your list names.

  • Header: Use the below headers to make REST API calls to SharePoint:
accept: application/json;odata=verbose
  • Body: Provide the below JSON format:
{
    "text": "Status changed to @{triggerBody()?['TaskStatus/Value']} on @{formatDateTime(utcNow(),'yyyy-MM-dd at HH:mm tt')}. @mention{0}, please review.",
"mentions": [
        {
            "email": "@{triggerBody()?['AssignedTo/Email']}"
        }
    ]
}
Add Comments with Mention People in SharePoint list Item Comments using Power Automate

Now, it’s time to save the flow. Click on Test -> Select Manually. Add or Update items to the SharePoint list.

How to Add Comments with Mention People in SharePoint list Item Comments using Power Automate

Here, I changed the status In Progress to Completed.

Add Comments with Mention People in SharePoint list Item Comments in Power Automate

Once the comment has been added, the mentioned users will receive a mail like below:

Mention multiple people in SharePoint list item comments using Power Automate flow

If you want to mention multiple people, then you use below:

{
   "text": "Your Comment @mention{0} and @mention{1}",
   "mentions": [
      {
         "email": "Email Address"
      },
      {
         "email": "Email Address"
      }
   ]
}

Get Comments to SharePoint List Items Using Power Automate

In the two examples above, we saw how to add comments to SharePoint list items using Power Automate. Now, let’s see how to retrieve those comments.

Now follow the below steps:

1. In the Power Automate, click the Instant Cloud flow, enter the Flow name, and choose the trigger flow (i.e., manually trigger a flow).

Get Comments to SharePoint List Items Using Power Automate

2. Add a Send an HTTP request to SharePoint action from sharePoint Connector with the below parameter:

  • Site Address: Select the SharePoint Site Address
  • Method: Select “GET” as the method
  • URI: Provide the below URI:
_api/web/lists/getbytitle('List Name')/items(' ItemID ')/Comments

Change the List Name and ItemID to match your list names.

  • Header: Use the below headers to make REST API calls to SharePoint:
accept: application/json;odata=verbose
Get Comments to SharePoint List Items in Power Automate

Now save and run the flow. Once you run the flow, click Send an HTTP request to SharePoint and copy the body:

how to get comments of a sharepoint list item in power automate

3. Add a Parse JSON action and provide the below parameter:

  • Content: Select the body(Send an HTTP request to SharePoint action) from the dynamic content.
  • Schema: To add the schema, click on ‘Generate from sample’, paste the copyed code, and then click ‘Done’. The schema will now be generated and visible.
power automate sharepoint list comments

4. Add a compose action and provide Inputs parameters as Body text from dynamic content:

It will automatically add a for each loop.

power automate sharepoint list add comment

Now save and run the flow. Once your flow runs successfully, you can see the comment in the compose action:

Here, the item has two comments.

How to Get Comments to SharePoint List Items Using Power Automate

Conclusion

In this tutorial, I covered how to automate adding comments to SharePoint list items using Power Automate. I explained how to add comments with the status update and timestamp whenever a task’s status changes in the Task Tracker list. We also explored how to mention the person assigned to the task in the comment so they get notified. Additionally, we went through the steps for retrieving comments from the SharePoint list item.

>

Build a High-Performance Project Management Site in SharePoint Online

User registration Power Apps canvas app

DOWNLOAD USER REGISTRATION POWER APPS CANVAS APP

Download a fully functional Power Apps Canvas App (with Power Automate): User Registration App

Power Platform Tutorial FREE PDF Download

FREE Power Platform Tutorial PDF

Download 135 Pages FREE PDF on Microsoft Power Platform Tutorial. Learn Now…