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 / Automate the creation ...
Power Automate
Suggested Answer

Automate the creation of Sections in a OneNote Notebook

(1) ShareShare
ReportReport
Posted on by
I have a .csv file with all my customers in it. As I add customers to the csv, I'd like to have OneNote create a new Section with the customers name from the csv file for any new customer name I've added. Then, under the newly created customer section, I'd like to create sections for (subfolders) "Art", "Notes", "Files", "Email", "Confidential Notes". 
 
I'm stuck at the point where it creates a section in the Notebook. I get an error " Cloud Connector call failed with status code 'BadRequest' " It reads the csv correctly, but doesn't do anything from there. 
 
Can anyone provide advice or guidance?
I have the same question (0)
  • ronaldwalcott Profile Picture
    3,866 Moderator on at
    Which connector are you using or are you using Graph APIs?
     
    Sorry just realized that this is under PAD.
  • Suggested answer
    eetuRobo Profile Picture
    4,522 Super User 2026 Season 1 on at
    Can you show how does your flow look like?
    Things that might be the problem:
    -The connection reference is broken
    -Your Create section in a notebook -action is trying to send the data in incorrect format. So for example maybe you are accidentaly sending a whole table to it rather than the tables one cell value so just the text
    -Notebook Key is not correct

    Try recreating the Connector reference for that OneNote action. Try inserting just some hard coded text to the Name of the new section to see if the problem is in the variable:


    I did one quickly and seemed to work


    Crete section in a notebook looks like this:


    Since the %CurrentItem% has just one column you can reference it like that. But if it has more than one column then refer to it %CurrentItem[0]% to get the name from the first column.
  • GW-14041342-0 Profile Picture
    2 on at
    Thank you for the volunteer help! Here is a snip of my flow: 
     
  • Suggested answer
    eetuRobo Profile Picture
    4,522 Super User 2026 Season 1 on at
    You seem to have Power Fx enabled. I suggest you create new flow and turn it off since building flows with Power Fx enabled is gonna be more difficult for beginners and doesn't really give any benefits at this point. Most tutorials/threads/documentation will be in the regular flows syntax.



    If you really need to use Power Fx then you need to be familiar with Power Fx syntax. I think Power Fx does not have "Contains" syntax. In Power Fx you would use "in" syntax. So like this: 
    ="Automate" in "Power Automate Desktop"


    So maybe in your case it might be =CurrentItem in GetSectionsInNotebookResponse

    But I will get error with that in Power Fx Enabled and I recommend you just change to Power Fx Disabled regular flow so it will be more straight forward to do this process with PAD.

    Try creating the same flow I shared in previous post but with Power Fx disabled.
     

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
Vish WR Profile Picture

Vish WR 873

#2
Valantis Profile Picture

Valantis 820

#3
Haque Profile Picture

Haque 505

Last 30 days Overall leaderboard