Cannot able to access the sub folders with getChildren method of onedrive

Hello everyone! I have been trying to fetch all the subfolders in one drive . It is working fine with the rest cases but i faced some glitch while using this getChildren feature of one drive . There is Distributor Folder exists and inside of this it is clearly giving ChildCount as 144


. But while trying to get this child folder. It is giving error as:
ERROR: Bad request - please check your parameters

Query option ‘$top’ was specified more than once, but it must be specified at most once.

Apart from these i tried with this method with other folders also, and it is giving the expected result.

Throwing error as this :

ERROR: Bad request - please check your parameters

Query option ‘$top’ was specified more than once, but it must be specified at most once.
Uploading: Screenshot 2022-05-09 at 12.52.51 AM.png…

Any help would be really appreciated!

Hey @Farheen_I,

Any chance you could post your workflow again, It looks like it is only 2 nodes but no link between them, You can use the ``` characters around it to format it nicely.

I have given this a quick test on 2 folders one with 144 items in and another with 200, I can see in the node itself we do set $top so we could have a bug here but we will need to be able to reproduce it so we can fix it.

The more information you can share the better, If you can share what the folder structure looks like as well that would be handy.

1 Like

Screenshot 2022-05-09 at 6.09.57 PM



Hey @Jon i have sent workflow for your reference. Kindly let me know where the error is ,it is on urgent.

Waiting for your response. @Jon

Hey @Farheen_I,

I have been trying to reproduce this starting by creating what I think your folder structure looks like now. What I have done is made a quick workflow to create a folder that looks like this /Order Booking/folder-x/Distributor/folder-y. For my test there are 20 x folders, The Distributor folder is created in a “random” amount of them and then y folders is also a random amount between 1 and 200 in the Distributor folders.

For some reason though I can’t trigger the same failure message, What version of n8n are you running?

Hey @Jon i don’t know exactly how will you check the error but i can give you the rough idea i.e., whenever you try to access child folder whose total count is more than 120 to 140 then onedrive node is throwing that mentioned error.

You can try locally by creating multiple folder inside of its parent and try to access those folder, it will give you that error.

Hey @Farheen_I,

The first thing I tried was a folder in Onedrive that had 200 folders in it but it wasn’t throwing the error which is odd.

What version of n8n are you running?

it’s 0.67.0

Hey @Farheen_I,

0.67? in that case I would start with an update as that is a very old version.

hey @Jon ,
yes please ,it would be really helpful to me. And when it is done kindly update here also.

Hey @Farheen_I,

When what is done, you have lost me sorry.

I think there is a misunderstanding @Farheen_I. You have to update your n8n version, that is nothing we can do for you.

1 Like

Sorry i misunderstood this @jan . Thanks @Jon for helping me with your fast reply.

1 Like