Documentation Index
Fetch the complete documentation index at: https://ai-kb.automationanywhere.com/llms.txt
Use this file to discover all available pages before exploring further.
The Notion Toolkit lets agents and workflows interact with Notion pages and databases. It supports searching content, querying and updating database records, reading and appending page content, and creating new pages.
Prerequisites
- A Notion account (free plan is sufficient)
- A Notion workspace (every account has one by default)
Creating a Connection
Workflow Builder
Agent Builder
- In the workflow, add a Notion toolkit step.
- Click Connect with Notion.
- Authorize the connection on the Notion consent screen and select which pages and databases to grant access to.
In chat, you will be prompted to connect to your Notion account via OAuth when the toolkit is first invoked.
The toolkit can only access pages and databases that have been explicitly shared with the connection. To share content, open the page or database in Notion, click ··· → Connections, and add your integration. Content in the same workspace that has not been shared is not visible.
| Tool | Description |
|---|
| Search | Search across all shared pages and databases by title |
| List Databases | Return all databases the connection can access |
| Get Database | Return the schema (column names and types) of a specific database |
| Query Database | Fetch records from a database with optional filters and sorting |
| Get Page | Retrieve the property values and metadata of a page or database record |
| Create Page | Create a new database record or sub-page |
| Update Page | Update properties of an existing page, or archive it |
| Get Page Content | Read the body text (content blocks) of a page |
| Append Content | Add new content blocks to the bottom of a page |
Search
Searches across all shared pages and databases, returning matches by title.
Key inputs:
| Input | Description |
|---|
| Query | The text to search for |
| Filter Type | Optionally restrict to page or database. Leave blank to search both. |
| Page Size | Number of results to return (default: 10, max: 100) |
Referencing results in downstream steps:
- First result’s ID:
{{ step.output.results[0].id }}
Example use case: Before creating a new client record, search by the client’s name. If count is greater than 0, the client already exists — use the existing record’s id instead of creating a duplicate.
Database Actions
List Databases
Returns all databases the connection can access, with their names and IDs.
Key inputs:
| Input | Description |
|---|
| Page Size | Number of databases to return (default: 20, max: 100) |
When to use it: Run this once in a test workflow to discover your database IDs. Copy the id of the database you want and hard-code it in subsequent steps.
Get Database
Returns the schema of a specific database — its column names and property types.
Key inputs:
| Input | Description |
|---|
| Database ID | The ID of the database — from List Databases, or from the Notion URL: the segment before the ?v= |
When to use it: Run this before writing Create Page or Update Page steps. It tells you the exact property names (case-sensitive) and their types, which determines the JSON format to use in the Properties field.
Get Database shows property types and names but not the available option values for Select fields. To see valid select options, open the database in Notion directly.
Query Database
Fetches records from a database with optional filtering and sorting.
Key inputs:
| Input | Description |
|---|
| Database ID | Which database to query |
| Filter | A JSON filter object (see examples below). Leave blank to return all records. |
| Sorts | A JSON array of sort rules (see examples below) |
| Page Size | Number of records to return (default: 20, max: 100) |
Filter examples:
Single filter — records where Status equals “In Progress”:
{
"property": "Status",
"select": { "equals": "In Progress" }
}
Filter by checkbox:
{
"property": "Done",
"checkbox": { "equals": false }
}
Filter by date — records with Due Date before a specific date:
{
"property": "Due Date",
"date": { "before": "2026-05-26" }
}
Combined filter with AND logic:
{
"and": [
{ "property": "Status", "select": { "equals": "In Progress" } },
{ "property": "Done", "checkbox": { "equals": false } }
]
}
Sort — newest first:
[
{ "property": "Created time", "direction": "descending" }
]
Referencing results in downstream steps:
- First result’s ID:
{{ step.output.results[0].id }}
- First result’s Status:
{{ step.output.results[0].properties.Status }}
- First result’s title:
{{ step.output.results[0].title }}
Page Actions
Get Page
Retrieves the property values and metadata of a specific page or database record.
Key inputs:
| Input | Description |
|---|
| Page ID | The page ID — from the Notion URL, or from Query Database or Search results |
Referencing values in downstream steps:
- Status:
{{ step.output.page.properties.Status }}
- Title:
{{ step.output.page.title }}
- Page ID:
{{ step.output.page.id }}
Example use case: A trigger fires with a page ID. Use Get Page to read the record’s current Status. If Status is “Pending”, continue the workflow — otherwise stop.
Create Page
Creates a new page — either as a record inside a database (new row) or as a child page under another page.
Key inputs:
| Input | Description |
|---|
| Parent ID | The database ID (for a new row) or page ID (for a sub-page) |
| Parent Type | database_id to add a database row, page_id to add a sub-page. Default: database_id |
| Title | The page or record title as plain text |
| Properties | Optional JSON object for additional field values. Keys must exactly match your database’s property names — use Get Database to confirm them. |
Properties format by field type:
// Select field
{ "Status": { "select": { "name": "To Do" } } }
// Status field (Notion's built-in Status type)
{ "Status": { "status": { "name": "In Progress" } } }
// Date field
{ "Due Date": { "date": { "start": "2026-06-01" } } }
// Checkbox field
{ "Done": { "checkbox": false } }
// Number field
{ "Priority Score": { "number": 8 } }
// Rich text field
{ "Notes": { "rich_text": [{ "text": { "content": "Needs review before sending." } }] } }
Full example — creating a task row:
Title: Follow up with client
Properties:
{
"Status": { "select": { "name": "To Do" } },
"Due Date": { "date": { "start": "2026-06-01" } },
"Done": { "checkbox": false }
}
The returned id can be passed to downstream steps to update or link to the new page.
Update Page
Updates the properties of an existing page, or archives it.
Key inputs:
| Input | Description |
|---|
| Page ID | The page to update — from Query Database, Get Page, or Search |
| Properties | JSON object with only the fields you want to change (same format as Create Page). Fields not included are left unchanged. |
| Archived | Set to true to archive (soft-delete) the page |
Example — marking a task as done:
{
"Status": { "select": { "name": "Done" } },
"Done": { "checkbox": true },
"Completed On": { "date": { "start": "2026-05-26" } }
}
Example — archiving a record: Leave Properties empty and set Archived to true. The record disappears from the database view but can be restored from Notion’s trash.
Typical pattern:
- Use Query Database to find the record and get its
id
- Feed that
id into Update Page to change its fields
Content Actions
Get Page Content
Retrieves the content blocks inside a Notion page — paragraphs, headings, bullet lists, etc. This is separate from the page’s properties (database fields). Use this to read the body text of a document.
Key inputs:
| Input | Description |
|---|
| Page ID | The page to read content from |
| Page Size | Number of blocks to return (default: 50, max: 100) |
Referencing values in downstream steps:
- First block’s text:
{{ step.output.blocks[0].text }}
- All blocks:
{{ step.output.blocks }}
Example use case: Get the page content, pass all text blocks to an AI step to generate a summary, then send that summary via email or Telegram.
Append Content
Adds new content blocks to the bottom of an existing Notion page.
Key inputs:
| Input | Description |
|---|
| Page ID | The page to append content to |
| Children | A JSON array of Notion block objects to add |
Example — appending a heading and a paragraph:
[
{
"object": "block",
"type": "heading_2",
"heading_2": {
"rich_text": [{ "type": "text", "text": { "content": "Workflow Run — May 26" } }]
}
},
{
"object": "block",
"type": "paragraph",
"paragraph": {
"rich_text": [{ "type": "text", "text": { "content": "3 records processed. 1 error found." } }]
}
}
]
Example — appending a bullet list item:
[
{
"object": "block",
"type": "bulleted_list_item",
"bulleted_list_item": {
"rich_text": [{ "type": "text", "text": { "content": "New lead: Jane Doe — jane@example.com" } }]
}
}
]
Example use case: A workflow runs every morning, processes data, and appends a one-line log entry to a “Daily Log” page — building a running audit trail without creating a new page each time.
Troubleshooting
| Symptom | Likely Cause | Fix |
|---|
401 Unauthorized | Token revoked or missing | Re-authorize via the OAuth flow |
404 Not Found on page or database | Content not shared with connection | Share the page via ··· → Connections |
| Empty search or query results | Nothing shared with connection | Share at least one page or database |
| Property update silently ignored | Property name case mismatch | Use Get Database to confirm exact property names — they are case-sensitive |
oauth_not_configured error | Client ID/secret not saved in Super Admin | See Notion OAuth Setup |