Skip to content

AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents

feat(notion): improve the step forms (#15397)

Talal Jaber61774484fd1c
diff --git a/bun.lock b/bun.lock
index ba264c0f95b..5857f496cfd 100644
--- a/bun.lock
+++ b/bun.lock
@@ -6355,7 +6355,7 @@
},
"packages/pieces/community/notion": {
"name": "@activepieces/piece-notion",
- "version": "0.7.1",
+ "version": "0.7.2",
"dependencies": {
"@activepieces/core-piece-types": "workspace:*",
"@activepieces/core-utils": "workspace:*",
diff --git a/packages/pieces/community/notion/package.json b/packages/pieces/community/notion/package.json
index 5540f5de3a2..73f1f1425e8 100644
--- a/packages/pieces/community/notion/package.json
+++ b/packages/pieces/community/notion/package.json
@@ -1,6 +1,6 @@
{
"name": "@activepieces/piece-notion",
- "version": "0.7.1",
+ "version": "0.7.2",
"main": "./dist/src/index.js",
"types": "./dist/src/index.d.ts",
"dependencies": {
diff --git a/packages/pieces/community/notion/src/i18n/translation.json b/packages/pieces/community/notion/src/i18n/translation.json
index f5eb4a93f7b..2797862930b 100644
--- a/packages/pieces/community/notion/src/i18n/translation.json
+++ b/packages/pieces/community/notion/src/i18n/translation.json
@@ -7,7 +7,7 @@
"List Pages": "List Pages",
"Create Page": "Create Page",
"Append to Page": "Append to Page",
- "Get block content": "Get block content",
+ "Get Block Content": "Get Block Content",
"Archive Database Item": "Archive Database Item",
"Restore Database Item": "Restore Database Item",
"Add Comment": "Add Comment",
@@ -29,20 +29,20 @@
"Create Database": "Create Database",
"Update Database Schema": "Update Database Schema",
"Custom API Call": "Custom API Call",
- "Lists Notion databases accessible by the connected account with pagination support.": "Lists Notion databases accessible by the connected account with pagination support.",
- "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.": "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.",
- "Update specific fields in a Notion database item. Perfect for maintaining data, tracking changes, or syncing information across systems.": "Update specific fields in a Notion database item. Perfect for maintaining data, tracking changes, or syncing information across systems.",
- "Searches for an item in database by field.": "Searches for an item in database by field.",
- "Lists pages in a Notion database with optional field filters and pagination.": "Lists pages in a Notion database with optional field filters and pagination.",
- "Create a new Notion page as a sub-page with custom title and content. Perfect for organizing documentation, notes, or creating structured page hierarchies.": "Create a new Notion page as a sub-page with custom title and content. Perfect for organizing documentation, notes, or creating structured page hierarchies.",
+ "List the databases shared with your integration, newest edits first.": "List the databases shared with your integration, newest edits first.",
+ "Add an item to a database and set its fields.": "Add an item to a database and set its fields.",
+ "Change field values on an existing database item.": "Change field values on an existing database item.",
+ "Find items in a database whose fields match exact values.": "Find items in a database whose fields match exact values.",
+ "List pages in a database, optionally filtered by field values.": "List pages in a database, optionally filtered by field values.",
+ "Create a page inside another page, with a title and plain text.": "Create a page inside another page, with a title and plain text.",
"Appends content to the end of a page.": "Appends content to the end of a page.",
- "Retrieve the actual content of a page (represented by blocks).": "Retrieve the actual content of a page (represented by blocks).",
- "Archive (soft-delete) a database item without permanently removing it. Archived items can be restored later if needed.": "Archive (soft-delete) a database item without permanently removing it. Archived items can be restored later if needed.",
- "Restore an archived database item back to active status. Perfect for recovering accidentally archived tasks, projects, or records.": "Restore an archived database item back to active status. Perfect for recovering accidentally archived tasks, projects, or records.",
- "Add a comment to any Notion page to start discussions, provide feedback, or leave notes for team collaboration.": "Add a comment to any Notion page to start discussions, provide feedback, or leave notes for team collaboration.",
- "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.": "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.",
- "Retrieve all comments from a Notion page, organized by discussion threads. Perfect for tracking feedback, managing reviews, or monitoring page discussions.": "Retrieve all comments from a Notion page, organized by discussion threads. Perfect for tracking feedback, managing reviews, or monitoring page discussions.",
- "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.": "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.",
+ "Read a page's content as blocks or as Markdown.": "Read a page's content as blocks or as Markdown.",
+ "Archive a database item. It can be restored later.": "Archive a database item. It can be restored later.",
+ "Restore an archived database item.": "Restore an archived database item.",
+ "Add a comment to a page.": "Add a comment to a page.",
+ "Get a database's properties, field types and options.": "Get a database's properties, field types and options.",
+ "Get all comments on a page, grouped by thread.": "Get all comments on a page, grouped by thread.",
+ "Find pages by title, with exact or partial matching.": "Find pages by title, with exact or partial matching.",
"Creates a new sub-page under an existing Notion page, with a title and optional markdown body.": "Creates a new sub-page under an existing Notion page, with a title and optional markdown body.",
"Fetches a single page's metadata and property values by id (a database row is a page).": "Fetches a single page's metadata and property values by id (a database row is a page).",
"Archives (trashes) or restores any page or database row by id via its archived flag.": "Archives (trashes) or restores any page or database row by id via its archived flag.",
@@ -72,22 +72,20 @@
"Fields": "Fields",
"Content": "Content",
"Database Item": "Database Item",
- "Page": "Page",
- "Title": "Title",
- "Page or parent block ID": "Page or parent block ID",
"Markdown": "Markdown",
- "Dynamic properties": "Dynamic properties",
+ "Parent Page": "Parent Page",
+ "Title": "Title",
+ "Page": "Page",
+ "Page or Block ID": "Page or Block ID",
+ "Dynamic Properties": "Dynamic Properties",
"Archived Item": "Archived Item",
"Comment Text": "Comment Text",
- "Page Title": "Page Title",
"Exact Match": "Exact Match",
- "Maximum Results": "Maximum Results",
"Parent Page ID": "Parent Page ID",
"Page ID": "Page ID",
"Archived": "Archived",
"New Parent Page ID": "New Parent Page ID",
"New Parent Database ID": "New Parent Database ID",
- "Page or Block ID": "Page or Block ID",
"Depth": "Depth",
"Block ID": "Block ID",
"Block Type": "Block Type",
@@ -95,6 +93,7 @@
"Language": "Language",
"Query": "Query",
"Type Filter": "Type Filter",
+ "Maximum Results": "Maximum Results",
"Page Size": "Page Size",
"Start Cursor": "Start Cursor",
"User ID": "User ID",
@@ -110,27 +109,28 @@
"Query Parameters": "Query Parameters",
"Body Type": "Body Type",
"Body": "Body",
- "Response is Binary ?": "Response is Binary ?",
- "No Error on Failure": "No Error on Failure",
- "Timeout (in seconds)": "Timeout (in seconds)",
+ "Response is Binary": "Response is Binary",
+ "Return Error as Output": "Return Error as Output",
+ "Timeout": "Timeout",
"Follow redirects": "Follow redirects",
- "Number of databases to retrieve (1-100).": "Number of databases to retrieve (1-100).",
- "Pagination cursor returned from a previous execution.": "Pagination cursor returned from a previous execution.",
- "Choose the Notion database you want to work with from your workspace": "Choose the Notion database you want to work with from your workspace",
- "The content you want to append to your item.": "The content you want to append to your item.",
- "Select the item you want to update": "Select the item you want to update",
- "Number of pages to return (1-100).": "Number of pages to return (1-100).",
- "Pagination cursor from a previous run.": "Pagination cursor from a previous run.",
- "Choose the Notion page you want to work with. This list shows your 100 most recently edited pages for easy selection.": "Choose the Notion page you want to work with. This list shows your 100 most recently edited pages for easy selection.",
- "The title of the page.": "The title of the page.",
- "The content of the page.": "The content of the page.",
- "The content you want to append. You can use markdown formatting.": "The content you want to append. You can use markdown formatting.",
- "Convert Notion JSON blocks to Markdown": "Convert Notion JSON blocks to Markdown",
- "Choose which archived item to restore from the selected database": "Choose which archived item to restore from the selected database",
- "Enter your comment text. Supports plain text and will be posted as a new comment thread on the selected page.": "Enter your comment text. Supports plain text and will be posted as a new comment thread on the selected page.",
- "Enter the page title or part of the title you want to search for": "Enter the page title or part of the title you want to search for",
- "Enable this to find pages with exactly the same title. Disable for partial matching (finds pages containing your search term).": "Enable this to find pages with exactly the same title. Disable for partial matching (finds pages containing your search term).",
- "How many pages to return at most (between 1 and 100)": "How many pages to return at most (between 1 and 100)",
+ "How many databases to return, up to 100.": "How many databases to return, up to 100.",
+ "Next-page cursor from a previous run's output.": "Next-page cursor from a previous run's output.",
+ "Only databases shared with your integration are listed.": "Only databases shared with your integration are listed.",
+ "Plain text added to the item's page body.": "Plain text added to the item's page body.",
+ "Items in the selected database, listed by title.": "Items in the selected database, listed by title.",
+ "Pick a database, then fill one or more of its fields. Items must match every value exactly.": "Pick a database, then fill one or more of its fields. Items must match every value exactly.",
+ "How many pages to return, up to 100.": "How many pages to return, up to 100.",
+ "Pick a database, then fill any of its fields below to filter. Empty fields are ignored.": "Pick a database, then fill any of its fields below to filter. Empty fields are ignored.",
+ "The new page is created inside this page.": "The new page is created inside this page.",
+ "Plain text body. Markdown is not rendered.": "Plain text body. Markdown is not rendered.",
+ "Your 100 most recently edited pages shared with the integration.": "Your 100 most recently edited pages shared with the integration.",
+ "Markdown is rendered into Notion blocks.": "Markdown is rendered into Notion blocks.",
+ "Paste the ID, or map a page from a previous step.": "Paste the ID, or map a page from a previous step.",
+ "Return the content as Markdown instead of blocks.": "Return the content as Markdown instead of blocks.",
+ "Archived items in the selected database.": "Archived items in the selected database.",
+ "Posted as a new comment thread on the page.": "Posted as a new comment thread on the page.",
+ "Full title, or part of it.": "Full title, or part of it.",
+ "Only return pages whose title equals the search exactly.": "Only return pages whose title equals the search exactly.",
"The id of the existing page to create the new page under. Resolve via notion_search.": "The id of the existing page to create the new page under. Resolve via notion_search.",
"The title of the new page.": "The title of the new page.",
"Optional body content for the page. Markdown is supported and converted to Notion blocks.": "Optional body content for the page. Markdown is supported and converted to Notion blocks.",
@@ -183,7 +183,11 @@
"The page id of the database row to archive. Resolve it via notion_query_database or notion_find_database_item.": "The page id of the database row to archive. Resolve it via notion_query_database or notion_find_database_item.",
"The page id of the archived database row to restore. Resolve it via notion_query_database (with an archived filter) or from the response of notion_archive_database_item.": "The page id of the archived database row to restore. Resolve it via notion_query_database (with an archived filter) or from the response of notion_archive_database_item.",
"Authorization headers are injected automatically from your connection.": "Authorization headers are injected automatically from your connection.",
+ "Appended to the URL as ?key=value.": "Appended to the URL as ?key=value.",
"Enable for files like PDFs, images, etc.": "Enable for files like PDFs, images, etc.",
+ "On a failed request, output the error instead of failing the step.": "On a failed request, output the error instead of failing the step.",
+ "Seconds to wait for a response. Empty: up to the flow limit (10 min).": "Seconds to wait for a response. Empty: up to the flow limit (10 min).",
+ "Follow 3xx redirects instead of returning them as the response.": "Follow 3xx redirects instead of returning them as the response.",
"Paragraph": "Paragraph",
"Heading 1": "Heading 1",
"Heading 2": "Heading 2",
@@ -213,6 +217,6 @@
"Updated Page": "Updated Page",
"Triggers when an item is added to a database.": "Triggers when an item is added to a database.",
"Triggers when an item is updated in a database.": "Triggers when an item is updated in a database.",
- "Triggers whenever someone adds a new comment to a specific Notion page. Perfect for notifications, review workflows, or automated responses to team feedback.": "Triggers whenever someone adds a new comment to a specific Notion page. Perfect for notifications, review workflows, or automated responses to team feedback.",
- "Triggers whenever any page in your Notion workspace is modified or updated. Ideal for syncing content changes, backup processes, or notifying teams about documentation updates.": "Triggers whenever any page in your Notion workspace is modified or updated. Ideal for syncing content changes, backup processes, or notifying teams about documentation updates."
+ "Triggers when a comment is added to a page.": "Triggers when a comment is added to a page.",
+ "Triggers when any page shared with the integration is edited.": "Triggers when any page shared with the integration is edited."
}
\ No newline at end of file
diff --git a/packages/pieces/community/notion/src/index.ts b/packages/pieces/community/notion/src/index.ts
index 92d80cde182..3be2593e9f4 100644
--- a/packages/pieces/community/notion/src/index.ts
+++ b/packages/pieces/community/notion/src/index.ts
@@ -51,7 +51,7 @@ export const notion = createPiece({
description: 'The all-in-one workspace',
logoUrl: 'https://cdn.activepieces.com/pieces/notion.png',
categories: [PieceCategory.PRODUCTIVITY],
- minimumSupportedRelease: '0.86.4',
+ minimumSupportedRelease: '0.88.2',
authors: [
'ShayPunter',
'kishanprmr',
diff --git a/packages/pieces/community/notion/src/lib/actions/add-comment.ts b/packages/pieces/community/notion/src/lib/actions/add-comment.ts
index 159d81bd7cd..b05a75c4d5c 100644
--- a/packages/pieces/community/notion/src/lib/actions/add-comment.ts
+++ b/packages/pieces/community/notion/src/lib/actions/add-comment.ts
@@ -10,7 +10,7 @@ export const addComment = createAction({
classification: 'WRITE',
displayName: 'Add Comment',
description:
- 'Add a comment to any Notion page to start discussions, provide feedback, or leave notes for team collaboration.',
+ 'Add a comment to a page.',
audience: 'human',
aiMetadata: {
description:
@@ -21,8 +21,7 @@ export const addComment = createAction({
page_id: notionCommon.page,
comment_text: Property.LongText({
displayName: 'Comment Text',
- description:
- 'Enter your comment text. Supports plain text and will be posted as a new comment thread on the selected page.',
+ description: 'Posted as a new comment thread on the page.',
required: true,
}),
},
diff --git a/packages/pieces/community/notion/src/lib/actions/append-to-page.ts b/packages/pieces/community/notion/src/lib/actions/append-to-page.ts
index 83264027769..801267cbdbc 100644
--- a/packages/pieces/community/notion/src/lib/actions/append-to-page.ts
+++ b/packages/pieces/community/notion/src/lib/actions/append-to-page.ts
@@ -23,8 +23,7 @@ export const appendToPage = createAction({
pageId: notionCommon.page,
content: Property.LongText({
displayName: 'Content',
- description:
- 'The content you want to append. You can use markdown formatting.',
+ description: 'Markdown is rendered into Notion blocks.',
required: true,
}),
},
diff --git a/packages/pieces/community/notion/src/lib/actions/archive-database-item.ts b/packages/pieces/community/notion/src/lib/actions/archive-database-item.ts
index a324b63d96a..edb2df2b0e3 100644
--- a/packages/pieces/community/notion/src/lib/actions/archive-database-item.ts
+++ b/packages/pieces/community/notion/src/lib/actions/archive-database-item.ts
@@ -10,7 +10,7 @@ export const archiveDatabaseItem = createAction({
classification: 'DESTRUCTIVE',
displayName: 'Archive Database Item',
description:
- 'Archive (soft-delete) a database item without permanently removing it. Archived items can be restored later if needed.',
+ 'Archive a database item. It can be restored later.',
audience: 'human',
aiMetadata: {
description:
diff --git a/packages/pieces/community/notion/src/lib/actions/create-database-item.ts b/packages/pieces/community/notion/src/lib/actions/create-database-item.ts
index 61b2775cf15..8324e833ed4 100644
--- a/packages/pieces/community/notion/src/lib/actions/create-database-item.ts
+++ b/packages/pieces/community/notion/src/lib/actions/create-database-item.ts
@@ -15,7 +15,7 @@ export const createDatabaseItem = createAction({
classification: 'WRITE',
displayName: 'Create Database Item',
description:
- '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.',
+ 'Add an item to a database and set its fields.',
audience: 'human',
aiMetadata: {
description:
@@ -27,7 +27,7 @@ export const createDatabaseItem = createAction({
databaseFields: notionCommon.databaseFields,
content: Property.LongText({
displayName: 'Content',
- description: 'The content you want to append to your item.',
+ description: "Plain text added to the item's page body.",
required: false,
}),
},
diff --git a/packages/pieces/community/notion/src/lib/actions/create-page.ts b/packages/pieces/community/notion/src/lib/actions/create-page.ts
index 2a846caacc5..504b6c480ca 100644
--- a/packages/pieces/community/notion/src/lib/actions/create-page.ts
+++ b/packages/pieces/community/notion/src/lib/actions/create-page.ts
@@ -11,7 +11,7 @@ export const createPage = createAction({
classification: 'WRITE',
displayName: 'Create Page',
description:
- 'Create a new Notion page as a sub-page with custom title and content. Perfect for organizing documentation, notes, or creating structured page hierarchies.',
+ 'Create a page inside another page, with a title and plain text.',
audience: 'human',
aiMetadata: {
description:
@@ -19,15 +19,19 @@ export const createPage = createAction({
idempotent: false,
},
props: {
- pageId: notionCommon.page,
+ pageId: {
+ ...notionCommon.page,
+ displayName: 'Parent Page',
+ description: 'The new page is created inside this page.',
+ },
title: Property.ShortText({
displayName: 'Title',
- description: 'The title of the page.',
+ placeholder: 'e.g. Meeting notes',
required: false,
}),
content: Property.LongText({
displayName: 'Content',
- description: 'The content of the page.',
+ description: 'Plain text body. Markdown is not rendered.',
required: false,
}),
},
diff --git a/packages/pieces/community/notion/src/lib/actions/find-item.ts b/packages/pieces/community/notion/src/lib/actions/find-item.ts
index 248ac291621..c600720e6aa 100644
--- a/packages/pieces/community/notion/src/lib/actions/find-item.ts
+++ b/packages/pieces/community/notion/src/lib/actions/find-item.ts
@@ -1,5 +1,9 @@
import { notionAuth } from '../auth';
-import { createAction } from '@activepieces/pieces-framework';
+import {
+ createAction,
+ MarkdownVariant,
+ Property,
+} from '@activepieces/pieces-framework';
import { getNotionToken, notionCommon } from '../common';
import { Client } from '@notionhq/client';
import { notionFindDatabaseItemActionOutputSchema } from '../output-schemas';
@@ -9,7 +13,7 @@ export const findDatabaseItem = createAction({
name: 'notion-find-database-item',
classification: 'SEARCH',
displayName: 'Find Database Item',
- description: 'Searches for an item in database by field.',
+ description: 'Find items in a database whose fields match exact values.',
audience: 'human',
aiMetadata: {
description:
@@ -18,6 +22,11 @@ export const findDatabaseItem = createAction({
},
props: {
database_id: notionCommon.database_id,
+ filter_hint: Property.MarkDown({
+ value:
+ 'Pick a database, then fill one or more of its fields. Items must match every value exactly.',
+ variant: MarkdownVariant.INFO,
+ }),
filterDatabaseFields: notionCommon.filterDatabaseFields,
},
outputSchema: notionFindDatabaseItemActionOutputSchema,
diff --git a/packages/pieces/community/notion/src/lib/actions/find-page.ts b/packages/pieces/community/notion/src/lib/actions/find-page.ts
index c50b9385233..1a170a51de1 100644
--- a/packages/pieces/community/notion/src/lib/actions/find-page.ts
+++ b/packages/pieces/community/notion/src/lib/actions/find-page.ts
@@ -10,7 +10,7 @@ export const findPage = createAction({
classification: 'SEARCH',
displayName: 'Find Page',
description:
- '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.',
+ 'Find pages by title, with exact or partial matching.',
audience: 'human',
aiMetadata: {
description:
@@ -19,23 +19,27 @@ export const findPage = createAction({
},
props: {
title: Property.ShortText({
- displayName: 'Page Title',
- description:
- 'Enter the page title or part of the title you want to search for',
+ displayName: 'Title',
+ description: 'Full title, or part of it.',
required: true,
+ placeholder: 'e.g. Meeting notes',
}),
exact_match: Property.Checkbox({
displayName: 'Exact Match',
description:
- 'Enable this to find pages with exactly the same title. Disable for partial matching (finds pages containing your search term).',
+ 'Only return pages whose title equals the search exactly.',
required: false,
defaultValue: false,
}),
limit: Property.Number({
- displayName: 'Maximum Results',
- description: 'How many pages to return at most (between 1 and 100)',
+ displayName: 'Limit',
+ description: 'How many pages to return, up to 100.',
required: false,
defaultValue: 10,
+ display: 'stepper',
+ min: 1,
+ max: 100,
+ step: 1,
}),
},
outputSchema: findPageActionOutputSchema,
diff --git a/packages/pieces/community/notion/src/lib/actions/get-page-comments.ts b/packages/pieces/community/notion/src/lib/actions/get-page-comments.ts
index 07bd403068e..6e7471d7ff1 100644
--- a/packages/pieces/community/notion/src/lib/actions/get-page-comments.ts
+++ b/packages/pieces/community/notion/src/lib/actions/get-page-comments.ts
@@ -10,7 +10,7 @@ export const getPageComments = createAction({
classification: 'READ',
displayName: 'Get Page Comments',
description:
- 'Retrieve all comments from a Notion page, organized by discussion threads. Perfect for tracking feedback, managing reviews, or monitoring page discussions.',
+ 'Get all comments on a page, grouped by thread.',
audience: 'human',
aiMetadata: {
description:
diff --git a/packages/pieces/community/notion/src/lib/actions/get-page-or-block-children.ts b/packages/pieces/community/notion/src/lib/actions/get-page-or-block-children.ts
index 0ff9e711c0d..ba8ed6117a6 100644
--- a/packages/pieces/community/notion/src/lib/actions/get-page-or-block-children.ts
+++ b/packages/pieces/community/notion/src/lib/actions/get-page-or-block-children.ts
@@ -14,8 +14,8 @@ export const getPageOrBlockChildren = createAction({
auth: notionAuth,
name: 'getPageOrBlockChildren',
classification: 'READ',
- displayName: 'Get block content',
- description: 'Retrieve the actual content of a page (represented by blocks).',
+ displayName: 'Get Block Content',
+ description: "Read a page's content as blocks or as Markdown.",
audience: 'human',
aiMetadata: {
description:
@@ -24,18 +24,20 @@ export const getPageOrBlockChildren = createAction({
},
props: {
parentId: Property.ShortText({
- displayName: 'Page or parent block ID',
+ displayName: 'Page or Block ID',
+ description: 'Paste the ID, or map a page from a previous step.',
required: true,
+ placeholder: 'e.g. 1d4805e9774b8056820bc1083bff77e3',
}),
markdown: Property.Checkbox({
displayName: 'Markdown',
- description: 'Convert Notion JSON blocks to Markdown',
- required: true,
+ description: 'Return the content as Markdown instead of blocks.',
+ required: false,
defaultValue: false,
}),
dynamic: Property.DynamicProperties({
auth: notionAuth,
- displayName: 'Dynamic properties',
+ displayName: 'Dynamic Properties',
refreshers: ['markdown'],
required: true,
props: async ({ markdown }) => {
@@ -45,7 +47,7 @@ export const getPageOrBlockChildren = createAction({
const fields: DynamicPropsValue = {
depth: Property.Number({
displayName: 'Depth',
- description: 'Recursively retrieve children up to this depth',
+ description: 'How many levels of nested blocks to include.',
required: true,
defaultValue: 1,
}),
diff --git a/packages/pieces/community/notion/src/lib/actions/list-database-pages.ts b/packages/pieces/community/notion/src/lib/actions/list-database-pages.ts
index c6e57d46b25..ea1e963e9ca 100644
--- a/packages/pieces/community/notion/src/lib/actions/list-database-pages.ts
+++ b/packages/pieces/community/notion/src/lib/actions/list-database-pages.ts
@@ -1,4 +1,8 @@
-import { createAction, Property } from '@activepieces/pieces-framework';
+import {
+ createAction,
+ MarkdownVariant,
+ Property,
+} from '@activepieces/pieces-framework';
import { Client } from '@notionhq/client';
import { notionAuth } from '../auth';
import { getNotionToken, notionCommon } from '../common';
@@ -12,7 +16,7 @@ export const listDatabasePages = createAction({
classification: 'SEARCH',
displayName: 'List Pages',
description:
- 'Lists pages in a Notion database with optional field filters and pagination.',
+ 'List pages in a database, optionally filtered by field values.',
audience: 'human',
aiMetadata: {
description:
@@ -25,12 +29,22 @@ export const listDatabasePages = createAction({
displayName: 'Limit',
required: false,
defaultValue: DEFAULT_LIMIT,
- description: `Number of pages to return (1-${MAX_LIMIT}).`,
+ description: 'How many pages to return, up to 100.',
+ display: 'stepper',
+ min: 1,
+ max: MAX_LIMIT,
+ step: 1,
}),
cursor: Property.ShortText({
displayName: 'Cursor',
required: false,
- description: 'Pagination cursor from a previous run.',
+ description: "Next-page cursor from a previous run's output.",
+ advanced: true,
+ }),
+ filter_hint: Property.MarkDown({
+ value:
+ 'Pick a database, then fill any of its fields below to filter. Empty fields are ignored.',
+ variant: MarkdownVariant.INFO,
}),
filterDatabaseFields: notionCommon.filterDatabaseFields,
},
diff --git a/packages/pieces/community/notion/src/lib/actions/list-databases.ts b/packages/pieces/community/notion/src/lib/actions/list-databases.ts
index 58ebcc2f399..7a28decaf13 100644
--- a/packages/pieces/community/notion/src/lib/actions/list-databases.ts
+++ b/packages/pieces/community/notion/src/lib/actions/list-databases.ts
@@ -12,7 +12,7 @@ export const listDatabases = createAction({
classification: 'SEARCH',
displayName: 'List Databases',
description:
- 'Lists Notion databases accessible by the connected account with pagination support.',
+ 'List the databases shared with your integration, newest edits first.',
audience: 'human',
aiMetadata: {
description:
@@ -22,14 +22,19 @@ export const listDatabases = createAction({
props: {
limit: Property.Number({
displayName: 'Limit',
- description: `Number of databases to retrieve (1-${MAX_LIMIT}).`,
+ description: 'How many databases to return, up to 100.',
required: false,
defaultValue: DEFAULT_LIMIT,
+ display: 'stepper',
+ min: 1,
+ max: MAX_LIMIT,
+ step: 1,
}),
cursor: Property.ShortText({
displayName: 'Cursor',
- description: 'Pagination cursor returned from a previous execution.',
+ description: "Next-page cursor from a previous run's output.",
required: false,
+ advanced: true,
}),
},
async run(context) {
diff --git a/packages/pieces/community/notion/src/lib/actions/restore-database-item.ts b/packages/pieces/community/notion/src/lib/actions/restore-database-item.ts
index 8bfc37b07af..beb47986caa 100644
--- a/packages/pieces/community/notion/src/lib/actions/restore-database-item.ts
+++ b/packages/pieces/community/notion/src/lib/actions/restore-database-item.ts
@@ -10,7 +10,7 @@ export const restoreDatabaseItem = createAction({
classification: 'WRITE',
displayName: 'Restore Database Item',
description:
- 'Restore an archived database item back to active status. Perfect for recovering accidentally archived tasks, projects, or records.',
+ 'Restore an archived database item.',
audience: 'human',
aiMetadata: {
description:
diff --git a/packages/pieces/community/notion/src/lib/actions/retrieve-database.ts b/packages/pieces/community/notion/src/lib/actions/retrieve-database.ts
index 7e64f916285..bce34e65a37 100644
--- a/packages/pieces/community/notion/src/lib/actions/retrieve-database.ts
+++ b/packages/pieces/community/notion/src/lib/actions/retrieve-database.ts
@@ -15,7 +15,7 @@ export const retrieveDatabase = createAction({
classification: 'READ',
displayName: 'Retrieve Database Structure',
description:
- '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.',
+ "Get a database's properties, field types and options.",
audience: 'human',
aiMetadata: {
description:
diff --git a/packages/pieces/community/notion/src/lib/actions/update-database-item.ts b/packages/pieces/community/notion/src/lib/actions/update-database-item.ts
index 27db49b5b3d..9a8602dc9aa 100644
--- a/packages/pieces/community/notion/src/lib/actions/update-database-item.ts
+++ b/packages/pieces/community/notion/src/lib/actions/update-database-item.ts
@@ -14,7 +14,7 @@ export const updateDatabaseItem = createAction({
classification: 'WRITE',
displayName: 'Update Database Item',
description:
- 'Update specific fields in a Notion database item. Perfect for maintaining data, tracking changes, or syncing information across systems.',
+ 'Change field values on an existing database item.',
audience: 'human',
aiMetadata: {
description:
diff --git a/packages/pieces/community/notion/src/lib/auth.ts b/packages/pieces/community/notion/src/lib/auth.ts
index dff500668d9..965ba0d3abe 100644
--- a/packages/pieces/community/notion/src/lib/auth.ts
+++ b/packages/pieces/community/notion/src/lib/auth.ts
@@ -21,12 +21,13 @@ export const notionOAuth2Auth = PieceAuth.OAuth2({
const notionCustomAuth = PieceAuth.CustomAuth({
displayName: 'Access Token',
- description:
- 'Connect using a Notion Internal Integration Token. Create one at https://www.notion.so/my-integrations.',
+ description: `1. Open [My integrations](https://www.notion.so/my-integrations) and create an internal integration.
+2. Copy its Internal Integration Secret and paste it below.
+3. In Notion, open each page or database you want to use and share it with the integration.`,
required: true,
props: {
accessToken: PieceAuth.SecretText({
- displayName: 'Internal Integration Token',
+ displayName: 'Internal Integration Secret',
required: true,
}),
},
diff --git a/packages/pieces/community/notion/src/lib/common/index.ts b/packages/pieces/community/notion/src/lib/common/index.ts
index d6e5f8f105f..bc65e36f22a 100644
--- a/packages/pieces/community/notion/src/lib/common/index.ts
+++ b/packages/pieces/community/notion/src/lib/common/index.ts
@@ -26,14 +26,13 @@ export const notionCommon = {
auth: notionAuth,
displayName: 'Database',
required: true,
- description:
- 'Choose the Notion database you want to work with from your workspace',
+ description: 'Only databases shared with your integration are listed.',
refreshers: [],
options: async ({ auth }) => {
if (!auth) {
return {
disabled: true,
- placeholder: 'Please connect your Notion account first',
+ placeholder: 'Connect your Notion account first',
options: [],
};
}
@@ -61,15 +60,21 @@ export const notionCommon = {
database_item_id: Property.Dropdown({
auth: notionAuth,
displayName: 'Database Item',
- description: 'Select the item you want to update',
+ description: 'Items in the selected database, listed by title.',
required: true,
refreshers: ['database_id'],
options: async ({ auth, database_id }) => {
- if (!auth || !database_id) {
+ if (!auth) {
+ return {
+ disabled: true,
+ placeholder: 'Connect your Notion account first',
+ options: [],
+ };
+ }
+ if (!database_id) {
return {
disabled: true,
- placeholder:
- 'Please connect your Notion account first and select database',
+ placeholder: 'Select a database first',
options: [],
};
}
@@ -96,16 +101,21 @@ export const notionCommon = {
archived_database_item_id: Property.Dropdown({
auth: notionAuth,
displayName: 'Archived Item',
- description:
- 'Choose which archived item to restore from the selected database',
+ description: 'Archived items in the selected database.',
required: true,
refreshers: ['database_id'],
options: async ({ auth, database_id }) => {
- if (!auth || !database_id) {
+ if (!auth) {
+ return {
+ disabled: true,
+ placeholder: 'Connect your Notion account first',
+ options: [],
+ };
+ }
+ if (!database_id) {
return {
disabled: true,
- placeholder:
- 'Please connect your Notion account first and select a database',
+ placeholder: 'Select a database first',
options: [],
};
}
@@ -126,7 +136,7 @@ export const notionCommon = {
return {
disabled: false,
options: [],
- placeholder: 'No archived items found in this database',
+ placeholder: 'No archived items in this database',
};
}
@@ -145,8 +155,7 @@ export const notionCommon = {
} catch (error: any) {
return {
disabled: true,
- placeholder:
- 'Error loading archived items. Please check your database permissions.',
+ placeholder: 'Could not load items. Check the integration has access.',
options: [],
};
}
@@ -159,12 +168,7 @@ export const notionCommon = {
refreshers: ['database_id'],
props: async ({ auth, database_id }) => {
if (!auth || !database_id) {
- return {
- disabled: true,
- placeholder:
- 'Please connect your Notion account first and select database',
- options: [],
- };
+ return {};
}
const fields: DynamicPropsValue = {};
try {
@@ -240,12 +244,7 @@ export const notionCommon = {
refreshers: ['database_id'],
props: async ({ auth, database_id }) => {
if (!auth || !database_id) {
- return {
- disabled: true,
- placeholder:
- 'Please connect your Notion account first and select database',
- options: [],
- };
+ return {};
}
const fields: DynamicPropsValue = {};
try {
@@ -318,13 +317,13 @@ export const notionCommon = {
displayName: 'Page',
required: true,
description:
- 'Choose the Notion page you want to work with. This list shows your 100 most recently edited pages for easy selection.',
+ 'Your 100 most recently edited pages shared with the integration.',
refreshers: [],
options: async ({ auth }) => {
if (!auth) {
return {
disabled: true,
- placeholder: 'Please connect your Notion account first',
+ placeholder: 'Connect your Notion account first',
options: [],
};
}
diff --git a/packages/pieces/community/notion/src/lib/triggers/new-comment.ts b/packages/pieces/community/notion/src/lib/triggers/new-comment.ts
index 29462dfd494..14dc6f10411 100644
--- a/packages/pieces/community/notion/src/lib/triggers/new-comment.ts
+++ b/packages/pieces/community/notion/src/lib/triggers/new-comment.ts
@@ -20,7 +20,7 @@ export const newComment = createTrigger({
classification: 'READ',
displayName: 'New Comment',
description:
- 'Triggers whenever someone adds a new comment to a specific Notion page. Perfect for notifications, review workflows, or automated responses to team feedback.',
+ 'Triggers when a comment is added to a page.',
aiMetadata: {
description:
'Fires when a new comment is posted on the selected Notion page, emitting the comment. Use to react to feedback or discussion activity on a specific page; requires read-comments capability on the integration.',
diff --git a/packages/pieces/community/notion/src/lib/triggers/updated-page.ts b/packages/pieces/community/notion/src/lib/triggers/updated-page.ts
index cea02934e64..b84c9f6c981 100644
--- a/packages/pieces/community/notion/src/lib/triggers/updated-page.ts
+++ b/packages/pieces/community/notion/src/lib/triggers/updated-page.ts
@@ -20,7 +20,7 @@ export const updatedPage = createTrigger({
classification: 'READ',
displayName: 'Updated Page',
description:
- 'Triggers whenever any page in your Notion workspace is modified or updated. Ideal for syncing content changes, backup processes, or notifying teams about documentation updates.',
+ 'Triggers when any page shared with the integration is edited.',
aiMetadata: {
description:
'Fires whenever any page shared with the integration in the Notion workspace is modified, emitting the updated page. Use to track content changes workspace-wide rather than within a single database or page.',