Power Automate : Update Author and Editor of a Page
This post outlines how to use Power Automate to update author and editor of a Page within SharePoint using the Send an Http request to SharePoint action
.
Within a Power Automate flow, follow the following steps
- Add
Send an Http request to SharePoint
renamed toUpdate Author
Properties
Property | Value |
---|---|
Site Address | The SharePoint site URL |
Method | POST |
Uri | See Uri below |
Headers | See Headers table below |
Body | See Body below |
Uri
_api/web/lists/GetByTitle(‘Site%20Pages’)/items(1)/ValidateUpdateListItem()`
Headers
Name | Value |
---|---|
Accept | application/json; odata=nometadata |
Content-Type | application/json; odata=verbose |
Body :
{"formValues":[{"FieldName":"Author","FieldValue":"[{'key':'@{body('Parse_JSON_Author_Details')?['d']?['LoginName']}'}]"},{"FieldName":"Editor","FieldValue":"[{'key':'body('Parse_JSON_Author_Details')?['d']?['LoginName']}']"}],"bNewDocumentUpdate":true,"checkInComment":null}
example of body compiled: {"formValues":[{"FieldName":"Author","FieldValue":"[{'key':'i:0#.f|membership|Reshmee.Auckloo@contoso.co.uk'}]"},{"FieldName":"Editor","FieldValue":"[{'key':'i:0#.f|membership|Reshmee.Auckloo@contoso.co.uk'}]"}],"bNewDocumentUpdate":true,"checkInComment":null}
By following these steps, you can update the author and editor fields in a SharePoint list item using Power Automate. This is particularly useful for automating the management of SharePoint content and ensuring that the correct user details are recorded.