web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Update name of SharePo...
Power Automate
Answered

Update name of SharePoint folder when Account is modified

(0) ShareShare
ReportReport
Posted on by

I'm trying to create a flow that takes the updated name of an account and changes the name of an existing Sharepoint folder with the new Account name (i.e. "CompanyName_[Guid]" changes to "NewCompanyName_[Guid]")

 

This is my flow so far:

Udklip1.PNG

I list all subfolders under "/account" and for each subfolder I check if the displayName property contains the Guid of the account that was modified. If yes this means that a folder already exists, and I need to then update the name of that folder. This is the "Change folder name" task expanded:

Udklip2.PNG

When I try to run the flow, I get the following error:

"Invalid JSON. A token was not recognized in the JSON content"

 

I tried to register an Add-in in SharePoint, and then use the client id as the access token in the authorization header, but that made the flow run forever untill I canceled it.

 

I just want to know if what I'm doing is remotely correct...

Categories:
  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi, 

     

    In the Change folder name action, in body, please make the single quotes as double quotes. your flow should work fine then. 

     

    {
    "Title" : New Folder Name ,
    "FileLeafRef" : New Folder Name
    }

    Thanks, 

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

  • Verified answer
    v-bacao-msft Profile Picture
    Microsoft Employee on at

    Hi @frederikcliento ,

     

    I did a test on my side and added double quotes outside of Dynamic content to avoid this problem.

     

    Image reference:

    3.PNG2.PNG

    Please try again.

     

    Best Regards,

  • NoelleY Profile Picture
    13 on at

    Hello! 

     

    @frederikcliento I am trying to achieve the same function, as what you achieved above. Does SharePoint still offer the "Change folder name" action? It appears to no longer be available within Power Automate.

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 299

#2
11manish Profile Picture

11manish 274 Super User 2026 Season 2

#3
Henil Profile Picture

Henil 119

Last 30 days Overall leaderboard