web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Automate
Unanswered

OneNote API Links

(2) ShareShare
ReportReport
Posted on by 28
I'm working on automating some OneNote Pages creation.  I have gotten one to work, but I need to do it for 6 different workflows each in a different Notebook.  It was a pain to get the API link which is different than the URL.  I can't remember the easiest way I got it last time.  Does anyone have an easy way to get the API link?  Or is there an easier way to do it?  The gist is a of the workflow is creating a couple pages automatically when section is created.  It copies them from a different Notebook and creates the in the newly created Section.
Categories:
I have the same question (0)
  • stampcoin Profile Picture
    5,058 Super User 2025 Season 2 on at
    do you mean  Graph Explorer ?
    you can use those in power automate flow
  • Christian Long CPE Profile Picture
    28 on at
    @stampcoin - Unfortunately, I do not have access to Graph Explorer and that's part of the problem.  In Power Automate, it requires the API link, and I could definitely get it from there, but there are other locations it shows up too.  Its a pain though...  And I can't remember where or how I got it before.  I know the string so maybe it uses the same ID that shows up in the Url?
  • Christian Long CPE Profile Picture
    28 on at
    @stampcoin - actually I *can* use Graph Explorer.  I had to grant myself permissions...

    But, the request is only returning the Notebook that is mine, and not the ones from the Teams I am a member of.
  • Pstork1 Profile Picture
    68,697 Most Valuable Professional on at
    If you run Power Automate and use the Get Sections in a Notebook then the API you need is in the self property.  When you do a Create pages in a section action the API is the same value followed by /pages
     
    OUtput from Get Sections in a Notebook
      "body": {
            "@odata.context""https://www.onenote.com/api/v1.0/$metadata#myOrganization/siteCollections('63fd68c5-73b3-432e-94c6-229577ca4703')/sites('41ae5d5b-4e6c-45a1-958a-bb20cfab1f86')/notes/sections(parentNotebook(id,name,self),parentSectionGroup(id,name,self))",
            "value": [
                {
                    "id""1-5e94d659-9dff-4ce8-ad69-b5bab527954c",
                    "self""https://www.onenote.com/api/v1.0/myOrganization/siteCollections/63fd68c5-73b3-432e-94c6-229577ca4703/sites/41ae5d5b-4e6c-45a1-958a-bb20cfab1f86/notes/sections/1-5e94d659-9dff-4ce8-ad69-b5bab527954c",
                    "createdTime""2018-09-23T13:16:59Z",
                    "name""Ignite 2018",
                    ....
     
    Code view for Create a page in a section
    {
      "type": "OpenApiConnection",
      "inputs": {
        "parameters": {
          "notebookKey": "Ignite|$|https://acmee3-my.sharepoint.com/personal/pstork_acmeman_com/Documents/OneDrive - Acme Enterprises (O365)/Notebooks/Ignite",
          "sectionId": "https://www.onenote.com/api/v1.0/myOrganization/siteCollections/63fd68c5-73b3-432e-94c6-229577ca4703/sites/41ae5d5b-4e6c-45a1-958a-bb20cfab1f86/notes/sections/1-5e94d659-9dff-4ce8-ad69-b5bab527954c/pages",
          "pageContent": "<p class=\"editor-paragraph\">test</p>"
        },
        "host": {
          "apiId": "/providers/Microsoft.PowerApps/apis/shared_onenote",
          "connection": "shared_onenote",
          "operationId": "CreatePageInSection"
        }
      },
      "runAfter": {
        "Get_sections_in_notebook": [
          "Succeeded"
        ]
      }
    }

    ----------------------------------------------------------------------------------
    If this Post helped you, please click "Does this answer your question" and give it a like to help others in the community find the answer too!

    Paul Papanek Stork, MVP
    Blog: https://www.dontpapanic.com/blog
     
     
  • stampcoin Profile Picture
    5,058 Super User 2025 Season 2 on at
    use the Graph, you still can use the same for post/patch/put... 
    The only difference is you have to get the location ( assume it is for a Team), like the team's site.
    Once you get the location, then work with the pages/sections as usual.
    Good luck.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard