CONNECT APP
Build with Notion
Productivity
- OAuth
MCP
Give your agent Notion tools
Every Notion action is exposed as an MCP tool on Pipedream's remote server. Point a client at it with your end user's ID and Connect resolves that user's Notion account for each tool call — you store no tokens.
// accessToken: mint a short-lived token with the Connect SDK — see the MCP guide
const transport = new StreamableHTTPClientTransport(
new URL("https://remote.mcp.pipedream.net/v3"),
{
requestInit: {
headers: {
Authorization: `Bearer ${accessToken}`,
"x-pd-project-id": "{project_id}",
"x-pd-environment": "production",
"x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
"x-pd-app-slug": "notion",
},
},
},
)
const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)
const { tools } = await mcp.listTools()
// e.g. run Append Block to Parent:
const result = await mcp.callTool({
name: "notion-append-block",
arguments: {
pageId: "Page ID or URL",
content: "Content",
},
})# access_token: mint a short-lived token with the Connect SDK — see the MCP guide
headers = {
"Authorization": f"Bearer {access_token}",
"x-pd-project-id": "{project_id}",
"x-pd-environment": "production",
"x-pd-external-user-id": "{external_user_id}", # any stable ID for this user in your system
"x-pd-app-slug": "notion",
}
async with streamablehttp_client("https://remote.mcp.pipedream.net/v3", headers=headers) as (read, write, _):
async with ClientSession(read, write) as session:
await session.initialize()
tools = await session.list_tools()
# e.g. run Append Block to Parent:
result = await session.call_tool("notion-append-block", {
"pageId": "Page ID or URL",
"content": "Content",
})API PROXY
Call the Notion API directly
For an endpoint with no pre-built tool, the Connect proxy forwards your request to the Notion API with the connected user's credentials attached. You store no tokens and write no refresh logic.
const resp = await pd.proxy.get({
externalUserId: "{external_user_id}", // any stable ID for this user in your system
accountId: "apn_xxxxxxx",
url: "https://api.notion.com/v1/users/me",
})
// Any allowed Notion endpoint works here. Pipedream attaches the
// connected account's credentials to the outgoing request.# The path segment is the target URL, URL-safe base64 encoded:
# https://api.notion.com/v1/users/me
curl "https://api.pipedream.com/v1/connect/{project_id}/proxy/aHR0cHM6Ly9hcGkubm90aW9uLmNvbS92MS91c2Vycy9tZQ?external_user_id={external_user_id}&account_id=apn_xxxxxxx" \
-H "Authorization: Bearer {access_token}" \
-H "x-pd-environment: production"SDK
Run Notion actions from your backend
Connect a user's Notion account once, then run Append Block to Parent on their behalf from your own code — TypeScript, Python, or plain HTTP.
import { PipedreamClient } from "@pipedream/sdk"
const pd = new PipedreamClient({
projectId: process.env.PIPEDREAM_PROJECT_ID!,
clientId: process.env.PIPEDREAM_CLIENT_ID!,
clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
projectEnvironment: "production",
})
const result = await pd.actions.run({
id: "notion-append-block",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
notion: { authProvisionId: "apn_xxxxxxx" },
pageId: "Page ID or URL",
content: "Content",
},
})from pipedream import Pipedream
pd = Pipedream(
client_id="{oauth_client_id}",
client_secret="{oauth_client_secret}",
project_id="{project_id}",
project_environment="production",
)
result = pd.actions.run(
id="notion-append-block",
external_user_id="{external_user_id}", # any stable ID for this user in your system
configured_props={
"notion": {"authProvisionId": "apn_xxxxxxx"},
"pageId": "Page ID or URL",
"content": "Content",
},
)curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
-H "Content-Type: application/json" \
-H "X-PD-Environment: production" \
-H "Authorization: Bearer {access_token}" \
-d '{
"external_user_id": "{external_user_id}",
"id": "notion-append-block",
"configured_props": {
"notion": { "authProvisionId": "apn_xxxxxxx" },
"pageId": "Page ID or URL",
"content": "Content"
}
}'TOOLS
Notion actions
On-demand operations your product or agent can configure and run on behalf of a connected user.
-
Append Block to Parent
actionAppend Markdown content to the bottom of a Notion page (or block). Thecontentis parsed from Markdown into Notion blocks — use it to add paragraphs, headings, bullet/numbered lists, to-dos, quotes, code, etc. Provide the page ID or URL (use Search to resolve a page name into an ID). To change a database row's property values instead, use Update Page. See the documentationWritev1.0.2 -
Complete File Upload
actionUse this action to finalize amode=multi_partfile upload after all of the parts have been sent successfully. See the documentationWritev0.0.12 -
Copy Page From Template
actionCopy an EXISTING page (template) into a new page with a new title. Use this ONLY when the user is reusing the structure of an existing page as a template (e.g. "copy this offer letter template for a new candidate"). Do NOT use to create a new page with original content — for that, use Create Page. The source page must already exist in Notion and is identified by its page ID. See the documentationWritev0.0.27 -
Create Comment
actionAdd a comment to a Notion page, or reply to an existing discussion thread. Provide either a page ID/URL (use Search to resolve a page name) or a discussion ID — not both. See the documentationWritev0.1.2 -
Create Database
actionCreate a new Notion database (data source) as a subpage of a parent page, defining its column schema. Provide the parent page ID or URL (use Search to resolve a page name into an ID).propertiesis a JSON object of column-name → column type. Each value is a property schema object, or shorthand for simple types:{ "Name": "title", "Quantity": "number", "Category": { "select": { "options": [ { "name": "A" }, { "name": "B" } ] } } }. Exactly one column must be thetitletype. See the documentationWritev1.0.2 -
Create File Upload
actionCreate a file upload. See the documentationWritev0.0.12 -
Create Page
actionCreate a new Notion page. Theparentcan be either another page (creates a subpage) or a database/data source (creates a row in that database). Provide the parent's ID or URL — use Search to resolve a name into an ID. When the parent is a database, setpropertiesto a flat JSON object of column-name → value (e.g.{ "Status": "Active", "ThreatLevel": 9 }); call Retrieve Database Schema first to learn the exact column names and valid select options.contentis the page body as Markdown (headings, bullet lists, paragraphs, etc.). See the documentationWritev1.0.2 -
Create Page from Data Source
actionCreate a new page (row) in a Notion data source (database). Provide the parent data source ID and the row's field values as a JSON object keyed by column name. Use the Search action (withfilter: data_source) to resolve a database name into its data source ID, and Retrieve Database Schema to learn the exact column names and types before setting values. Optionally add page body content withPage Content(Markdown). Example: parentDataSource"a1b2c3d4-..."with properties{ "Name": "Q1 Report", "Status": "In Progress", "Tags": ["finance"] }→ creates a new row with those fields and returns the created page object. See the documentationWritev3.0.0 -
Delete Block
actionSets a Block object, including page blocks, to archived: true using the ID specified. Example: blockId"1a2b3c4d-..."→ archives that block and returns the block object witharchived: true. See the documentationWritev0.0.12 -
Get Current User
actionRetrieve the Notion identity tied to the current OAuth token, returning the fullusers.retrievepayload forme(person or bot). Includes the user ID, name, avatar URL, type (personvsbot), and workspace ownership metadata—useful for confirming which workspace is connected, adapting downstream queries, or giving an LLM the context it needs about who is operating inside Notion. See the documentation.Read-onlyv0.0.4 -
Get Page
actionRetrieve a Notion page: both its property values and its body content rendered as Markdown. Use this to read what a page says or to inspect a database row's fields. Provide a page ID or a Notion page URL (use Search to resolve a page name into an ID). See the documentationRead-onlyv0.1.2 -
List All Users
actionReturns all users in the workspace. See the documentationRead-onlyv0.0.6 -
List File Uploads
actionUse this action to list file uploads. See the documentationRead-onlyv0.0.12 -
Query Data Source
actionFilter and sort the pages (rows) inside a Notion database (data source) by their property values. Discover exact property names and option values with Retrieve Database Schema first, then build a filter against them. Afilteris a JSON object: a single condition{ "property": "Status", "select": { "equals": "Escaped" } }, or a compound{ "and": [ ... ] }/{ "or": [ ... ] }. The condition key matches the property type — e.g.select,status,multi_select,number({ "greater_than": 5 }),checkbox({ "equals": true }),rich_text/title({ "contains": "..." }),date. Omitfilterto return all rows. Provide the data source ID (use Search withfilter: data_sourceto resolve a database name). See the documentationRead-onlyv1.1.2 -
Retrieve Data Source Content
actionGet all content of a data source. See the documentationRead-onlyv1.0.3 -
Retrieve Database Schema
actionGet the column (property) schema of a Notion database (data source): each property's name, type, and — forselect/multi_select/statuscolumns — its allowed option values. Call this before Query Data Source, Create Page, or Update Page on a database so you use exact property names and valid option values. Provide the data source ID (use Search withfilter: data_sourceto resolve a database name into its ID). See the documentationRead-onlyv1.1.2 -
Retrieve File Upload
actionUse this action to retrieve a file upload. See the documentationWritev0.0.12 -
Retrieve Page Content
actionGet page content as block objects or markdown. Blocks can be text, lists, media, a page, among others. Example: blockId"1a2b3c4d-..."with Retrieve Children set toAll Childrenand Retrieve as Markdown enabled → returns the block with its nestedchildrenarray plus amarkdownContentstring of the page text. See the documentationRead-onlyv0.3.0 -
Retrieve Page Property Item
actionGet a Property Item object for a selected page and property. See the documentationRead-onlyv0.0.14 -
Retrieve User
actionReturns a user using the ID specified. See the documentationRead-onlyv0.0.6 -
Search
actionSearch Notion for pages and databases (data sources) by title. Use this first to resolve a page or database name into an ID that the other Notion tools require (e.g. Query Data Source, Retrieve Database Schema, Get Page, Create Page). Leavequeryblank to list everything the integration can access. Setfiltertodata_sourceto find databases orpageto find pages — on the current Notion API a database is returned as adata_sourceobject, and itsidis the data source ID you pass to the database tools. See the documentationRead-onlyv1.0.2 -
Send File Upload
actionSend a file upload. See the documentationWritev0.0.13 -
Update Child Block
actionUpdate a single existing child block (paragraph, heading, to-do, code, etc.) by its block ID. Use this only to mutate an existing block in place. Do NOT use to update a page's properties (database row fields) — use Update Page instead. Do NOT use to add new content to a page — use Append Block to Parent instead. Do NOT use to update a database's schema — use Update Data Source instead. See the documentationWritev0.0.12 -
Update Data Source
actionUpdate a Notion database (data source): rename it, change its description, or add/rename/retype its columns. Provide the data source ID (use Search withfilter: data_sourceto resolve a database name, or Retrieve Database Schema to inspect existing columns).propertiesis a JSON object of changes: to add a column, use a new name → type (e.g.{ "Location": "rich_text" }); to rename/retype an existing column, key it by its current name/ID. Each value is a property schema object or a shorthand type name. See the documentationWritev2.0.2 -
Update Page
actionUpdate a Notion page's property values, and/or archive (delete) it. Properties you don't include are left unchanged. Provide the page ID or URL (use Search or Query Data Source to find it). Setpropertiesto a flat JSON object of column-name → value, e.g.{ "Status": "Contained" }; call Retrieve Database Schema first to learn the exact column names and valid select options. To add body content instead of changing properties, use Append Block to Parent. See the documentationWritev3.0.2
-
New Comment Created
triggerEmit new event when a new comment is created in a page or block. See the documentationv0.0.10 -
New Data Source Created
triggerEmit new event when a data source is created. See the documentationv0.1.2 -
New or Updated Page in Data Source (By Property)
triggerEmit new event when a page is created or updated in the selected data source. See the documentationv1.0.2 -
New or Updated Page in Data Source (By Timestamp)
triggerEmit new event when a page is created or updated in the selected data source. See the documentationv1.0.2 -
New Page in Data Source
triggerEmit new event when a page is created in the selected data source. See the documentationv1.0.2 -
New Webhook Event (Instant)
triggerEmit new event each time a webhook event is received. Webhook must be setup in Notion. See the documentationInstantv0.0.5 -
Page or Subpage Updated
triggerEmit new event when the selected page or one of its sub-pages is updated. See the documentationv0.0.15 -
Page Properties Updated (Instant)
triggerEmit new event each time a page property is updated in a data source. For use with Page Properties Updated event type. Webhook must be set up in Notion. See the documentationInstantv1.0.2 -
Page Updated
triggerEmit new event when a selected page is updated. See the documentationv0.0.14
MULTI-APP
Use Notion with other popular apps
Most products don't stop at one integration. Pair Notion with the other apps your users rely on, and ship use cases that span both.
- App slug
- notion
- Authentication
- OAuth
- Categories
- Productivity
- Actions
- 25
- Triggers
- 9
- API proxy
- Available