cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

Flow to update document file name

Hello,

 

I'm fairly new to Flow and am trying to update a document name.

 

i created a document library where i have a custom template. (excel file), when i open my template the name is Book1.xlsx by default. i don't want my users to change the name manually.I'd like the file name to be "XYZ-DateTime" but cannot figure out how to do it with the options available in flow.

 

I tried several things but nothing works. the latest one is

 

flow.png

 

Does anyone have an idea how to do this ?

 

Thanks a lot for your help !

Cedric

12 REPLIES 12
Highlighted
Community Support
Community Support

Re: Flow to update document file name

Hi Kaddrik,

 

How is your file created? Do your users upload the files to library directly?

 

I am afraid that the flow you created might be not able to meet your needs. I have a flow on my side, please try if it will work for you.

 

The flow is triggered by “When an email is arrived, create file in SharePoint”, then add a Compose action to get the DateTime.

4.PNG

 

Please try it on your side to see if it will work for you.

 

 

Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
New Member

Re: Flow to update document file name

Hello Mabel,

 

thanks for your answer.

 

the document is a template set as a content type. the users do not need to upload a document. they just click on "new" and they choose the template.

 

oh !? the compose action...i didn't think about this !! 🙂 I will test and let you know.

 

thanks,

Cedric

Highlighted
New Member

Re: Flow to update document file name

Hello !

 

hmm..this doesn't seem to be working.

 

One of my colleagues,may have find a solution to it yesterday. i will try to see with him...

 

Thanks anyway !

Cedric 

Highlighted
Anonymous
Not applicable

Re: Flow to update document file name

Hi Kaddrik

Did you find a solution for this?

I have the exact same need like you...

regards Jesper

Highlighted
New Member

Re: Flow to update document file name

Hi Jesper,

 

no sorry, i didn't find a solution for this 😞

 

Regards,

Cedric

Highlighted
New Member

Re: Flow to update document file name

Hello, do you try with the trigger « when a document properties is modify » and update the content properties ?
Highlighted
Advocate I
Advocate I

Re: Flow to update document file name

I'm able to rename a sp doc library file by using REST:

 

select "Send an HTTP request to SharePoint" action,

 

then follow the below article to fill up the header and body of the HTTP REST POST request: (I used option 1 with success)

 

https://sharepoint.stackexchange.com/questions/168014/change-filename-of-existing-file-on-sharepoint...

 

Highlighted
Post Patron
Post Patron

Re: Flow to update document file name

@rich8rd

 

Could you explain how you did it, I am trying to update the file name in a document library with the text in the title field.

 

Thanks,

Highlighted
Advocate I
Advocate I

Re: Flow to update document file name

hi, here is a screenshot of my rename process Flow, this is working brilliantly for me so should work for you as well

 

REST call to rename in FLOW.JPG

 

Highlighted
Anonymous
Not applicable

Re: Flow to update document file name

Hi @rich8rd 

Can you explain what is the ShortFolderName variable and how do you obtain it? Thanks

Highlighted
Advocate I
Advocate I

Re: Flow to update document file name

It's a variable i assigned in previous steps, you can find steps in this link: https://powerusers.microsoft.com/t5/General-Flow-Discussion/setting-local-variables-used-in-specific...

Highlighted
Regular Visitor

Re: Flow to update document file name

Hi there,

 

So I'm doing this exact thing in my Flow to attempt to update the Filename and extension in a Document Library, however when I run the Flow, it completes successfully but does not affect the filename at all.

 

I tried to also use the "X-RequestDigest" header with a digest value and that didn't change anything either. 

 

Has anything to your knowledge changed regarding using FileLeafRef to update the name of a document?

 

Thanks kindly. 

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Users online (8,101)