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

Unable to find files in folder in One Drive for Business

Hi Team,

 

I have created a flow that reads data from an email, parses it and finds a specific file in the appropriate folder in One Drive for Business.

 

This flow successfully works on a different user, using One Drive (Not Business).

 

When i run the exact same flow the business version does not show any details in the body of the Find Files in Folder.

 

Below copied from test flow. Refer to red [] where the file information should be.

 

Inputs
Search Query
test1
Folder
/PODs
File Search Mode
OneDriveSearch
Number of files
1
Outputs
Status code
200
Headers
Pragma
no-cache
x-ms-request-id
6fbea78b-ee0c-4c5a-a308-fcfa4d6aff07
Timing-Allow-Origin
*
x-ms-apihub-cached-response
true
Cache-Control
no-cache
Date
Thu, 01 Nov 2018 07:56:33 GMT
X-AspNet-Version
4.0.30319
X-Powered-By
ASP.NET
Content-Length
2
Content-Type
application/json; charset=utf-8
Expires
-1
Body
[]
1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Unable to find files in folder in One Drive for Business

Hi @Otto,

 

I tested it with the expression you provided and found that the output would contain a blank line.

You could avoid this problem by using the trim() function on this basis.

And even if the string contains spaces, it seems that the space will still be preserved and will not be affected by the function.

Image reference:

39.PNG40.PNG

Please 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.
6 REPLIES 6
Community Support Team
Community Support Team

Re: Unable to find files in folder in One Drive for Business

Hi @Otto,

 

I did a test on my side and found the issue you mentioned. When I use the OneDrive-Personal-Find files in folder, the content of the Body output is the expected file-related information.

However, when using the OneDrive for Business-Find files in folder test, the body outputs ‘[]’.

Not only that, if the folder selects the root directory, both connectors will report an error.

Please take a try to use Find files in folder by path, which does not have the issue mentioned above.

Same as configuring Find file in folder action:

42.PNG

It works fine and get file metadata, as below:

                                                   43.PNG

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.
Otto
Level: Powered On

Re: Unable to find files in folder in One Drive for Business

@v-bacao-msftthanks for your reply.

 

I am searching for a file name that is supplied from body of an email.

When i add in the output taken from the email i am still getting the same problem.

 

The outputs are working as expected everywhere else, just not this one drive for business function. (the personal one drive on another account works with the same flow setup)

 

image.pngimage.png

Community Support Team
Community Support Team

Re: Unable to find files in folder in One Drive for Business

Hi @Otto,

 

I did the test later, and if the value in Search Query is the filename containing the extension, I can get the expected result.

Otherwise I get the information of the folder.

26.PNG

Search Query - does not include an extension:

 27.PNG28.PNG

 Search Query - contains the extension:

 29.PNG30.PNG

Please configure the file name with the extension in Search Query so that no similar issue will occur.

Please take a try again and feel free 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.
Otto
Level: Powered On

Re: Unable to find files in folder in One Drive for Business

@v-bacao-msftthanks for your reply.

 

I tried and got the same result, then I changed my mail structure and it started working.

I noticed a difference between our 2 flows.

 

You will see below that my testdoc.docx has a space under it, but your example does not.

 

I am using the following expressions in this test. I know this is a different question now, but hope you may have an answer as i wonder if that is contributing to my initial problem.

 

first(skip(split(first(split(body('Html_to_text'),'Type')),':'),1))
first(skip(split(first(split(body('Html_to_text'),'Client Name')),'Type:'),1))
 
Email structure below.
 

RP:testdoc.docx

Type:IM

Client NameSmiley Surprisedtto Test

Agent:Conroy Test

Agent EmailSmiley Surprisedtto@domain.com

MM NameSmiley Surprisedtto 2

MM EmailSmiley Surprisedtto2@domain.com

Message:Thank you for choosing Domain dot Com! Please see document

Sign off:Kind Regards

CompanySmiley Very Happyomain Dot Com

End

 

image.png

Community Support Team
Community Support Team

Re: Unable to find files in folder in One Drive for Business

Hi @Otto,

 

I tested it with the expression you provided and found that the output would contain a blank line.

You could avoid this problem by using the trim() function on this basis.

And even if the string contains spaces, it seems that the space will still be preserved and will not be affected by the function.

Image reference:

39.PNG40.PNG

Please 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.
Otto
Level: Powered On

Re: Unable to find files in folder in One Drive for Business

@v-bacao-msftthat worked!

Thank you so much for your help on this!

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020

thirdimage

Flow Community User Group Member Badge

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

fifthimage

Microsoft Learn

Learn how to build the business apps that you need

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 42 members 4,606 guests
Please welcome our newest community members: