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

Copy File with new dynamic Name based on Forms input

Hi all, I am completely new to Flow and couldn't find a proper solution via google so far.

I have following requirements and hope that someone can give me guidance:

  1. We have a word document that we would like to copy with a new name into the same folder
  2. The User shall be entering a Name & Year in Forms that will be used to name the new copy of the file
  3. The Name of the file is as followed: NAME ASR YEAR EU.docx
    1. Name = 1st entry in Forms
    2. ASR = fixed value
    3. Year = 2nd entry in Forms
    4. EU = fixed value

I hope my explanations are understandable.

 

Thanks much in advance!

Robin

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Resident Rockstar
Resident Rockstar

Re: Copy File with new dynamic Name based on Forms input

Hi @robinteine

Here is my complete Solution:

Capture-049.png

 This basically get's a file called "Document.cocx" and then saves it to the same folder as file-<AccountName>-<Year>.docx.

 

If this was the form submission:

Capture-050.png

You would have a file called file-AccountName-2020.docx in the same folder.

 

Note: The response ID bit you were stuck with is in dynamic data, be sure to expand it all or use the following expression:

items('Apply_to_each')['resourceData']['responseId']

If you found as helpful please mark as thumbs up.

If this is the solution, please mark as the solution.

Any other questions, just ask.

Thanks, Alan

 

 


Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


View solution in original post

17 REPLIES 17
Highlighted
Helper V
Helper V

Re: Copy File with new dynamic Name based on Forms input

Sorry, I would love to help but not understanding how they fill out the date with the forms.   Are you using MS Forms, Metadata on the original doc or some other method for getting the file name information?

 

Please provide some additional detail.

 

Thank you

Highlighted
New Member

Re: Copy File with new dynamic Name based on Forms input

We would use MS Forms:

Screenshot at Feb 08 10-54-55.png

Highlighted
Resident Rockstar
Resident Rockstar

Re: Copy File with new dynamic Name based on Forms input

Hi @robinteiner

 

I get the brief, but can I ask where the file will be saved, File share, OneDrive, SharePoint?

 

Also, how far have you got an with what connectors? Are you able to post a picture of your full flow please?

 

Thanks, Alan


Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


Highlighted
New Member

Re: Copy File with new dynamic Name based on Forms input

Hi Alan, thanks for your answer. We are copying the file into the same folder in SharePointScreenshot at Feb 08 11-11-53.png

It is supposed to be as simple as possible but I don't know how to change the file name with input from Forms and using fixed values. If you have a proposed solution without using forms or a different tool, I am very open to that!

Highlighted
Resident Rockstar
Resident Rockstar

Re: Copy File with new dynamic Name based on Forms input

Thank you for the image, it is helpful.

I am just creating the process for you now and will post it back shortly!

 

If you found as helpful please mark as thumbs up.

Thanks, Alan


Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


Highlighted
Resident Rockstar
Resident Rockstar

Re: Copy File with new dynamic Name based on Forms input

I am still looking at thhis but here's a step for a hint for you as this may be all you need now I see what you have.Capture-047.png

 You need to add Get response details after the trigger "when a new response is submitted".

This will get you at the values in the dynamic content

 

If you found as helpful please mark as thumbs up.

If this is the solution, please mark as the solution.

Any other questions, just ask.

Thanks, Alan

 


Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


Highlighted
Resident Rockstar
Resident Rockstar

Re: Copy File with new dynamic Name based on Forms input

As a step further and alternative to copy file. This type of thing works also.Capture-048.png

 

 

If you found as helpful please mark as thumbs up.

If this is the solution, please mark as the solution.

Any other questions, just ask.

Thanks, Alan


Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


Highlighted
New Member

Re: Copy File with new dynamic Name based on Forms input

Thank you much for the help and effort so far! I am actually stuck at "Get response details" as I can't choose the different ResponsesScreenshot at Feb 08 11-53-06.png

Highlighted
Resident Rockstar
Resident Rockstar

Re: Copy File with new dynamic Name based on Forms input

Hi @robinteine

Here is my complete Solution:

