0

Problem Statement: I am trying to add comments to a SharePoint list item using Power Automate. For this, I used the "Send an HTTP request to SharePoint" action. However, my flow fails with the following error:

Action 'Send_an_HTTP_request_to_SharePoint-copy' failed: {"odata.error":{"code":"-1, Microsoft.SharePoint.Client.ResourceNotFoundException","message":{"lang":"en-US","value":"Cannot find resource for the request Commnets."}}

Steps I Took:

  1. I created a flow in Power Automate.
  2. I added a "Send an HTTP request to SharePoint" action with the following settings:
  • Site Address: <Your Site URL>
  • Method: POST
  • Uri: _api/web/lists/getbytitle('Project Tracker')/items(<Item ID>)/Comments
  • Headers:
  • Content-Type: application/json
  • Body
{
    "text": "This is a comment."
}

The error suggests that the resource "Commnets" cannot be found. I double-checked my endpoint URL, but the issue persists.

  1. What am I doing wrong?
  2. Is there a different API endpoint I should use for adding comments to SharePoint list items?
  3. Are there any specific permissions required for this action?
  • I am working with a modern SharePoint Online list named "Project Tracker."

  • I have full control permissions on the list.

Any guidance or suggestions would be greatly appreciated. Thank you!

1
  • Check your spelling for "comments". Commented Nov 27, 2024 at 19:55

1 Answer 1

0

After investigating, I discovered the issue was caused by a typo in the endpoint URL. I had written Commnets instead of Comments. Correcting the typo resolved the issue.

Here’s the corrected configuration that worked for me:

HTTP Request Configuration

Method: POST

Endpoint:

_api/web/lists/getbytitle('Project Tracker')/items('ItemID')/Comments

Headers:

{
    "accept": "application/json;odata=verbose"
   
}

Body:

{
    "text": "This is a new item."
}

I hope this helps anyone facing a similar issue! If you have any further questions or suggestions, feel free to share them in the comments below. 😊

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.