Use Flow to Update SharePoint Hyperlink Field

If you want to update a hyperlink field in SharePoint Online using Flow, you will need to use the Send an HTTP request to SharePoint action (for now). I first tried using the Update item Flow action but it would not correctly set the URL and Description values. One other issue I had was using the Post method as opposed to Patch. Every blog/forum post was suggesting the use of the Post method but the Patch method is what I ended up using.

For testing, create a list titled Contractors, in the list add a Hyperlink field titled website. In your Flow add a Send HTTP request to SharePoint action.

Site Address: select the site you created the Contractors list in.
Method: PATCH
Uri: _api/web/lists/getbytitle(‘Contractors’)/Items(‘ID From above Action’)
Accept application/json
Content-Type application/json; odata=verbose

'__metadata': { 'type': 'SP.Data.ContractorsListItem' },
          '__metadata': {'type':'SP.FieldUrlValue'},
               'Description':'Title from above Action',
                'Url': ''

Peek code:

    "inputs": {
        "host": {
            "connection": {
                "name": "@parameters('$connections')['shared_sharepointonline']['connectionId']"
        "method": "post",
        "body": {
            "method": "PATCH",
            "uri": "_api/web/lists/getbytitle('Contractors')/Items('@{triggerBody()?['ID']}')",
            "headers": {
                "Accept": "application/json",
                "Content-Type": "application/json; odata=verbose",
                "X-HTTP-TYPE": "MERGE",
                "IF-MATCH": "*"
            "body": "{\n'__metadata': { 'type': 'SP.Data.ContractorsListItem' },\n   'website':\n   {\n          '__metadata': {'type':'SP.FieldUrlValue'},\n               'Description':'@{triggerBody()?['Title']}',\n                'Url': ''\n  }\n}"
        "path": "/datasets/@{encodeURIComponent(encodeURIComponent(''))}/httprequest",
        "authentication": "@parameters('$authentication')"
    "metadata": {
        "flowSystemMetadata": {
            "swaggerOperationId": "HttpRequest"

Leave a Reply

Your email address will not be published.