cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anderstechlogic
Helper I
Helper I

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
v-bacao-msft
Community Support
Community Support

 

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
Brad_Groux
Community Champion
Community Champion

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!

v-bacao-msft
Community Support
Community Support

 

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.

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

Exactly what I needed. Thanks!

Helpful resources

Announcements
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,449)