Notion
Notion operations — create pages, query databases, update properties, and append content blocks via the Notion REST API.
Use Notion when you need to automate your workspace:
- Create new pages in a database from form submissions or webhook events
- Update page properties (status, assignee, dates) on existing records
- Query a database with filters to find matching pages
- Append content blocks to an existing page (notes, logs, summaries)
Connect a Notion node to an AI Agent Tools handle to let the agent create tasks, update records, or query your workspace.
| Handle | Type | Description |
|---|---|---|
input | any | Upstream data for {{ input.field }} template references in settings. |
| Handle | Type | Description |
|---|---|---|
result | object | Notion operation result |
The result (accessed as {{ notion.* }}) shape:
| Field | Type | Description |
|---|---|---|
success | boolean | Whether the operation succeeded |
id | string | Created or updated page/block ID |
url | string | URL to the Notion page when applicable |
results | array | Query results (for query_database) |
error | string | Error message if success is false |
{
"success": true,
"id": "abc123-def456",
"url": "https://www.notion.so/abc123def456",
"results": [],
"error": null
}
Each node run executes a single operation. Set Operation, then configure the fields shown for that operation.
| Setting | Type | Default | Description |
|---|---|---|---|
operation | enum | create_page | Notion action to perform: create_page, update_page, query_database, or append_blocks. |
| Setting | Type | Default | Description |
|---|---|---|---|
allowed_operations | multi-select | All operations | Which operations are available when this plugin is used as an AI agent tool. Excluded from the tool schema — the agent can only invoke operations in this list. |
Shown when operation is create_page:
| Setting | Type | Default | Description |
|---|---|---|---|
database_id | string | — | Notion database ID. Supports {{ }} bindings. |
properties | code editor (JSON) | — | Page properties in Notion API format. Supports {{ }} bindings. |
children | code editor (JSON) | — | Block children to add to the page body as a JSON array. Supports {{ }} bindings. |
Shown when operation is update_page:
| Setting | Type | Default | Description |
|---|---|---|---|
page_id | string | — | Notion page ID. Supports {{ }} bindings. |
properties | code editor (JSON) | — | Properties to update in Notion API format. Supports {{ }} bindings. |
Shown when operation is query_database:
| Setting | Type | Default | Description |
|---|---|---|---|
database_id | string | — | Notion database ID. Supports {{ }} bindings. |
filter | code editor (JSON) | — | Query filter in Notion filter format. Supports {{ }} bindings. |
Shown when operation is append_blocks:
| Setting | Type | Default | Description |
|---|---|---|---|
page_id | string | — | Notion page ID. Supports {{ }} bindings. |
children | code editor (JSON) | — | Block objects to append in Notion API format as a JSON array. Supports {{ }} bindings. |
Configure on the Environment Variables page:
| Variable | Description |
|---|---|
NOTION_TOKEN | Notion Internal Integration Token (e.g. ntn_...). Create an integration at notion.so/my-integrations and share target databases/pages with it. |
Notion uses Internal Integration Tokens — no OAuth redirect flow is needed. You must explicitly share each database or page with the integration before the API can access it (open the database in Notion → ⋯ → Connections → add your integration).
Create a task in a Notion database from a webhook:
Webhook Trigger → Notion (create_page)
Notion settings:
- Operation:
create_page - Database ID:
abc123def456789 - Properties:
{ "Name": { "title": [{ "text": { "content": "{{ webhook.body.title }}" } }] }, "Status": { "select": { "name": "To Do" } } }
Access the result downstream:
{{ notion.success }}
{{ notion.url }}
{{ notion.id }}
Query a database and process results:
Manual Trigger → Notion (query_database) → Transform
Notion settings:
- Operation:
query_database - Database ID:
abc123def456789 - Filter:
{ "property": "Status", "select": { "equals": "In Progress" } }
Iterate over results with {{ notion.results }}.
import webhook from @tensorify/webhook-trigger:4.0.0
import notion from @tensorify/notion:1.0.0
node trigger @tensorify/webhook-trigger:4.0.0 {
path = "/tasks"
method = "POST"
}
node create_page @tensorify/notion:1.0.0 {
operation = "create_page"
database_id = "abc123def456789"
properties = "{\"Name\": {\"title\": [{\"text\": {\"content\": \"{{ webhook.body.title }}\"}}]}}"
}
trigger.payload -> create_page.input
Notion has a hidden On Error control output branch (error). Enable it via the "Error output handle" toggle at the bottom of the settings panel.
The error branch fires when the Notion API returns an error or the request fails at runtime. On the main path, failures are also reflected in {{ notion.success }} and {{ notion.error }} on the result output.
- Share with integration: The API cannot access databases or pages you have not explicitly connected to your integration in Notion.
- Property format:
properties,filter, andchildrenmust use valid Notion API JSON — invalid structure causes API errors. - Database ID vs Page ID:
create_pageandquery_databaseusedatabase_id;update_pageandappend_blocksusepage_id. - Check
notion.success: The node completes on the main output even when the API call fails. Use an If node or the On Error branch to handle failures. - Agent permissions: Restrict Allowed Operations (Agent) to prevent an AI agent from modifying records you want read-only.
- AI Agent — connect Notion as an agent tool
- Transform — shape query results for downstream nodes
- Webhook Trigger — trigger Notion updates from external events
- Environment Variables — store your
NOTION_TOKEN
