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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Having trouble creatin...
Power Automate
Answered

Having trouble creating a new page in a OneNote section if the Section name already exists, if not, create the Section.

(0) ShareShare
ReportReport
Posted on by 28

Hi all, 

 

I am very new to using Power Automate and I am attempting to use a form trigger to create sections and pages in a Notebook depending on if that section name exists or not. I have tested my condition using only sections and it worked (although with many errors). 

 

If a Section already has the same name as an answer to my form, then it should create a new page inside said Section.

If a Section does not exist with the same name as an answer to my form, then it should create a new Section with said name.

 

I cannot get a page to create under a section when inside my condition.

 

Please help!

Thank you!IMAGE 1.png

 

IMAGE 2.png

 

IMAGE 3.png

 

Categories:
I have the same question (0)
  • Verified answer
    creativeopinion Profile Picture
    10,508 Moderator on at

    @miaroze You can improve the efficiency of your flow if you use a Filter Array action instead of looping through each section returned from the Get sections in notebook action and running a check to see if the section already exists.

     

    I would recommend using a manual trigger in your flow so you can quickly run tests rather than needing to leave Power Automate to fill out a form. I cover how to do that in this section of one of my YT Tutorials.

    creativeopinion_3-1710531281188.png

     

     

    creativeopinion_0-1710531155335.png

     

     

    Whenever I use a Filter Array action, I always like to return the count of items returned in a Compose action. This is helpful when building a flow and can also be used to troubleshoot your flow.

     

    Insert a Compose action. Add an Expression. Use the length() function.

    creativeopinion_1-1710531223860.png

     

    Select the Dynamic content tab and insert the body dynamic content from the Filter Array action into the length() function.

    creativeopinion_2-1710531235984.png

    Run a test. Review the output of the Compose action. It's important to note that the Filter Array action is case sensitive. I'm unsure if the dynamic content you are using from the Get Response Details action is a choice selection or a manual entry. You'll need to account for whether or not the values will actually match since you are using the is equal to operator. 

     

    Add a Condition action to your flow. If items have returned (aka there is number stored in the Compose action—that is not equal to 0), add the rest of your actions to the Yes branch. If not, do nothing.

    creativeopinion_4-1710531345417.png

     

    You might find these YT Tutorials helpful:

     

    How to Get a Microsoft Form RSVP Response into a SharePoint List

     

    IN THIS VIDEO:

    ✅ How to get a Microsoft Form Response into SharePoint

    ✅ How to get a Microsoft Form ID

    ✅ How to get a Microsoft Form response

    ✅ How to Build a Microsoft Form with Conditional Fields

    ✅ How to used Branching in Microsoft Forms

    ✅ How to format Microsoft Form multiple choice responses for a SharePoint multi-choice column

    ✅ How to parse a Microsoft Form multiple choice response as string of text

    ✅ How to convert a text response to a number

    ✅ How to use the Switch action

    ✅ How to create a custom email confirmation for a Microsoft Form submission

    ✅ How to Create a Custom View in a SharePoint list

    ✅ How to use the Compose Action

    ✅ How to write Power Automate Expressions

     

    ---

    Microsoft OneNote + Power Automate: Automate New Pages WEEKLY!

     

    In this Microsoft Power Automate video tutorial I’ll show you how to create a simple and customizable automation that will create a new page in Microsoft OneNote every Monday.

     

    This flow will name your page for you so you don’t have to. If you have a page template you use—I’ll show you how you can create a new page based off of an existing page template. As a bonus I will show you how to dynamically select a notebook so you won’t ever need to edit your flow. Save time and boost your productivity with this easy-to-create Microsoft Power Automate Flow. If you want to learn how to automatically create Monthly Sections in a OneNote Notebook, make sure to watch THIS VIDEO

     

    IN THIS VIDEO:

    ✅ Get the Date of a Specific Day of the Week Expression

    ✅ How to get the API URL of a OneNote Section Page

    ✅ How to Automatically Create a New OneNote Page Every Week

    ✅ How to Use the Power Automate Get Page Content Action

    ✅ How to Create a OneNote Page with Content from a Different Page

     

    Hope this helps!

    If I helped you solve your problem—please mark my post as a solution ✅.
    Consider giving me a 👍 if you liked my response!

    👉 Level up your Power Automate skills by checking out my tutorials on YouTube
    👉 Tips and Tricks on TikTok and Instagram

     

  • miaroze Profile Picture
    28 on at

    Thank you so much! Using that and your video here: https://www.youtube.com/watch?v=FbEJ-P5Zji8&t=133s 

     

    I figured out how to get the pages in the sections I wanted!

  • creativeopinion Profile Picture
    10,508 Moderator on at

    @miaroze Great! No worries! Glad you figured it out!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 589

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 284 Super User 2026 Season 1

Last 30 days Overall leaderboard