For the complete documentation index, see llms.txt. This page is also available as Markdown.

OneNote

OneNote integration providing OAuth2 authentication for notebook, section, and page workflows. Supports creating, listing, reading (as HTML or markdown), searching, updating, and deleting OneNote content.

  • Knowledge base source

Connectors

Choose the connector that matches your authentication method. The options below use the names shown in StackAI.

Connector
Authentication

OneNote

OAuth sign-in

OneNote (Actions)

OAuth sign-in

OneNote

Connect to Microsoft OneNote via Graph OAuth2 for notebook/page access.

Set up in OneNote

  1. Sign in with your Microsoft account.

  2. Authorize the requested notebook/page read permissions (this connector is intended for using OneNote as a knowledge-base source).

Set up in StackAI

  1. Open Settings → Connections, add a connection, and select OneNote.

  2. Select Connect, sign in to the provider account, and review the requested access. Complete authorization to return to StackAI.

  3. Save the connection and check its connection status. Select this saved connection when configuring an action or feature that uses it.

StackAI obtains the OAuth credentials during sign-in. You do not need to paste an access token or refresh token.

Provider documentation: Setup reference.

OneNote (Actions)

Connect to OneNote with write access to create, edit, and manage notebooks, sections, and pages from within an agent. Use the plain OneNote connector if you only need OneNote as a knowledge base source.

Set up in OneNote

  1. Sign in with your Microsoft account.

  2. Authorize the requested read/write permissions (this connector grants write access so agents can create and edit notebooks, sections, and pages).

Set up in StackAI

  1. Open Settings → Connections, add a connection, and select OneNote (Actions).

  2. Select Connect, sign in to the provider account, and review the requested access. Complete authorization to return to StackAI.

  3. Save the connection and check its connection status. Select this saved connection when configuring an action or feature that uses it.

StackAI obtains the OAuth credentials during sign-in. You do not need to paste an access token or refresh token.

Provider documentation: Setup reference.

Verify the connection

Check that the connection is healthy. Then run a read operation against a resource the connected account can access. A successful connection check confirms authentication; it does not guarantee permission for every action.

If access is denied, check the credential or OAuth permissions, the selected account or environment, and access to the specific resource. Update expired credentials or reconnect after permissions change.

Use an action

  1. Add the required OneNote action to the workflow.

  2. Select a connection when the action requests one.

  3. Complete the required fields. Use the reference picker when a value comes from another workflow step.

  4. Run the workflow and inspect the action’s output. Check the result before using it in a later step.

Actions

Create Notebook

Create a new OneNote notebook

Inputs

Field
Type
Required
Description

Site (Optional)

select (string)

No

Optional. Create the notebook in a SharePoint site instead of your personal OneDrive. Pick from the dropdown or paste a site ID. Leave empty for personal. Options load from the selected connection.

Notebook Name

string

Yes

The display name for the new notebook (max 128 characters).

Outputs

Field
Type
Description

Notebook ID

string

The ID of the created notebook.

Display Name

string

The display name of the created notebook.

Created Date

string

When the notebook was created.

Web URL

string

URL to open the notebook in OneNote on the web.

Client URL

string

URL to open the notebook in the OneNote desktop app.

Is Default

boolean

Whether this is the user's default notebook.

User Role

string

The current user's role on the notebook (Owner, Contributor, Reader, None).

Result Message

string

Summary of the notebook creation operation.

Create Section

Create a new section in a OneNote notebook

Inputs

Field
Type
Required
Description

Notebook

select (string)

Yes

The notebook to create the section in. Pick from the dropdown or paste a notebook ID. Options load from the selected connection.

Section Name

string

Yes

The display name for the new section (max 50 characters).

Outputs

Field
Type
Description

Section ID

string

The ID of the created section.

Display Name

string

The display name of the created section.

Created Date

string

When the section was created.

Web URL

string

URL to open the section in OneNote on the web.

Result Message

string

Summary of the section creation operation.

Create Page

Create a new page in a OneNote section

Inputs

Field
Type
Required
Description

