Monday, March 23, 2020

Crash Course: HTTP to SharePoint in Power Automate

Today we are taking a crash course in the HTTP to SharePoint action in Power Automate.  There's a lot we could talk about to get you up to speed, but at the end of the day you just really need to know how to do the thing.  I've provided super quick explanations, but most importantly I've given you screenshots to use as a reference guide when getting started.
For a condensed, 30 minute overview in video format, check out my session from the Microsoft Power Platform Online Conference 2020!  Don't miss the bonus tips at the end!

HTTP GET

The GET method retrieves items from SharePoint and can be used with or without a specific ID.  Without an ID you'll return all items; with an ID, you'll return only that specific item.

GET All Items


GET Single Item


HTTP POST

The POST method sends data to SharePoint to create an item.  Send metadata to SharePoint using the Body section.  No need to supply values for all fields in the list; just create the item with required metadata.


HTTP PATCH

The PATCH method sends data to SharePoint to update an item.  This method is tricky, and there are a few extras you need to supply:

  • Specify the item to update by adding the ID to the end of your URI 
  • Add the IF-MATCH header with an asterisk (*) to represent an e-tag
As with the POST method, you don't need to supply values for all fields, just the ones you'd like to update.


HTTP DELETE

The DELETE method does exactly that!  Remember, this is permanent and deletion should only be done programmatically when necessary for a business process.

Don't test using production data! 


If you want additional explanations and some fun examples, here are links to the SharePoint & HTTP videos I've made with Jon Levesque: