Notion

Notion operations — create pages, query databases, update properties, and append content blocks via the Notion REST API.

When to Use

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.

Inputs

HandleTypeDescription
inputanyUpstream data for {{ input.field }} template references in settings.

Output

HandleTypeDescription
resultobjectNotion operation result

The result (accessed as {{ notion.* }}) shape:

FieldTypeDescription
successbooleanWhether the operation succeeded
idstringCreated or updated page/block ID
urlstringURL to the Notion page when applicable
resultsarrayQuery results (for query_database)
errorstringError message if success is false
{
  "success": true,
  "id": "abc123-def456",
  "url": "https://www.notion.so/abc123def456",
  "results": [],
  "error": null
}

Settings

Each node run executes a single operation. Set Operation, then configure the fields shown for that operation.

Operation

SettingTypeDefaultDescription
operationenumcreate_pageNotion action to perform: create_page, update_page, query_database, or append_blocks.

Agent Permissions

SettingTypeDefaultDescription
allowed_operationsmulti-selectAll operationsWhich 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.

create_page

Shown when operation is create_page:

SettingTypeDefaultDescription
database_idstringNotion database ID. Supports {{ }} bindings.
propertiescode editor (JSON)Page properties in Notion API format. Supports {{ }} bindings.
childrencode editor (JSON)Block children to add to the page body as a JSON array. Supports {{ }} bindings.

update_page

Shown when operation is update_page:

SettingTypeDefaultDescription
page_idstringNotion page ID. Supports {{ }} bindings.
propertiescode editor (JSON)Properties to update in Notion API format. Supports {{ }} bindings.

query_database

Shown when operation is query_database:

SettingTypeDefaultDescription
database_idstringNotion database ID. Supports {{ }} bindings.
filtercode editor (JSON)Query filter in Notion filter format. Supports {{ }} bindings.

append_blocks

Shown when operation is append_blocks:

SettingTypeDefaultDescription
page_idstringNotion page ID. Supports {{ }} bindings.
childrencode editor (JSON)Block objects to append in Notion API format as a JSON array. Supports {{ }} bindings.

Required Secrets

Configure on the Environment Variables page:

VariableDescription
NOTION_TOKENNotion 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).

Example

Canvas

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 }}.

TSL

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

Error Handling

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.

Common Gotchas

  • Share with integration: The API cannot access databases or pages you have not explicitly connected to your integration in Notion.
  • Property format: properties, filter, and children must use valid Notion API JSON — invalid structure causes API errors.
  • Database ID vs Page ID: create_page and query_database use database_id; update_page and append_blocks use page_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.

See Also

On this page