Reputation: 9054
I am creating a PowerApps and I need to add some data through PowerApps canvas to OneNote, in OneNote connector doc it (https://learn.microsoft.com/en-us/connectors/onenote/#createsectioninnotebookresponse) for creating section in OneNote it mentions API Key of one note, how can I get that or where can I find that
I created a button and I don't know how to or where to get notebookKey
'OneNote(Business)'.CreateSectionInNotebook(notebookKey,{name:"Section name"})
Upvotes: 0
Views: 672
Reputation: 12111
It's not an API Key but the Notebook Key (similar to the ID of the Notebook).
You will first need to call:
'OneNote(Business)'.GetNotebooks()
To get the list of Notebooks, this will return an array of FileName and Key.
Try adding a Data Table and set it's Items to: 'OneNote(Business)'.GetNotebooks()
, then add the two fields so you can see the list.
Suggest you filter on the Key (as this contains the Url of the Notebook) and not the Filename as you could have two or more Notebooks with the same name.
And example of getting a Key:
Set(NotebookKey, LookUp('OneNote(Business)'.GetNotebooks(), "sharepoint.com/teams/team-alpha" in Key).Key);
Upvotes: 0