Notion

Create pages and manage databases in Notion.

ProductivityOAuth13 actionsAll integrations

On this page
  1. Connect
  2. Call it from a workflow
  3. Actions (13)
  4. create_database_item
  5. createPage
  6. retrieve_database
  7. update_database_item
  8. add_comment
  9. append_to_page
  10. archive_database_item
  11. custom_api_call
  12. find_page
  13. get_page_comments
  14. getPageOrBlockChildren
  15. notion-find-database-item
  16. restore_database_item
  17. Details

Connect

Auth type: OAuth (oauth2). The connection holds the provider's OAuth tokens. They are sealed on the server and only opened when an action runs.

  • From your agent: integrations {action: "connect", piece, credentials, env} stores the credentials for dev, prod or all. Answers name the fields, never the values.
  • Or set the integration's project secrets with the secrets tool (SLACK_BOT_TOKEN, DISCORD_WEBHOOK_URL, TELEGRAM_BOT_TOKEN, TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN …): a call uses the connection, else those secrets. integrations {action: "catalog", piece} lists which ones work.
  • Try one action now with integrations {action: "call", piece, piece_action, input}. It really sends.

Call it from a workflow

step.ctx.integrations.invoke("notion", action, input) resolves with the provider's answer and rejects when Notion isn't connected or refuses. Wrap it in step.run so a retry sends once. See step.ctx. Its actions run through the integration runner, which the server's operator turns on: integrations {action: "catalog", piece: "notion"} says whether yours can call it.

Workflow
// workflows/notify.ts: call Notion when a booking is confirmed
import { on } from "@appbricx/workflows";

export const tellNotion = on.transition("booking", "status", "confirmed", async (_event, step) => {
  // Recorded once: a retry doesn't send it twice. Rejects when Notion isn't connected.
  const output = await step.run("Notion", () =>
    step.ctx.integrations.invoke("notion", "create_database_item", {
      "database_id": "<database_id>",
      "databaseFields": {}
    }),
  );
  step.ctx.log("Notion answered", output);
});
Try it from your agent
{
  "name": "integrations",
  "arguments": {
    "project_id": "<project-id>",
    "action": "call",
    "piece": "notion",
    "piece_action": "create_database_item",
    "input": {
      "database_id": "<database_id>",
      "databaseFields": {}
    },
    "env": "dev"
  }
}
From another backend (connector proxy)
curl -X POST "$APP_ORIGIN/__appbricx/connector-proxy/notion/create_database_item" \
  -H "Authorization: Bearer $APP_KEY" \
  -H "content-type: application/json" \
  -d '{"props":{"database_id":"<database_id>","databaseFields":{}}}'

Actions

create_database_item

Create Database Item. Add a new item to a Notion database with custom field values and optional content. Ideal for creating tasks, records, or entries in structured databases.

InputTypeDescription
database_idrequiredid (picked from your account)Choose the Notion database you want to work with from your workspace
databaseFieldsrequiredobject (depends on other props)Fields
contentoptionallong textThe content you want to append to your item.

createPage

Create Page. Create a new Notion page as a sub-page with custom title and content. Perfect for organizing documentation, notes, or creating structured page hierarchies.

Also accepted as create_page.

InputTypeDescription
pageIdrequiredid (picked from your account)Choose the Notion page you want to work with. This list shows your 100 most recently edited pages for easy selection.
titleoptionaltextThe title of the page.
contentoptionallong textThe content of the page.

retrieve_database

Retrieve Database Structure. Get detailed information about a Notion database including all its properties, field types, and configuration. Perfect for building dynamic forms, validation rules, or understanding database schemas.

InputTypeDescription
database_idrequiredid (picked from your account)Choose the Notion database you want to work with from your workspace

update_database_item

Update Database Item. Update specific fields in a Notion database item. Perfect for maintaining data, tracking changes, or syncing information across systems.

InputTypeDescription
database_idrequiredid (picked from your account)Choose the Notion database you want to work with from your workspace
database_item_idrequiredid (picked from your account)Select the item you want to update
databaseFieldsrequiredobject (depends on other props)Fields

add_comment

Add Comment. Add a comment to any Notion page to start discussions, provide feedback, or leave notes for team collaboration.

InputTypeDescription
page_idrequiredid (picked from your account)Choose the Notion page you want to work with. This list shows your 100 most recently edited pages for easy selection.
comment_textrequiredlong textEnter your comment text. Supports plain text and will be posted as a new comment thread on the selected page.

append_to_page

Append to Page. Appends content to the end of a page.

InputTypeDescription
pageIdrequiredid (picked from your account)Choose the Notion page you want to work with. This list shows your 100 most recently edited pages for easy selection.
contentrequiredlong textThe content you want to append. You can use markdown formatting.

archive_database_item

Archive Database Item. Archive (soft-delete) a database item without permanently removing it. Archived items can be restored later if needed.

InputTypeDescription
database_idrequiredid (picked from your account)Choose the Notion database you want to work with from your workspace
database_item_idrequiredid (picked from your account)Select the item you want to update

custom_api_call

Custom API Call. Make a custom API call to a specific endpoint

InputTypeDescription
urlrequiredobject (depends on other props)url
methodrequiredone of "GET" | "POST" | "PATCH" | "PUT" | "DELETE" | "HEAD"Method
headersrequiredobjectAuthorization headers are injected automatically from your connection.
queryParamsrequiredobjectQuery Parameters
body_typeoptionalone of "none" | "json" | "form_data" | "raw"Body Type
bodyoptionalobject (depends on other props)Body
response_is_binaryoptionalbooleanEnable for files like PDFs, images, etc.
failsafeoptionalbooleanNo Error on Failure
timeoutoptionalnumberTimeout (in seconds)
followRedirectsoptionalbooleanFollow redirects

find_page

Find Page. Search for Notion pages by title with flexible matching options. Perfect for finding specific pages, building page references, or creating automated workflows based on page discovery.

InputTypeDescription
titlerequiredtextEnter the page title or part of the title you want to search for
exact_matchoptionalbooleanEnable this to find pages with exactly the same title. Disable for partial matching (finds pages containing your search term).
limitoptionalnumberHow many pages to return at most (between 1 and 100)

get_page_comments

Get Page Comments. Retrieve all comments from a Notion page, organized by discussion threads. Perfect for tracking feedback, managing reviews, or monitoring page discussions.

InputTypeDescription
page_idrequiredid (picked from your account)Choose the Notion page you want to work with. This list shows your 100 most recently edited pages for easy selection.

getPageOrBlockChildren

Get block content. Retrieve the actual content of a page (represented by blocks).

InputTypeDescription
parentIdrequiredtextPage or parent block ID
markdownrequiredbooleanConvert Notion JSON blocks to Markdown
dynamicrequiredobject (depends on other props)Dynamic properties

notion-find-database-item

Find Database Item. Searches for an item in database by field.

InputTypeDescription
database_idrequiredid (picked from your account)Choose the Notion database you want to work with from your workspace
filterDatabaseFieldsrequiredobject (depends on other props)Fields

restore_database_item

Restore Database Item. Restore an archived database item back to active status. Perfect for recovering accidentally archived tasks, projects, or records.

InputTypeDescription
database_idrequiredid (picked from your account)Choose the Notion database you want to work with from your workspace
archived_item_idrequiredid (picked from your account)Choose which archived item to restore from the selected database

Details

Id
notion
Category
Productivity
Tags
wiki, docs, database, knowledge-base
Package
@activepieces/piece-notion@0.6.1
Runs
Through the integration runner