“I don’t want my name to appear at every SharePoint item update the Power Automate flow does, how can I change it, e.g. to keep the last editor name?”
When you build an automated flow with Power Automate, each flow run will use the same connectors. That means, each action in the flow will be performed under the same account. It can be your account, or a service account, but it’ll be always the same one. Which might be inconvenient if it’s your personal account. Every action the flow does will appear as if it was done by you. If you update items or files in SharePoint, you’ll be recorded as the last editor. Your name will stay forever in the item/file history, and people might start asking why are you there.
Merge all the updates together
One approach to this problem is to perform updates without creating new versions. You can use the HTTP request for all the updates to merge them together. At the end there’d be only a single item / file version. But building a flow where all updates are done with an HTTP request might be challenging.
Change the editor name
The other approach is to use the standard ‘Update…’ actions, and change only the editor name later.
Firstly, use the ‘Update item’ or ‘Update file properties’ action to comfortably define all the updates. This update will create a new item / file version, with your connection as the editor.
Then add the ‘Send an HTTP request to SharePoint’ action. In this action you’ll use the same request as mentioned above, but this time only to change the editor name. It’s the same request as when updating people picker column, but the FieldName is fixed. It’s the ‘Editor’ you want to update.
Method: POST
Uri:
_api/web/lists/GetByTitle('<ListName>')/items(<ItemID>)/validateUpdateListItem
Body:
{
"formValues":[
{
"FieldName": "Editor",
"FieldValue": "[{'Key':'i:0#.f|membership|<editor email>'}]"
}
],
"bNewDocumentUpdate": true
}
Note: < … > are placeholders, replace them including the < and >.
The HTTP request will update the Editor and merge it together with the previous update. The outcome is an update shown under the other account, for example account of the user who last modified the item.
Use shared mailbox as the editor
If you don’t want to use an existing user as the ‘visible’ editor, you can use a dedicated account. While it might be not easy to get another account in your organisation, it’s often very simple to create a shared mailbox. And shared mailbox is a valid account which you can use as the editor!
Summary
It doesn’t have to be your name for every SharePoint update your Power Automate flow does, you can change it. You can either merge all the updates together, or change only the editor later. The part I like the most is that you can use a shared mailbox as the editor. You can have just one mailbox to send notifications AND to use it as an editor, and it’ll be always clear that the actions were done by the flow.
Hi Tom, this is exactly what I’m looking for. I’m updating a document library with a workflow and I want the Modified By (Editor Field) to be updated to the person who last updated the file that triggered the workflow.
Before the Update file properties run I do a compose action to grab the last Editor and then in the Send HTTP request I put the compose in the where the key should be:
“FieldValue”: “[{‘Key’:’i:0#.f|membership|’}]” (without brackets)
My Body Output looks like this:
Body:
{
“formValues”:[
{
“FieldName”: “Editor”,
“FieldValue”: “[{‘Key’:’i:0#.f|membership|Stephen.Morley@Dal.Ca’}]”
}
],
“bNewDocumentUpdate”: true
}
Which appears to work because that is my email.
In the Output section when the flow runs I get a 400 error, with a message of
“Value cannot be null. \r\nParameter name: formValues\r\nclientRequestId: 81e408b0-e531-40fd-8339-c6b12daab7d6\r\nserviceRequestId: 33084ba1-908f-6000-5391-fc2cb59c40fd”,
Any thoughts?