What can you do with it?
OneNote allows you to manage your digital notebooks programmatically through the Microsoft Graph API. You can create new pages in specific sections, update existing page content by appending or modifying notes, retrieve page content and metadata, delete pages you no longer need, and search across all your pages to find specific information. This integration is perfect for note-taking automation, knowledge management systems, meeting notes organization, and building applications that interact with OneNote notebooks.
How to use it?
Basic Command Structure
/your-OneNote-connection [action] [required-parameters] [optional-parameters]
Parameters
Required:
action
- The operation to perform with OneNote
Create Page
Create a new page in a OneNote section
Parameters:
section-id
(required) - The ID of the section where the page will be created
title
(required) - Title for the new page
content
(required) - HTML content for the page
Example:
/your-OneNote-connection
action: create-page
section-id: 1-abc123
title: Meeting Notes - March 20
content: <!DOCTYPE html><html><head><title>Meeting Notes</title></head><body><p>Attendees: John, Sarah, Mike</p><p>Topics discussed:</p><ul><li>Q1 Review</li><li>Budget Planning</li></ul></body></html>
Response:
{
"id": "1-def456",
"title": "Meeting Notes - March 20",
"createdDateTime": "2025-01-15T09:00:00Z",
"lastModifiedDateTime": "2025-01-15T09:00:00Z",
"contentUrl": "https://graph.microsoft.com/v1.0/users/me/onenote/pages/1-def456/content"
}
Update Page
Append or modify content on an existing page
Parameters:
page-id
(required) - The ID of the page to update
target
(required) - Where to apply the update (e.g., body, title)
action
(required) - Type of update: append, replace, or insert
content
(required) - HTML content to add or modify
Example:
/your-OneNote-connection
action: update-page
page-id: 1-def456
target: body
action: append
content: <p>Action items:</p><ul><li>Send follow-up email by Friday</li><li>Schedule next meeting</li></ul>
Response:
{
"status": 204,
"message": "Page updated successfully"
}
Get Page
Retrieve the content and metadata of a specific page
Parameters:
page-id
(required) - The ID of the page to retrieve
Example:
/your-OneNote-connection
action: get-page
page-id: 1-def456
Response:
{
"id": "1-def456",
"title": "Meeting Notes - March 20",
"content": "<!DOCTYPE html><html><head><title>Meeting Notes</title></head><body><p>Attendees: John, Sarah, Mike</p><p>Topics discussed:</p><ul><li>Q1 Review</li><li>Budget Planning</li></ul><p>Action items:</p><ul><li>Send follow-up email by Friday</li><li>Schedule next meeting</li></ul></body></html>",
"createdDateTime": "2025-01-15T09:00:00Z",
"lastModifiedDateTime": "2025-01-15T09:30:00Z",
"parentSection": {
"id": "1-abc123",
"displayName": "Work Meetings"
}
}
Delete Page
Remove a page from OneNote
Parameters:
page-id
(required) - The ID of the page to delete
Example:
/your-OneNote-connection
action: delete-page
page-id: 1-def456
Response:
{
"status": 204,
"message": "Page deleted successfully"
}
Search Pages
Find pages that match a search query
Parameters:
query
(required) - Search term to find in page titles or content
Example:
/your-OneNote-connection
action: search-pages
query: budget planning
Response:
{
"value": [
{
"id": "1-ghi789",
"title": "Q1 Budget Planning Meeting",
"createdDateTime": "2025-01-10T10:00:00Z",
"parentSection": {
"displayName": "Finance"
},
"preview": "Discussion about Q1 budget allocations..."
},
{
"id": "1-jkl012",
"title": "Annual Budget Review",
"createdDateTime": "2025-01-12T14:00:00Z",
"parentSection": {
"displayName": "Planning"
},
"preview": "Overview of annual budget planning process..."
}
]
}
Notes
Both PinkConnect and Paragon proxies are supported with different endpoint structures. Page content must be provided as valid HTML including DOCTYPE, html, head, and body tags. The update action supports append, replace, and insert operations on different page elements. Search functionality looks through both page titles and content. Section IDs are required for creating pages - these can be obtained through the OneNote sections API.