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

API URL of the section pages (Onenote)

I decided to try power automate as it seemed it would speed up processes.  Except it is not working and now I am trying to work out why.

I am using the template Copy flagged Office 365 Outlook emails to OneNote

 

In the onenote part i have selected the notebook

however, this app cannot find the notebook section -   It could not retrieve values because I have over 5000 Onenote items.

So can the required code be added somewhere manually to make this happen

If so what is the code and where does it get added.

 

Thanks

Bronwyn

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Hi @Bronwyn,

 

The error is caused by executing against SharePoint document libraries that contain a large number of items.

When working with SharePoint document libraries that contain a large number of items, the OneNote API service is subject to throttling measures implemented by SharePoint for the purposes of regulating resource usage. Under these circumstances, the user of the application may see an application-specific error. 

 

If Notebooks Count is greater than 5,000, then you need to bring the notebook count in the document library to under 5,000. You can do this by moving some of your notebooks out of the document library to a different storage location (such as another user or group's OneDrive). You can also delete the notebooks that are not required anymore.

After you have reduced the notebook count to under 5,000, rerun the tool to make sure the notebook count is less than 5,000. Ideally, you should keep this number below 5,000 so that you can have enough room to create new notebooks. If the notebook count in the document library crosses 5,000 again, you will start seeing the OneNote API failures and you will need to come back here and take the same remedial steps.

 

Best Regards,
Community Support Team _ Lin Tu
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

6 REPLIES 6
Highlighted
Resolver II
Resolver II

Hi @Bronwyn ,

 

It appears the Section Pages url follows a format similar to below.  

 

To find the API URL of the section you can try the following:

 

1. Create a manual (button) flow with the action "Get Sections In Notebook"

ONOTE_GetSections.png

2. Run the Flow and view the results.

ONOTE_GetSections_out.png

3. Copy the Output into a text editor (I use VS Code) but anything with a Find function will work.

4. Search for the name of the section you are looking for. Above the name you will see a "self" property. This is most of the API URL is beside the "self" label.

5. To use this in your flow select "Enter Custom Value" and copy the entire URL adding  "/pages" to the end.

onote_sectionapiurl.png

 

I tested and it worked for me.

 

Hope this helps!

 

Brian

Highlighted
Community Support
Community Support

Hi @Bronwyn,

 

@bhitchlockfcs 's advice is correct, please have a try, if it does not work, please contact us again.

 

If your problem has been solved, You could go ahead and mark the post as solved by clicking “Accept as Solution” so that this thread will be marked for other users to easily identify!

Best Regards,
Community Support Team _ Lin Tu

 

Highlighted

i was going to reply to Brian, but you are current.

I have started to follow Brian's advice, it took me a long time to find how to create a button.

 

I do not have the same sequence that he highlighted in the code i have the following

 

{
"error": {
"code": "10008",
"message": "One or more of the document libraries on the user or group's OneDrive contains more than 5,000 OneNote items (notebooks, sections, section groups) and cannot be queried using the API. Please make sure that none of the user or group's document libraries contains more than 5,000 OneNote items. Browse to this page for more information: https://blogs.msdn.microsoft.com/onenotedev/2016/09/11/onenote-api-calls-fail-with-a-large-number-of...",
}
}
 
Is there are work around for this?
 
Thanks
Bronwyn
Highlighted

Hi @Bronwyn,

 

The error is caused by executing against SharePoint document libraries that contain a large number of items.

When working with SharePoint document libraries that contain a large number of items, the OneNote API service is subject to throttling measures implemented by SharePoint for the purposes of regulating resource usage. Under these circumstances, the user of the application may see an application-specific error. 

 

If Notebooks Count is greater than 5,000, then you need to bring the notebook count in the document library to under 5,000. You can do this by moving some of your notebooks out of the document library to a different storage location (such as another user or group's OneDrive). You can also delete the notebooks that are not required anymore.

After you have reduced the notebook count to under 5,000, rerun the tool to make sure the notebook count is less than 5,000. Ideally, you should keep this number below 5,000 so that you can have enough room to create new notebooks. If the notebook count in the document library crosses 5,000 again, you will start seeing the OneNote API failures and you will need to come back here and take the same remedial steps.

 

Best Regards,
Community Support Team _ Lin Tu
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

hello and thank-you for replying

 

I read the article and I understand these limitations as I have already experienced them at another time.  This article was dated 2016.

 

Is there a work around to this problem.

 

Thanks

Bronwyn

Highlighted

Hi @Bronwyn,

 

I'm not aware of an easy way to find the API Url for a section within the Flow. Possibly by querying the API directly with the addition of filters, but that's a complicated resolution.

The best resolution would be those outlined in the link you shared.

 

Is the Notebook located in a SharePoint library or Onedrive?

 

The 5k section/document limit is best avoided in general with SharePoint. If you can move the Notebook to it's own library or create a new Notebook that will be the best solution. 

 

Sorry I cannot offer more assistance.

 

 

 

Sorry, I cannot be of more help.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Users online (7,932)