Update single SharePoint column in Power Automate with HTTP request
Posted On October 25, 2020
“Is there a way I can update a single column in Power Automate without showing it on the view I use on the update item?“
“I don’t know enough about these HTTP requests to know which pieces are part of the code and which pieces are information that needs to be specific to my site/library.”
There are multiple situations when it’s better to use an HTTP request to update a single SharePoint column than the Power Automate action ‘Update item’.
You don’t want to see all columns in the ‘update’ action as there’re too many. But at the same time, you don’t want to create a special view for each update. Maybe you even have a huge list with view threshold. Or you’re using variables for the site url and list, and the ‘update’ action doesn’t offer you any column.
In all these situations it’s easier to use HTTP request to do the update (unlike some permission setting situations). There are multiple articles or discussion on what the request should look like. But I think most of them overcomplicate it with headers, metadata, type… as on the image below borrowed from here. How can you do it more easily?
Simple HTTP update
As before, start from the ‘Send an HTTP request to SharePoint’ action. The first part will be the same, select a Site Address and Method. But that’s it, now we’ll continue differently.
We’ll add a method to the web service in the Uri. If we end the Uri with ‘/items(<ID>)’, we need to add complicated headers and body to tell the service what to do. But we can tell the service to do an update directly in the Uri by adding ‘/validateUpdateListItem’ method.
As already mentioned above, with the ‘validateUpdateListItem’ method we can keep the headers empty. The service already knows that we want to do an update.
Also the body will be simplified as the method needs just a list of columns to update inside ‘formValues’.
You can take the code from below and use it in your flow, just replace the <placeholders> with your column / value. Use the column internal name, not the display name.
I’d say that the main point of this post is to understand that if the ‘Update item’ doesn’t work for some reason or if it looks complicated, you can always use the HTTP request. And it’s not as complicated as it may seem. I personally am using them in all of my approval / review flows, especially when building approval history table. Every time I need to update one or two columns, HTTP request is my preferred option.