Notion
Read and write Notion pages and databases from an InTouch job, using the official Notion REST API.
- Base URL:
https://api.notion.com - Auth:
Authorization: Bearer <token> - Required version header:
Notion-Version: 2026-03-11 - Grounded in: https://developers.notion.com/reference/intro
This tool uses the Python standard library only — no external packages.
Operations
| operation | Notion endpoint | What it does |
|---|---|---|
search |
POST /v1/search |
Find pages / data sources by title |
retrieve_page |
GET /v1/pages/{page_id} |
Fetch a single page's properties |
query_database |
POST /v1/databases/{database_id}/query |
List rows in a database, with optional filter |
create_page |
POST /v1/pages |
Create a new page under a page or database |
Inputs
| name | required | used by | description |
|---|---|---|---|
apiKey |
yes | all | Notion integration token (see below) |
operation |
yes | all | One of the four operations above |
query |
no | search | Title text to match (empty = all items shared with the integration) |
pageId |
no | retrieve_page | UUID of the page to retrieve |
databaseId |
no | query_database | UUID of the database to query |
filter |
no | query_database | JSON filter object string |
parentId |
no | create_page | UUID of the parent page or database |
parentType |
no | create_page | page_id (default) or database_id |
title |
no | create_page | Title text for the new page |
pageSize |
no | search/query | Max results per page, 1–100 (default 20) |
Outputs
| key | description |
|---|---|
result |
The raw JSON response body from Notion (as a string) |
status |
The HTTP status code (200, 400, 404, …) |
A 4xx/5xx from Notion does not crash the step — result holds the error
body and an error field carries the message. A transport-level failure
(DNS/timeout/refused) prints an error envelope and exits non-zero (step FAILS).
How to get the apiKey
- Go to https://www.notion.com/my-integrations and create a new internal integration.
- Copy the Internal Integration Token (starts with
ntn_orsecret_). This is yourapiKey. - In Notion, open each page or database you want the tool to access, click the
…menu → Connections → add your integration. The API can only see content explicitly shared with the integration.
Examples
Search for pages titled "Roadmap"
operation = search
query = Roadmap
apiKey = ntn_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Create a page under an existing page
operation = create_page
parentType = page_id
parentId = 7c8f... (UUID of the parent page)
title = Meeting notes 2026-06-13
apiKey = ntn_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Query a database for completed items
operation = query_database
databaseId = a1b2... (UUID of the database)
filter = {"property":"Done","checkbox":{"equals":true}}
apiKey = ntn_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx