Showing results for 
Search instead for 
Did you mean: 
Not applicable

Is it Possible Get Unspecified File Name From OneDrive with Power Automate


I reaaly need an urgent help.
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?


Hey @Anonymous ,


If what's blocking you in step #3 is to figure out the file name in step #2 (the saved attachment), wondering if you can try using the "Id" variable out of the Create file action in #2:



Normally you can use to reference dynamically created files during a flow execution.


Hope this helps!



Helpful resources

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (2,233)