Showing results for 
Search instead for 
Did you mean: 
Advocate I
Advocate I

Use of variables fo Excel actions



I need to replicate a flow on multiple SharePoint sites. To avoid to have to change all the actions linked to Excel, I would like to use variables to specify the different elements needed to locate the file on the SharePoint site.  SO I will onl have to update variable at the beginning of the flow.


Here is what I want to do :

2020-10-09 08-56-25_Excel_Variable.jpg


When I am executing that I am receiving an error on the file name : 

  "message""The parameter 'file' has an invalid value '/Test/Test_File.xlsx'."
Here is the "INPUTS" of the actions : (top one is for a "standard" way to specify, "bottom" is with variables) 
2020-10-09 09-05-38_Excel error.jpg
How this can be done ?
Super User III
Super User III



Hey Mate,


I have come across this problem is the past and I had to Reverse Engineer a little as the Drive ID always complaining. 


What I did was create a dummy file, filled in all the correct values and ran the Flow and after the Power Automate executed, I clicked in raw inputs and copied the drive ID.





Executed the Power Automate and got correct results.




If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!



Super User III
Super User III


My suggestion is, either to use the 'Identifier' attribute that is part of either Sharepoint 'Get file properties' or 'Get files (properties only)' output action blocks...



...or, use the 'Id' attribute that is part of Sharepoint 'Get file metadata using path' action block...


Hope this helps

Each time you click on any of our inspiring answers 'Thumb up' icon... ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!

Escribo sobre Power Automate en:

Proud to be a Flownaut!

It works fine this way … 

I will try the other solution to see if it is also working for me .


Thanks for your quick answer....

Helpful resources

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.


Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (3,645)