cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PeKi72
Post Patron
Post Patron

How to change the Author in the author column of Sharepoint list with Power Automate

Hi,

I have made this flow to change the name of the author in the author column of a sharepoint list.

The flow runs but doesn't change anything. What am i doing wrong?

 

PeKi72_0-1654026898465.png

Gr. P

2 ACCEPTED SOLUTIONS

Accepted Solutions
RobElliott
Super User
Super User

You're not doing anything wrong, as far as I am aware it's not possible to change the author.

 

Rob
Los Gallardos
If I've answered your question or solved your problem, please mark this question as answered. This helps others who have the same question find a solution quickly via the forum search. If you liked my response, please consider giving it a thumbs up. Thanks.

View solution in original post

PeKi72
Post Patron
Post Patron

This is the solution:

 

PeKi72_0-1667122866554.png

Gr. P

 

View solution in original post

12 REPLIES 12
RobElliott
Super User
Super User

You're not doing anything wrong, as far as I am aware it's not possible to change the author.

 

Rob
Los Gallardos
If I've answered your question or solved your problem, please mark this question as answered. This helps others who have the same question find a solution quickly via the forum search. If you liked my response, please consider giving it a thumbs up. Thanks.

Yes it is possible. My flow works now and changes the author or editor field. I had a syntax error in my JSON-code

thank you for your response. Gr .P

ajaysaba
Frequent Visitor

Hello Peki72,

 

Can you please explain in detail that how to Change the author name in the author field in SP List. Can you please also share your corrected JSON format? Thank you

John1
Frequent Visitor

Can you please post your working JSON as I've been struggling with this for months now. Many thanks!

PeKi72
Post Patron
Post Patron

This is the solution:

 

PeKi72_0-1667122866554.png

Gr. P

 

Thanks @PeKi72 this is really good, but I'm getting a "not well formed JSON" error. Could you possibly copy ad paste the body JSON code up here please so we can copy it (replacing anything you don't want us to see with xxxx). I've made some basic mistake somewhere but can't immediately see it.

 

Rob
Los Gallardos

PeKi72
Post Patron
Post Patron

{
"formValues":[
{
"FieldName": "Author",
"FieldValue": "[{'Key':'i:0#.f|membership|xxxxxxxxxxxxxx'}]"
},
{
"FieldName": "Editor",
"FieldValue": "[{'Key':'i:0#.f|membership|xxxxxxxxxxxxxx'}]"
}
],
"bNewDocumentUpdate": true
}

 

Gr. P

The xxxx is the email-address from you or another person you which to change the picture from.

The JSON code is for both the Author and Editor. And you have to specify in you Power Automate 

flow the Row ID from the Sharepoint list where you want to change the picture. Gr. P

John1
Frequent Visitor

Thanks for sharing your solution. 
I was able to get this (and variations in other threads) working for both Author and Editor of a List, however only for Editor for a Library (including Site Pages).

I suspect it's because Author is a read-only field, but then I would expect this to be consistent across both Libraries and Lists? In any case it's beyond my level to resolve, which feels like bitter defeat xD

 

My use case is that I'm using POST to create site pages from a template, however, this also copies the Author and Created Date of the template. That poor person gets all the "Likes" and "Comments", and I'm trying to set Author to the person who runs the workflow (i.e. the owner of the news post, not the template).

@John1 for the same reason as you I have wanted to change the Author of pages in the Site Pages library. Having tested it yesterday I can say that @PeKi72 's solution does work for the Site Pages library. However, I don't know if this works when you first create the page which is what I think you are trying to do. I suspect it has to be done immediately after the page is created which is what we will be doing via a JSON-formatted button on each item in the Site Pages library.

 

 

The flow looks like this:

 

1-Flow.png

 

{
  "formValues": [
    {
      "FieldName": "Author",
      "FieldValue": "[{'Key':'i:0#.f|membership|p@{triggerBody()['number']}@xxx.co.uk'}]"
    },
    {
      "FieldName": "Editor",
      "FieldValue": "[{'Key':'i:0#.f|membership|p@{triggerBody()['number']}@xxx.co.uk'}]"
    }
  ],
  "bNewDocumentUpdate": true
}

 

The button is shown below, it's a single line of text column:

0-SP-list.png

 

 

Format the column in advanced mode and add the following JSON, changing the ID of the flow, the text you want etc.

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
  "elmType": "button",
  "txtContent": "Change Author to Page Contact",
  "customRowAction": {
    "action": "executeFlow",
    "actionParams": "{\"id\": \"50097cde-b800-4c6c-ade9-95be7574f4e5\",\"headerText\":\"Change Author to Contact\",\"runFlowButtonText\":\"Go\"}"
  },
  "style": {
    "background-color": "#cf000f",
    "color": "white",
    "border-radius": "10px"
  }
}

 

Rob
Los Gallardos
Intranet, SharePoint and Power Platform Manager (and classic 1967 Morris Traveller driver)

 

dperez13
Post Patron
Post Patron

i tried this and  get no errors with the json flow but author or editor are not being updated in the SharePoint on-line list column

ajaysaba
Frequent Visitor

@dperez13 

 

I have used this https://tinyurl.com/AuthorIDChange

 

It is working for me.

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,109)