Sometimes you need to do a SharePoint REST call instead of using out of the box actions in Power Automate.
- You want to write to multiple libraries by defining a dynamic site address
- You get a “too many lookups” error when using the out of the box SharePoint “Update item” action
This is not always easy. Complexity depends on the column type.
Another important factor is if you use a document library or list. The content of your REST call body will depend on that.
Writing to a SharePoint single line of text & multiple lines of text column in a SharePoint list
Your action should look like below. Make sure to replace the “SP.Data.TicketsListItem” in the body with your list specific value.
You can find your list specific value by going to this URL: [Fill in your SP site URL here]/_api/web/lists/getByTitle(‘[Fill in your list name here]‘)/items(1)
In the outcome, search for “SP.Data…”, copy it and paste it into the right place in the body.
Writing to a SharePoint singe line of text & multiple lines of text column in a SharePoint document library
Writing to a document library is a bit different. Remark that the end of the SP.Data value is different. For a list it is the name of the list + ListItem. For a document library it is the name of the document library + Item.
Again, go to [Fill in your SP site URL here]/_api/web/lists/getByTitle(‘[Fill in your list name here]‘)/items(1) to find the correct value:
I will update the blogpost for more column types in the future:
- Choice column
- People column