Question

I'm new on Microsoft Power Automate and I'm trying to built a flow. This flow can be summarised like below:

  1. Receive Email
  2. Save Attachments to OneDrive
  3. Copy OneDrive file to another OneDrive Folder (there are problem at this point. The file name can be changed for every email attachment and I need to get current file name to process other stpes. I've tried to use expressions to get generic name. First I've initialized a variable but I couldn't use it anywhere. Then I try to get the file name such as :concat('/xxxx_folder/',variables('name of initialized variable') but it didn't work.
  4. After getting the file I need to get excel files and copy to another template excel file.
  5. And final step is sending this new file as attachment with an email.

Is there any way to get unspecified file name and use it in other steps? Thank

Was it helpful?

Solution

I'm assuming you were able to complete steps 1 and 2. For your step 3, you can use "List files in folder" action from OneDrive and then loop through all the files using "Apply to each" and copy files to another OneDrive folder using "Copy file" action.

As can be seen in the screenshot, file Names are available from the dynamic content, and can used for other processing.

See the screenshot below

enter image description here

Let me know if you have any other issues.

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top