Notebook

select (string)

Yes

The notebook containing the target section. Pick from the dropdown or paste a notebook ID. Options load from the selected connection.

Section

select (string)

Yes

The section to create the page in. Pick from the dropdown or paste a section ID. Options load from the selected connection.

Page Title

string

Yes

The title of the new page.

Content (HTML)

textarea

No

HTML content for the page body.

Outputs

Field
Type
Description

Page ID

string

The ID of the created page.

Title

string

The title of the created page.

Content URL

string

URL to access the page content.

Created Date

string

When the page was created.

Web URL

string

URL to view the page in OneNote.

Result Message

string

Summary of the page creation operation.

List Notebooks

List OneNote notebooks you have access to

Inputs

Field
Type
Required
Description

Site (Optional)

select (string)

No

Optional. List notebooks from a SharePoint site instead of your personal notebooks. Pick from the dropdown or paste a site ID. Leave empty for personal. Options load from the selected connection.

Limit

integer

No

Maximum number of notebooks to retrieve. Default: 100.

Outputs

Field
Type
Description

Notebooks

object_array

List of OneNote notebooks.

Total Count

number

Total number of notebooks returned.

Result Message

string

Summary of the notebooks listing operation.

List Sections

List sections in a OneNote notebook

Inputs

Field
Type
Required
Description

Notebook

select (string)

Yes

The notebook to list sections from. Pick from the dropdown or paste a notebook ID. Options load from the selected connection.

Limit

integer

No

Maximum number of sections to retrieve. Default: 100.

Outputs

Field
Type
Description

Sections

object_array

List of sections in the notebook.

Total Count

number

Total number of sections returned.

Result Message

string

Summary of the sections listing operation.

List Pages

List pages in a OneNote section

Inputs

Field
Type
Required
Description

Notebook

select (string)

Yes

The notebook containing the section. Options load from the selected connection.

Section

select (string)

Yes

The section to list pages from. Pick from the dropdown or paste a section ID. Options load from the selected connection.

Limit

integer

No

Maximum number of pages to retrieve. Default: 100.

Outputs

Field
Type
Description

Pages

object_array

List of pages in the section.

Total Count

number

Total number of pages returned.

Result Message

string

Summary of the pages listing operation.

Read Notebook

Read every page of every section of a OneNote notebook as markdown

Inputs

Field
Type
Required
Description

Notebook

select (string)

Yes

The notebook to read. Options load from the selected connection.

Max Pages

integer

No

Maximum number of pages to read across the whole notebook. Minimum: 1. Maximum: 100. Default: 100.

Outputs

Field
Type
Description

Notebook ID

string

The ID of the notebook.

Notebook Title

string

The display name of the notebook.

Content (Markdown)

textarea

The notebook content as markdown. The notebook title is rendered as '# Notebook: <title>', each section as '## Section: <title>', and each page as '### Page: <title>' followed by its content.

Section Count

number

Number of sections traversed.

Page Count

number

Number of pages whose content was read.

Truncated

boolean

True if more pages exist than max_pages allowed.

Result Message

string

Summary of the notebook read.

Read Section

Read every page in a OneNote section as markdown

Inputs

Field
Type
Required
Description

Notebook

select (string)

Yes

The notebook containing the section. Options load from the selected connection.

Section

select (string)

Yes

The section to read. Options load from the selected connection.

Max Pages

integer

No

Maximum number of pages to read from the section. Minimum: 1. Maximum: 100. Default: 100.

Outputs

Field
Type
Description

Section ID

string

The ID of the section.

Section Title

string

The display name of the section.

Content (Markdown)

textarea

The section content as markdown. The section title is rendered as a top-level '# Section: <title>' header; each page is a '## Page: <title>' subheader followed by its content.

Page Count

number

Number of pages whose content was read.

Truncated

boolean

True if more pages exist than max_pages allowed.

Result Message

string

Summary of the section read.

Read Page

Read a OneNote page as markdown (attachments stripped)

Inputs

Field
Type
Required
Description

Notebook

select (string)

Yes

