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

Use of variables fo Excel actions

Hello,

 

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 : 

{
  "status"400,
  "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 ?
 
Thanks
3 REPLIES 3
CFernandes
Super User III
Super User III

@coutep 

 

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.

 

 
 
 

Untitled.png

 

Executed the Power Automate and got correct results.

 

Untitled1.png

 

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!

 

 

efialttes
Super User III
Super User III

Hi!

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...

Flow_variableListRows.png

 

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

Flow_variableListRows_1.png

Hope this helps



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

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


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

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

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,957)