cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Kaddrik
Level: Powered On

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

11 REPLIES 11
Community Support Team
Community Support Team

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.
Kaddrik
Level: Powered On

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

Kaddrik
Level: Powered On

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 

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

Kaddrik
Level: Powered On

Re: Flow to update document file name

Hi Jesper,

 

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

 

Regards,

Cedric

4l3X
Level: Power Up

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 ?
rich8rd
Level: Powered On

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

 

ck25415
Level 8

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,

rich8rd
Level: Powered On

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

 

RitaAguiar
Level 8

Re: Flow to update document file name

Hi @rich8rd 

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

rich8rd
Level: Powered On

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

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (5,706)