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
Super User II
Super User II

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.

View solution in original post

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
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 (967)