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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Using Power Automate H...
Power Automate
Unanswered

Using Power Automate HTTP Request to update sharepoint list item

(1) ShareShare
ReportReport
Posted on by 21

Hi everyone,

 

I have a SharePoint list that logs all my open tickets. What i would like is to get the most recent comment from each item and then update the text in the SharePoint lists column. Basically showing users latest comments.

 

So far i can get the last comment by using the Send HTTP request "GET" function, how ever how do i add the txt value to the SharePoint list item ?

Sharepoint listSharepoint listHTTP to get the latest commentHTTP to get the latest commentneed to add most recent comment to the itemneed to add most recent comment to the item

 

Categories:
I have the same question (0)
  • v-yetonggu-msft Profile Picture
    Microsoft Employee on at

    Hi @zgregory ,

    Please add a Parse Json to parse the body of Send an HTTP request to SharePoint.

    I did a test for your reference.

    In my scenario:

    vyetonggumsft_0-1713144324483.png

    vyetonggumsft_4-1713144743976.png

    {
     "type": "object",
     "properties": {
     "d": {
     "type": "object",
     "properties": {
     "results": {
     "type": "array",
     "items": {
     "type": "object",
     "properties": {
     "__metadata": {
     "type": "object",
     "properties": {
     "id": {
     "type": "string"
     },
     "uri": {
     "type": "string"
     },
     "type": {
     "type": "string"
     }
     }
     },
     "text": {
     "type": "string"
     }
     },
     "required": [
     "__metadata",
     "text"
     ]
     }
     },
     "__next": {
     "type": "string"
     }
     }
     }
     }
    }

    vyetonggumsft_3-1713144681685.png

    Best Regards,

    Sunshine Gu

  • zgregory Profile Picture
    21 on at

    Hi @v-yetonggu-msft thank you so much for the help.

     

    I am getting an error when im trying to run your flow:

     

    The execution of template action 'Apply_to_each_2' failed: the result of the evaluation of 'foreach' expression '@body('Parse_JSON')?['d']?['results']' is of type 'Null'. The result must be a valid array.

     

     

     

  • v-yetonggu-msft Profile Picture
    Microsoft Employee on at

    Hi @zgregory ï¼Œ

    Please go to the running history and post a screenshot of the output of 'Send an Http Request to SharePoint'.

    I want to know why your Result is empty. Is there a null value in your Comments?

    Best Regards,

    Sunshine Gu

  • zgregory Profile Picture
    21 on at

    Hi @v-yetonggu-msft thanks for the quick response. Just to give you understanding for what i am using the list for.

    The list is basically a ticket system where users raise questions, the comments are used to note down updates on the open tickets, basically keep track of who has done what and so on.

     

    Not all items will have a comment for example if its a new ticket and no action has yet been taken the comments would be blank. What's weird is that even if the item has a comment the result is still null

     

    Output screen shot below for Item 47

     

    zgregory_1-1713960885827.png

     

    This item has a comment:

     

    zgregory_2-1713960943108.png

     

     

  • v-yetonggu-msft Profile Picture
    Microsoft Employee on at

    Hi @zgregory ,

    I'm guessing it's because the Schema code in your Parse Json is wrong.

    Could you please copy me the full schema code in your Parse Json?

    vyetonggumsft_0-1714026543913.png

    Best Regards,

    Sunshine Gu

  • zgregory Profile Picture
    21 on at

    @v-yetonggu-msft please see below, i copied it from the earlier post that you have sent.

     

    This is the schema in the failed run:

     

    {
      "type": "object",
      "properties": {
        "d": {
          "type": "object",
          "properties": {
            "results": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "__metadata": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "uri": {
                        "type": "string"
                      },
                      "type": {
                        "type": "string"
                      }
                    }
                  },
                  "text": {
                    "type": "string"
                  }
                },
                "required": [
                  "__metadata",
                  "text"
                ]
              }
            },
            "__next": {
              "type": "string"
            }
          }
        }
      }
    }

    And this is the schema in the actual flow:

     

     {
    "type": "object",
    "properties": {
    "d": {
    "type": "object",
    "properties": {
    "results": {
    "type": "array",
    "items": {
    "type": "object",
    "properties": {
    "__metadata": {
    "type": "object",
    "properties": {
    "id": {
    "type": "string"
    },
    "uri": {
    "type": "string"
    },
    "type": {
    "type": "string"
    }
    }
    },
    "text": {
    "type": "string"
    }
    },
    "required": [
    "__metadata",
    "text"
    ]
    }
    },
    "__next": {
    "type": "string"
    }
    }
    }
    }
    }
  • zgregory Profile Picture
    21 on at

    @v-yetonggu-msft sorry just wondered if you had any luck with my request 🙂

  • zgregory Profile Picture
    21 on at

    @v-yetonggu-msft  any updates on this please? 🙂

  • v-yetonggu-msft Profile Picture
    Microsoft Employee on at

    Hi @zgregory ,

    There is no error in your code in Parse Json.

    And I observed that the title of the item is filled in your items().

    What needs to be filled in here is the ID of the item.

    vyetonggumsft_1-1715678366211.png

    vyetonggumsft_2-1715678439522.png

    Correct Format:

    vyetonggumsft_0-1715678257891.png

    Best Regards,

    Sunshine Gu

  • zgregory Profile Picture
    21 on at

    Hi @v-yetonggu-msft,

     

    I removed the ID just to test one item which had comments. I have replaced the with ID how ever i am still getting the same error. What i have found some items are working through JSON and the comment is being pulled, for example:

    ID = 89

     

    zgregory_0-1715703919420.png

    How ever ID = 47 has a comment, the comment is "47" but the output is NULL:

    zgregory_1-1715703972902.png

     

    zgregory_2-1715703980651.png

     

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 442

#2
Vish WR Profile Picture

Vish WR 328

#3
David_MA Profile Picture

David_MA 268 Super User 2026 Season 1

Last 30 days Overall leaderboard