I wanted to dynamically set a column with hyperlink text in Power Automate on a SharePoint List and a SharePoint Document list

I will explain below the different code to reference for either list type

How to Post to a SharePoint Document List

Add an action called Send an HTTP request to SharePoint

  • Site Address – Will be your SharePoint List
  • Method – Will be POST or PATCH (I have not looked up the difference yet but both worked)
  • Uri:
_api/web/lists/GetByTitle('Document List Name')/items(ID)
  • Headers (you can change verbose to nometadata for cleaner output if you want):
"Content-Type": "application/json;odata=verbose",
"X-HTTP-Method": "MERGE",
"IF-Match": "*"
  • Body:
{'__metadata': {'type':'SP.Data.Document_x0020_List_x0020_NameItem'},

'Description': 'Succeeded',

A couple things to explain in the body:

How to Post to a SharePoint List

The process is identical to above except one minor thing in the Body

Here is the correct body:

{'__metadata': {'type':'SP.Data.Document_x0020_List_x0020_NameListItem'},

'Description': 'Succeeded',

Can you see the difference?

It is on the first line:

Document Body Code – {'__metadata': {'type':'SP.Data.Document_x0020_List_x0020_NameItem'},
List Body Code – {'__metadata': {'type':'SP.Data.Document_x0020_List_x0020_NameListItem'},

SharePoint Document Lists use Item after the name of your library
SharePoint Lists use ListItem after the name of your list

How to Find your Decoded SharePoint List Name

After putting in all the above code before trying it out change the method to GET then run the flow

Here is a real world example of a list called CRM Order Mistakes (Look at the name after type)

How to Find your Decoded SharePoint Column Name

You can find your column name in the output above but here is another way

Go to your SharePoint Site and open your Document Library or List

Click the gear in the corner and selected Library settings then click More library settings

In this example I want to find the real name of Project ID so I will click that in the Columns section

Now in the URL you can see the real name which is Project_x0020_ID