I’ve been doing a lot of work with Microsoft Flow lately and I came across a situation where I needed to make a call to the SharePoint REST API to move a list item from one folder to another. There’s currently no move action in Flow but there is a moveTo function in the REST API.
I did some Googling and I found several posts that showed how to register an add-in, make app-only permissions requests for the add-in, trust the add-in, and then use the HTTP action in Flow to get the bearer (access) token using the add-in Client ID and Secret so you could then use the HTTP action to make the REST API call. I followed the steps described in the posts and was able to make the REST API call to move the list item. This is one example of the posts to which I’m referring: How to Call the SharePoint REST Webservice from Microsoft Flow.
A short time later I was looking for something else when I noticed the ‘Send an HTTP request to SharePoint’ action. This action could have been named ‘Make a SharePoint REST API Call’ because that is exactly what it enables you to do – without having to go through all the setup described above.
In the example below I’m using the ‘Send an HTTP request to SharePoint’ action to execute a CAML query. Note that I am not passing the form digest in the headers. This is not required from what I’ve seen so far.