Capture-049.png

 This basically get's a file called "Document.cocx" and then saves it to the same folder as file-<AccountName>-<Year>.docx.

 

If this was the form submission:

Capture-050.png

You would have a file called file-AccountName-2020.docx in the same folder.

 

Note: The response ID bit you were stuck with is in dynamic data, be sure to expand it all or use the following expression:

items('Apply_to_each')['resourceData']['responseId']

If you found as helpful please mark as thumbs up.

If this is the solution, please mark as the solution.

Any other questions, just ask.

Thanks, Alan

 

 


Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


View solution in original post

Highlighted
New Member

Re: Copy File with new dynamic Name based on Forms input

Thank you so much! It works like an ace and now you made it look so simple. again Thanks!! Have a great weekend!!
Highlighted
Resident Rockstar
Resident Rockstar

Re: Copy File with new dynamic Name based on Forms input

You're very welcome @robinteiner.

 

Have a lovely wknd and thank you for the use of Kudos & marking as a solution too.

It really helps the community moving forward when another looks on the web and sees the feedback you have provided!

 

Thanks, Alan


Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


Highlighted
New Member

Re: Copy File with new dynamic Name based on Forms input

Hi @AlanPs1,

 

I went another step and added an automated email containing some information about the created document. The only information I am missing is the full link to the newly created document in SharePoint. Do you know how to add this last step?

 

Thanks

Robin

Highlighted
Resident Rockstar
Resident Rockstar

Re: Copy File with new dynamic Name based on Forms input

Hi @robinteiner

 

I am still working on placing the actual link to the file that will link you to SharePoint but I have implemented away to click and download the file which may be better for you.

 

So here we are below, carrying on from where I had previosuly left off, add this after the black line which is the previous create file:Capture-052.png

 

If you found as helpful please mark as thumbs up.

Thanks, Alan

 


Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


Highlighted
New Member

Re: Copy File with new dynamic Name based on Forms input

Hi @AlanPs1

 

Again thank you for the quick response! Unfortunately we need the link as it will be used in a different tool to integrate the file. Downloading the file would not be an option. I tried playing around but didn't find a solution so far.

 

Best

Robin

Highlighted
Resident Rockstar
Resident Rockstar

Re: Copy File with new dynamic Name based on Forms input

Hi @robinteiner

This subtle change to the "send an email" means the word doc (newly created file) opens in the browser.

Can you give this a try and see if it meets your requirements please?Capture-054.png

 So, just implement the file download but make the changes to "send an email" only

 

basically the URL would looklike this - https://<tenant>.sharepoint.com/sites/AlansContent/Shared Documents/PO/file-AccountName-Year.docx?we...

 

If you found this helpful please mark as thumbs up.

If this is the solution, please mark as the solution.

Any other questions, just ask.

Thanks, Alan


Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


Highlighted
New Member

Re: Copy File with new dynamic Name based on Forms input

Hi @AlanPs1

 

I have tried using the path and it works for the download. However, the CRM requires a different type of link to the document for the integration. You can get the link manually by clicking on "Copy Link" in Sharepoint (see screenshot below). This is the link I am trying to get to, so the User can copy the link from the email and paste it in the CRM solution for the integration.

Screenshot at Feb 08 15-57-10.png

Highlighted
Resident Rockstar
Resident Rockstar

Re: Copy File with new dynamic Name based on Forms input

Hi @robinteiner

 

Yeah, I though that is what you were referring to and this is more tricky to get to (it has a GUID I can't yet locate) but there has got to be a way so I will keep looking at that for you.

 

What I think would be best would be to close of this post and start a new one that deals with solely "How to access the file link from within a SharePoint Document library - The Copy Link Url"

 

If you pop a new post up to that effect then referrence this thread, it will make it easier for others to come in also as there may be another sees the new post and has the answer to hand. I will still work on it though then post in the new thread with any of my findings. Pop your image in to be clear for those will have a look.

 

Does that sound sensible to you @robinteiner?

 

Thanks, Alan


Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


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!

Top Solution Authors
Top Kudoed Authors
Users online (8,077)