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 Platform Community / Forums / Power Automate / When a task is created...
Power Automate
Suggested Answer

When a task is created in Planner Create a Section and page

(1) ShareShare
ReportReport
Posted on by 4
Hello, I am trying to create a Section and a Page in OneNote when a task is create in planner. I can get the flow to create the Section but not the Page.  Here is the error summary from ChatGPT.  Any help would be appreciated.
 
ChatGPT said:
This error confirms that even though the SectionId variable looks valid, the "Create page in a section" action is rejecting it — likely because it’s expecting a full section URL (body/self) and not just the GUID (body/id).
Fix:  You should revert to using the full section URL (body/self) instead of the plain id.
🛠 Correct expression:  Update the Set variable action (just before “Create page in a section”) to this:

outputs('createsection')?['body/self']

This matches what OneNote expects: a full API path like:   https://www.onenote.com/api/v1.0/myOrganization/siteCollections/.../sections/1-xxxxxxxx

💡 Reminder: When calling OneNote (Business) connectors:
  • "Create section" returns both id and self.
  • "Create page in section" expects the self URL (not just the id GUID).
Let me know if you want help adding a condition to fall back to get sections only when the create fails (for re-runs).

You said:
we already did the body/self switch from body/id many times... I would expect you to remember previous attempts that have failed...
ChatGPT said:
You're absolutely right—and I appreciate your patience.
Yes, you've already tried both:
  • body/id → results in “Section ID is invalid”
  • body/self → results in an HTTP URI error due to malformed or unexpected structure.
You also confirmed from the Compose output that body/self gives the full URL, but that URL isn't accepted either.

🧭 What we now know:
  • Using body/self fails because Create page in a section is expecting just the ID, not the full path.
  • Using body/id fails because the section isn't fully available yet when that step runs.
  • Your workaround with Get sections in notebook + Filter array does get the correct ID—but it still fails when you use that known-good ID.

🔎 The real issue:
Even with the correct ID (1-b35532f0-...) confirmed from Get sections in notebook, the “Create page in a section” step still fails. That tells us the failure isn't about format anymore
 
Categories:
I have the same question (0)
  • stampcoin Profile Picture
    5,058 Super User 2025 Season 2 on at
    Can you share your last step's input  and the error please ?
  • Michael E. Gernaey Profile Picture
    53,493 Super User 2025 Season 2 on at
     
    Pretty please do not quote from ChatGPT. You did not even tell us what the error is or show the action etc. If you are looking for help just show us the error and the inputs etc so we can help. Lol a conversation with ChatGPT I promise isn't doing to help us help you :-).
  • AM-07050032-0 Profile Picture
    4 on at
    Hello, the Error is 
     
    The input raw data is
    {
        "host": {
            "connectionReferenceName""shared_onenote",
            "operationId""CreatePageInSection"
        },
        "parameters": {
            "notebookKey""Team OH Onenote|$|https://gwelec0.sharepoint.com/sites/ProductManagement/Shared Documents/OH Product Management/Team OH Onenote",
            "sectionId""1-6807a571-0e48-4bdb-b05d-1547d30e3917",
            "pageContent""<p></p>"
        }
    }
     
    This is last step expanded
     
    Thank you for your help!!
  • Suggested answer
    stampcoin Profile Picture
    5,058 Super User 2025 Season 2 on at
     
    Notebook section need a API URL ,see below pic.
    If the notebook is shared on SharePoint site, it will be like below, and you can find one property called pagesUrl when you use Get sections in notebook.
    https://www.onenote.com/api/v1.0/
       myOrganization/
       siteCollections/{Site-Collection-ID}/
       sites/{Site-ID}/
       notes/sections/{Section-ID}/pages
     
    So, you have to build the pattern when you use 'Create page in a section', or use pagesUrl directly.
     
     
     
     
     
     
     
     
    Please feel free, if you have any question.
  • stampcoin Profile Picture
    5,058 Super User 2025 Season 2 on at
    Have you got time to check this ?

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 519 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 296 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard