cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted

Onedrive for business - get file content

I have created a flow that triggers when a file in a onedriver folder is modified.

 

I have two some what identical actions that tries to fetch the content from the file. 

 

In the first action the path to the file is done through the explorer of the action and the second one is taken from the triggerOutput.

 

getContent.PNG

last(split(triggerOutputs()?['headers']['x-ms-file-path'],'root:'))

 

getContentError1.PNG

This one works,

 

getContentError2.PNG

This one doens't work.

 

The path produced in both actions are identical, so I'm really wondering why the first one succeeds and the other one fails.

 

What might be the reason for this? I want to use the triggerOutput solution.

 

/Anders 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Onedrive for business - get file content

 

Hi @Anderstechlogic ,

 

If you use File browse to specify a file, it is equivalent to configuring the file identifier, although the file path is displayed.

File path is not supported here.

If you want to use the triggerOutput solution, I suggest you use Get file content using path action.

 

Best Regards,

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.

View solution in original post

4 REPLIES 4
Highlighted
Super User II
Super User II

Re: Onedrive for business - get file content

Please see the OneDrive for Business connector documentation for reference. What is likely happening, is that you are either locking out the file with the first Get file content action, and/or exceeding the API call limit. With that in mind, you may want to rethink the design of you Flow, and possibly instead storing the file in a SharePoint Document Library.

If you could provide an expanded screenshot of your Flow and steps, your Flow run history, and of any detailed error messages you're receiving we could likely better assist you. Also, for the best results, you may want to review How to write a good forum post.

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!

Highlighted
Community Support
Community Support

Re: Onedrive for business - get file content

 

Hi @Anderstechlogic ,

 

If you use File browse to specify a file, it is equivalent to configuring the file identifier, although the file path is displayed.

File path is not supported here.

If you want to use the triggerOutput solution, I suggest you use Get file content using path action.

 

Best Regards,

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.

View solution in original post

Highlighted

Re: Onedrive for business - get file content

The error happens even if i split it in to 2 seperate flows. And this is just something I found while fiddling around. Not an actual flow, and there's not anything else in the flow. I'll provide the error message here :

 
 
 

getContentErrorMessage.png

Highlighted

Re: Onedrive for business - get file content

Exactly what I needed. Thanks!

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

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!

Users online (8,356)