cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ktvision
Level: Powered On

Get File Content from OndDrive with dynamic file name

I'm tring to get a file content from my One Drive.  The file name is dynamic.  Therefore, I can't just select the name from the system.

The file is in the "MCCMINvoice" folder in my One Drive.  Therefore, I try to use the "Concat" function as in a file path (location and name) as below.  the "varInvNo" is the name of file, but it is erroring out.

 

Any help will be greatly appreciated.  Thanks

 

concat('/MCCMInvoice/', variables('varInvNo'), '.jpg')
FlowError.png
 
3 REPLIES 3
Community Support Team
Community Support Team

Re: Get File Content from OndDrive with dynamic file name

Hi @ktvision,

 

Using Get file content action, you couldn't get the file content in this way.

Since you want to use the path of the file to get the contents of the file, you could use Get file content using path action.

I did a test on my side, using a variable to save the file name and using the concat() function to make up the file path.

concat('/Test/',variables('fileName'),'.PNG')

19.PNG

It work, as below:

20.PNG

Take a try.

 

Best Regards,

Barry

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
ktvision
Level: Powered On

Re: Get File Content from OndDrive with dynamic file name

FIrst,  thank you so much for your replay.

I tried, but I'm getting the error message below.

This is my express on "Get file content using path", concat('/MCCMInvoice/',variables('varInvNo'),'.jpg')
Please help...
 
InvalidTemplate. Unable to process template language expressions in action 'GetSigByPath' inputs at line '1' and column '1894': 'The template language expression 'json(decodeBase64(triggerOutputs().headers['X-MS-APIM-Tokens']))['$connections']['shared_onedriveforbusiness_1']['connectionId']' cannot be evaluated because property 'shared_onedriveforbusiness_1' doesn't exist, available properties are 'shared_onedriveforbusiness'. Please see https://aka.ms/logicexpressions for usage details.'.

 

Community Support Team
Community Support Team

Re: Get File Content from OndDrive with dynamic file name

Hi @ktvision,

 

Have you tried recreating a Flow and creating a new connection to OneDrive?

You could try to remove exist OneDrive connection, then create a new Flow, configure new actions and connection.

Take a try and let me know if issue still exist.

 

Best Regards,

Barry

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
firstImage

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

firstImage

Coming Soon: T-shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Top Solution Authors
Top Kudoed Authors
Users online (6,020)