Let's POWER Automate

From no-code to low-code

Menu
  • Expressions
  • Filters
  • General
  • Triggers
  • Application specific solutions
    • Dataverse
    • Excel
    • Forms
    • Planner
    • Outlook
    • SharePoint
    • Teams
  • Resources
  • Get help with flow
Menu

Change editor name for SharePoint item/file update (Power Automate)

Posted on November 3, 2021November 3, 2021 by Tom

“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 >.

Power Automate SharePoint update change name

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.

Power Automate SharePoint update change name

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.


Do you struggle with the various expressions, conditions, filters, or HTTP requests available in Power Automate?

I send one email per week with a summary of the new solutions, designed to help even non IT people to automate some of their repetitive tasks.

All subscribers have also access to resources like a SharePoint Filter Query cheat sheet or Date expressions cheat sheet.

Zero spam, unsubscribe anytime.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Do you know what to do, but not how to do it?

Get The Ultimate Power Automate expressions cheat sheet and translate your thoughts into flows with ease!


NEW! Master the HTTP requests to SharePoint with a new cheat sheet!

Do you struggle with the various expressions, conditions, filters, or HTTP requests available in Power Automate?

I send one email per week with a summary of the new solutions, designed to help even non IT people to automate some of their repetitive tasks.

All subscribers have also access to resources like a SharePoint Filter Query cheat sheet or Date expressions cheat sheet.

Zero spam, unsubscribe anytime.

Hello and welcome!

My name is Tom and I'm a business process automation consultant and Microsoft MVP living in the Czech Republic. I’ve been working with Microsoft technologies for almost 10 years, currently using mainly Power Automate, SharePoint, Teams, and the other M365 tools.

I believe that everyone can automate part of their work with the Power Automate platform. You can achieve a lot by "clicking" the flows in the designer, but you can achieve much more if you add a bit of coding knowledge. And that's what this blog is about.

To make the step from no-code Power Automate flows to low-code flows: using basic coding knowledge to build more complex yet more efficient flows to automate more of your daily tasks.

  • Use Power Automate to forward Outlook events upon registrationJanuary 29, 2023
  • Why the condition is false for the same numbers (Power Automate)January 25, 2023
  • How to forward event invitation to other calendar (Power Automate)January 22, 2023
  • Run ‘For selected item’ flow from non-default environment (Power Automate)January 18, 2023
  • Hide button in SharePoint list after Power Automate flow startedJanuary 15, 2023

Power Automate blogs worth visiting

Damien Bird
Dennis (Expiscornovus)
Paul Murana

©2023 Let's POWER Automate | Theme by SuperbThemes