cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
HolgerLoebel
Advocate I
Advocate I

How do I define a dynamic destination folder when copying a file?

 

 I want to execute  the following sequence:

Trigger: Create a sharepoint list item

 

Actions:

  1. Create a new planner bucket and tasks based on the list item >> solved
  2. Create a new sharepoint folder >> solved with the "create file in correct path and delete file afterwards"-workaround that is postet here and there in this forum
  3. Create a new .docx-document in the new sharepoint folder

I struggle with the third step. I learned:

  • Flow cannot create a .docx-file directly
  • Workaround: copy a file from a template instead

I succeed with the "create copy" in a fixed, pre-defined folder path, however I don't know how I can adress the newly created sharepoint-folder with the "copy file"-flow. 

 

How do I express the destination path correctly to adress a folder that is not already existend at the time when I create the "copy file"-flow? What is the right variable to do so?

 

Any help is highly appreciated. Thx.

1 REPLY 1
v-yuazh-msft
Community Support
Community Support

Hi @HolgerLoebel,

 

Could you please share a screenshot of the configuration of your flow?

 

For your step 2:Create a new sharepoint folder >> solved with the "create file in correct path and delete file afterwards"-workaround that is postet here and there in this forum,

Why are you create file in correct path and delete file afterwards,and then in the step3 to copy the file to the folder path?

 

I suggest that you could combine the step2 and step3, to copy the file to a path directly.And I have made a test on my side to create a flow as below:

 Capture.PNG

You could refer to me to copy the file to the new path "NewFiles" directly, the "Copy file" action would check if the path "NewFiles" is exist, if the path "NewFiles" is exist, create the file "Summary.docx" to the path, if the path "NewFiles" isn't exist, create the path "NewFiles" and then create the file "Summary.docx" to the path.

 

The flow would run successfully as below:

Capture.PNG

 

Please let me know if your problem could be solved.

 

Best regards,

Alice

 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (3,272)