The notebook containing the page. Pick from the dropdown or paste a notebook ID. Options load from the selected connection.

Section

select (string)

Yes

The section containing the page. Pick from the dropdown or paste a section ID. Options load from the selected connection.

Page

select (string)

Yes

The page to read. Pick from the dropdown or paste a page ID. Options load from the selected connection.

Outputs

Field
Type
Description

Page ID

string

The ID of the page.

Title

string

The title of the page.

Content (Markdown)

string

The page content as markdown (attachments stripped).

Result Message

string

Summary of the page read.

Get Page Content

Get the HTML content of a OneNote page

Inputs

Field
Type
Required
Description

Notebook

select (string)

Yes

The notebook containing the page. Pick from the dropdown or paste a notebook ID. Options load from the selected connection.

Section

select (string)

Yes

The section containing the page. Pick from the dropdown or paste a section ID. Options load from the selected connection.

Page

select (string)

Yes

The page to retrieve content from. Pick from the dropdown or paste a page ID. Options load from the selected connection.

Outputs

Field
Type
Description

Page ID

string

The ID of the page.

Title

string

The title of the page.

Content (HTML)

string

The HTML content of the page.

Created Date

string

When the page was created.

Last Modified Date

string

When the page was last modified.

Result Message

string

Summary of the page content retrieval.

Search Pages

Search for pages across OneNote notebooks

Inputs

Field
Type
Required
Description

Search Query

string

No

Text to search for in page titles.

Notebook (Optional)

select (string)

No

Optionally filter by notebook. Pick from the dropdown or paste a notebook ID. Options load from the selected connection.

Section (Optional)

select (string)

No

Optionally filter by section. Pick from the dropdown or paste a section ID. Options load from the selected connection.

Limit

integer

No

Maximum number of pages to return. Default: 50.

Outputs

Field
Type
Description

Pages

object_array

List of matching pages.

Total Count

number

Total number of pages returned.

Result Message

string

Summary of the search operation.

Update Page Content

Append, prepend, or replace content on a OneNote page

Inputs

Field
Type
Required
Description

Notebook

select (string)

Yes

The notebook containing the page. Pick from the dropdown or paste a notebook ID. Options load from the selected connection.

Section

select (string)

Yes

The section containing the page. Pick from the dropdown or paste a section ID. Options load from the selected connection.

Page

select (string)

Yes

The page to update. Pick from the dropdown or paste a page ID. Options load from the selected connection.

Action

select (string)

No

How to add the content: append (end), prepend (beginning), or replace. Available values: Append, Prepend, Replace. Default: append.

Content (HTML)

textarea

Yes

HTML content to add to the page.

Target

string

No

Target element on the page (default: 'body'). Use '#data-id' for named elements or a generated Graph element ID for replace operations. Default: body.

Outputs

Field
Type
Description

Success

boolean

Whether the content update succeeded.

Page ID

string

The ID of the updated page.

Result Message

string

Summary of the content update operation.

Delete Page

Delete a OneNote page

Inputs

Field
Type
Required
Description

Notebook

select (string)

Yes

The notebook containing the page. Pick from the dropdown or paste a notebook ID. Options load from the selected connection.

Section

select (string)

Yes

The section containing the page. Pick from the dropdown or paste a section ID. Options load from the selected connection.

Page

select (string)

Yes

The page to delete. Pick from the dropdown or paste a page ID. Options load from the selected connection.

Outputs

Field
Type
Description

Success

boolean

Whether the page was successfully deleted.

Deleted Page ID

string

The ID of the deleted page.

Result Message

string

Summary of the delete operation.

Important behavior

If an operation is denied, check the connection’s granted permissions and the account’s access in the provider. Reauthorize the connection when it needs additional permissions.

Actions that create, update, send, or delete data can change the connected service. Review their inputs before running them. A retry can repeat an operation; consider this when configuring retries for actions that change data.

The catalog lists the fields and capabilities available in the supplied provider definition. Availability can also depend on your deployment and organization’s Feature Access settings.

Last updated

Was this helpful?