Skip to content

Conversation

@luancazarine
Copy link
Collaborator

@luancazarine luancazarine commented Oct 28, 2025

Resolves #18869

Summary by CodeRabbit

Release Notes

  • New Features

    • Template selection options for creating database pages: create empty pages, use default templates, or specify a custom template ID.
    • Added ability to retrieve available templates.
  • Updates

    • Version increments across multiple Notion actions and sources for stability and consistency.
    • Updated Notion client library dependency to latest compatible version.

- Added `listTemplates` method to the Notion client for retrieving available templates.
- Updated `create-page-from-database` action to support template selection, including new properties for template type and ID.
- Bumped version to 2.0.0 for the `create-page-from-database` action and updated package version to 1.0.6.
- Upgraded `@notionhq/client` dependency to version 5.3.0.
@vercel
Copy link

vercel bot commented Oct 28, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
pipedream-docs Ignored Ignored Oct 29, 2025 6:33pm
pipedream-docs-redirect-do-not-edit Ignored Ignored Oct 29, 2025 6:33pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 28, 2025

Walkthrough

The PR adds template support to the "Create Page from Data Source" action, enabling users to select and apply Notion page templates when creating pages. A new listTemplates() method is added to the Notion app client. The action's internal structure is refactored to return metadata, properties, and children as an object, with batching for large block payloads. Component versions are bumped across actions and sources; the Notion package dependency is updated from ^5.0.0 to ^5.3.0.

Changes

Cohort / File(s) Summary
Template Support in Create Page Action
components/notion/actions/create-page-from-database/create-page-from-database.mjs
Version bumped to 2.0.0. Added templateType property with options (none, default, template_id). Replaced single alert with per-template additionalProps logic. buildPage now returns object with metadata, properties, and children instead of flat array. run() implements block batching (max 100 per request) and template-based payload construction.
Notion App & Package
components/notion/notion.app.mjs
components/notion/package.json
Added public listTemplates() method to Notion app client. Package version bumped 1.0.5 → 1.0.6. @notionhq/client dependency updated ^5.0.0 → ^5.3.0.
Action Version Bumps
components/notion/actions/append-block/append-block.mjs
components/notion/actions/complete-file-upload/complete-file-upload.mjs
components/notion/actions/create-comment/create-comment.mjs
components/notion/actions/create-database/create-database.mjs
components/notion/actions/create-file-upload/create-file-upload.mjs
components/notion/actions/create-page/create-page.mjs
components/notion/actions/delete-block/delete-block.mjs
components/notion/actions/duplicate-page/duplicate-page.mjs
components/notion/actions/get-current-user/get-current-user.mjs
components/notion/actions/list-all-users/list-all-users.mjs
components/notion/actions/list-file-uploads/list-file-uploads.mjs
components/notion/actions/query-database/query-database.mjs
components/notion/actions/retrieve-block/retrieve-block.mjs
components/notion/actions/retrieve-database-content/retrieve-database-content.mjs
components/notion/actions/retrieve-database-schema/retrieve-database-schema.mjs
components/notion/actions/retrieve-file-upload/retrieve-file-upload.mjs
components/notion/actions/retrieve-page-property-item/retrieve-page-property-item.mjs
components/notion/actions/retrieve-page/retrieve-page.mjs
components/notion/actions/retrieve-user/retrieve-user.mjs
components/notion/actions/search/search.mjs
components/notion/actions/send-file-upload/send-file-upload.mjs
components/notion/actions/update-block/update-block.mjs
components/notion/actions/update-database/update-database.mjs
components/notion/actions/update-page/update-page.mjs
Patch/minor version increments across all action modules (0.0.x → 0.0.(x+1), 0.1.x → 0.1.(x+1), 1.0.x → 1.0.(x+1), 2.0.x → 2.0.(x+1)) with no functional changes.
Source Version Bumps
components/notion/sources/new-comment-created/new-comment-created.mjs
components/notion/sources/new-database/new-database.mjs
components/notion/sources/new-page/new-page.mjs
components/notion/sources/new-webhook-event-instant/new-webhook-event-instant.mjs
components/notion/sources/page-or-subpage-updated/page-or-subpage-updated.mjs
components/notion/sources/page-properties-updated-instant/page-properties-updated-instant.mjs
components/notion/sources/updated-page-by-timestamp/updated-page-by-timestamp.mjs
components/notion/sources/updated-page-id/updated-page-id.mjs
components/notion/sources/updated-page/updated-page.mjs
Patch/minor version increments across all source modules (0.0.x → 0.0.(x+1), 0.1.x → 0.1.(x+1), 1.0.x → 1.0.(x+1)) with no functional changes.

Sequence Diagram(s)

sequenceDiagram
    actor User
    participant Action as Create Page<br/>Action
    participant App as Notion<br/>App
    participant API as Notion<br/>API

    rect rgb(220, 240, 255)
    note over User,API: Template Selection Flow
    User->>Action: Select templateType<br/>(none/default/template_id)
    alt templateType = template_id
        Action->>App: listTemplates()
        App->>API: Fetch available templates
        API-->>App: Return templates list
        App-->>Action: Template options
        User->>Action: Select specific template
    end
    end

    rect rgb(240, 255, 220)
    note over User,API: Page Creation with Batching
    User->>Action: Create page with properties<br/>& child blocks
    Action->>Action: buildPage() → {metadata,<br/>properties, children}
    alt Total blocks ≤ 100
        Action->>API: Single request with<br/>all blocks
    else Total blocks > 100
        Action->>API: Request 1: 100 blocks
        Action->>API: Request 2+: Remaining<br/>blocks (batched)
    end
    API-->>Action: Page created
    Action-->>User: Success response
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Primary focus: create-page-from-database.mjs contains substantial refactoring with template logic branching, buildPage return structure changes, and batch handling implementation
  • Secondary concern: Integration point with new listTemplates() method and dependency upgrade verification
  • Mitigating factor: 26 version bump changes are homogeneous and require minimal review effort

Areas requiring attention:

  • Template type switching logic in additionalProps and payload construction
  • buildPage return structure compatibility with new batching in run()
  • Block batching logic enforcement (max 100 blocks per request)
  • Dependency update @notionhq/client impact and API compatibility

Possibly related PRs

  • Notion API Update #18317 — Related modifications to create-page-from-database action and Notion app data-source/meta handling APIs used by template support implementation

Suggested labels

User submitted

Suggested reviewers

  • GTFalcao
  • andrewjschuang

Poem

🐰 With templates in hand, pages bloom anew,
Batching blocks in groups of one hundred or two,
The Notion garden grows with gusto divine,
Version numbers tick—a release by design!

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings, 1 inconclusive)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The PR description is incomplete. The provided description template specifies a "WHY" section that should explain the motivation and context for the changes. However, the author has only provided "Resolves #18869" without any explanation. While the linked issue provides context about why templates should be supported, the PR itself lacks the required descriptive content following the repository's template structure. A proper description should explain the motivation, key changes, and rationale for the modifications.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Out of Scope Changes Check ❓ Inconclusive The PR includes functional changes directly addressing the template support feature in #18869 (modifications to create-page-from-database.mjs and notion.app.mjs, package.json dependency update), but also includes version bumps across approximately 25 action and source files (append-block, complete-file-upload, create-comment, create-database, etc.). These widespread version increments do not directly address any objectives stated in issue #18869, which focuses specifically on adding template functionality. While version coordination may be a standard practice in this repository, the necessity for bumping versions across so many unrelated action files is not explained in the PR description or linked issue. Either provide justification in the PR description for why all the individual action and source file version bumps are necessary (e.g., coordinated release strategy, dependency requirements), or consider separating these version updates into a separate release commit. The core template feature changes in create-page-from-database.mjs and notion.app.mjs are in-scope, but the rationale for 25+ additional version bumps should be clarified.
✅ Passed checks (1 passed)
Check name Status Explanation
Title Check ✅ Passed The PR title "18869 feature upgrade notion create page in data source action to support templates" directly references the feature objective and clearly describes the main change: upgrading the create-page-from-database action to support templates. The title accurately captures the primary change from the developer's perspective, and the raw summary confirms that the core modifications to create-page-from-database.mjs implement template support functionality with templateType property, per-template additionalProps logic, and template-based payload construction. The title is specific and related to the changeset's primary objective.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 18869-feature---upgrade-notion-create-page-in-data-source-action-to-support-templates

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a09a4f0 and 1c54013.

📒 Files selected for processing (1)
  • components/notion/actions/create-page-from-database/create-page-from-database.mjs (4 hunks)
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-01-23T03:55:51.998Z
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#15376
File: components/monday/sources/column-value-updated/column-value-updated.mjs:17-24
Timestamp: 2025-01-23T03:55:51.998Z
Learning: Alert props in Pipedream components are a special case that do not require a label property, and use the 'content' property as a replacement for description.

Applied to files:

  • components/notion/actions/create-page-from-database/create-page-from-database.mjs
📚 Learning: 2025-09-15T22:01:17.593Z
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#18362
File: components/leonardo_ai/README.md:45-49
Timestamp: 2025-09-15T22:01:17.593Z
Learning: In Leonardo AI components (and likely other Pipedream components), prefer using info alert props on the component itself rather than detailed "Key Features" sections in README files for action documentation.

Applied to files:

  • components/notion/actions/create-page-from-database/create-page-from-database.mjs
🧬 Code graph analysis (1)
components/notion/actions/create-page-from-database/create-page-from-database.mjs (4)
components/notion/actions/update-page/update-page.mjs (5)
  • selectedProperties (69-69)
  • properties (94-94)
  • meta (93-93)
  • page (132-132)
  • response (133-133)
components/notion/notion.app.mjs (8)
  • params (359-362)
  • params (388-388)
  • children (389-389)
  • response (15-17)
  • response (30-36)
  • response (50-53)
  • response (64-64)
  • response (363-363)
components/notion/actions/append-block/append-block.mjs (2)
  • children (86-86)
  • response (126-130)
components/notion/actions/duplicate-page/duplicate-page.mjs (1)
  • page (55-69)
🪛 Biome (2.1.2)
components/notion/actions/create-page-from-database/create-page-from-database.mjs

[error] 91-91: Other switch clauses can erroneously access this declaration.
Wrap the declaration in a block to restrict its access to the switch clause.

The declaration is defined in this switch clause:

Safe fix: Wrap the declaration in a block.

(lint/correctness/noSwitchDeclarations)


[error] 92-92: Other switch clauses can erroneously access this declaration.
Wrap the declaration in a block to restrict its access to the switch clause.

The declaration is defined in this switch clause:

Safe fix: Wrap the declaration in a block.

(lint/correctness/noSwitchDeclarations)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Publish TypeScript components
  • GitHub Check: Lint Code Base
  • GitHub Check: Verify TypeScript components
🔇 Additional comments (2)
components/notion/actions/create-page-from-database/create-page-from-database.mjs (2)

30-49: LGTM! Clear template type options.

The templateType prop is well-structured with descriptive labels that clearly communicate the behavior of each option to users.


155-165: Update alert messages to clarify Page Content will be appended post-template.

The alerts at lines 108 and 143 state that Page Content "will not apply to the page" for both default and template flows. However, the run() method always appends child blocks after page creation (lines 189-194), including for template flows.

Update both alerts to clarify that Page Content will be applied after the template is created, or remove Page Content as an option for template flows if that's not the intended behavior.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
components/notion/actions/create-page-from-database/create-page-from-database.mjs (1)

59-59: Fix typo.

“Willl” → “Will”.

-      description: "Select one or more page properties. Willl override properties set in the `Properties` prop below.",
+      description: "Select one or more page properties. Will override properties set in the `Properties` prop below.",
🧹 Nitpick comments (3)
components/notion/actions/create-page-from-database/create-page-from-database.mjs (3)

30-49: Set a default for templateType and tighten descriptions.

  • Defaulting to "none" avoids undefined paths in additionalProps().
  • Minor copy nits for clarity.
     templateType: {
       type: "string",
       label: "Template Type",
       description: "The type of template to use for the page. [See the documentation](https://developers.notion.com/docs/creating-pages-from-templates) for more information.",
+      default: "none",
       options: [
         {
           label: "No template. Provided children and properties are immediately applied.",
           value: "none",
         },
         {
-          label: "Applies the data source's default template to the newly created page. `children` cannot be specified in the create page request.",
+          label: "Apply the data source's default template. `children` cannot be specified in the create request.",
           value: "default",
         },
         {
-          label: "Indicates which exact template to apply to the newly created page. children cannot be specified in the create page request.",
+          label: "Apply a specific template by ID. `children` cannot be specified in the create request.",
           value: "template_id",
         },
       ],
       reloadProps: true,
     },

165-186: Preflight check for default template presence.

Per PR objective, check if a default template exists right before create (defaults can be removed at any time). If missing, fail fast with a clear message.

@@
-    const response = await this.notion.createPage({
+    if (this.templateType === "default") {
+      const res = await this.notion.listTemplates({ data_source_id: this.parentDataSource });
+      const templates = res.templates ?? res.results ?? [];
+      const hasDefault = templates.some(t => t.is_default === true || t.default === true);
+      if (!hasDefault) {
+        throw new Error("No default template configured for the selected data source.");
+      }
+    }
+    const response = await this.notion.createPage({

If the default-indicator property isn’t is_default, adjust accordingly to the official schema.


81-86: UX: Hide or gate Page Content when using templates.

You already show an alert that Page Content doesn’t apply for template flows. Consider conditionally surfacing Page Content only for templateType = "none" to avoid confusion.

  • Move Page Content into additionalProps for the "none" branch, or
  • Add a runtime guard that ignores non-empty pageContent with a warning when templateType ≠ "none".

Also applies to: 104-111, 137-142

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 36a8917 and 2a1e9ec.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (3)
  • components/notion/actions/create-page-from-database/create-page-from-database.mjs (4 hunks)
  • components/notion/notion.app.mjs (1 hunks)
  • components/notion/package.json (2 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
components/notion/actions/create-page-from-database/create-page-from-database.mjs (4)
components/notion/actions/update-page/update-page.mjs (4)
  • selectedProperties (69-69)
  • properties (94-94)
  • meta (93-93)
  • page (132-132)
components/notion/actions/append-block/append-block.mjs (2)
  • children (86-86)
  • response (126-130)
components/notion/actions/common/base-page-builder.mjs (3)
  • children (270-270)
  • page (352-352)
  • response (353-356)
components/notion/actions/create-page/create-page.mjs (1)
  • response (52-64)
🪛 Biome (2.1.2)
components/notion/actions/create-page-from-database/create-page-from-database.mjs

[error] 91-91: Other switch clauses can erroneously access this declaration.
Wrap the declaration in a block to restrict its access to the switch clause.

The declaration is defined in this switch clause:

Safe fix: Wrap the declaration in a block.

(lint/correctness/noSwitchDeclarations)


[error] 92-92: Other switch clauses can erroneously access this declaration.
Wrap the declaration in a block to restrict its access to the switch clause.

The declaration is defined in this switch clause:

Safe fix: Wrap the declaration in a block.

(lint/correctness/noSwitchDeclarations)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: pnpm publish
  • GitHub Check: Publish TypeScript components
  • GitHub Check: Verify TypeScript components
  • GitHub Check: Lint Code Base
🔇 Additional comments (3)
components/notion/actions/create-page-from-database/create-page-from-database.mjs (1)

165-191: Disregard this review comment — verifyTemplateReady does not exist in notion-helper.

The suggested import will fail at runtime. Existing notion-helper exports are createPage, createNotionBuilder, and appendBlocks. The web search confirms that official Notion guidance for waiting until templates apply uses webhooks (page.content_updated event) or polling the Retrieve block children API—not a helper function. While the intent (delay block appending until template finishes) aligns with the PR objective, the proposed implementation does not exist in notion-helper and contradicts the library's actual API and Notion's official guidance.

Likely an incorrect or invalid review comment.

components/notion/package.json (1)

3-3: Version bump and @notionhq/client update are compatible with template features.

@notionhq/client v5.3.0 includes dataSources.listTemplates support, and API version 2025-09-03 enables creating pages using the template parameter (with type = "default" or "template_id"). The changes are safe to merge.

components/notion/notion.app.mjs (1)

278-280: No changes needed; original implementation is correct.

The Notion API explicitly returns a top-level templates array in the response, eliminating the ambiguity the review suggested. The current simple delegation to this._getNotionClient().dataSources.listTemplates(params) correctly handles this. Adding defensive fallbacks for results or empty defaults is unnecessary when the API contract is clear and consistent.

- Bumped versions for multiple actions and sources, including `append-block`, `complete-file-upload`, `create-comment`, `create-database`, `create-file-upload`, `create-page`, `delete-block`, `duplicate-page`, `get-current-user`, `list-all-users`, `list-file-uploads`, `query-database`, `retrieve-block`, `retrieve-database-content`, `retrieve-database-schema`, `retrieve-file-upload`, `retrieve-page`, `retrieve-page-property-item`, `retrieve-user`, `search`, `send-file-upload`, `update-block`, `update-database`, `update-page`, and various sources.
- Ensured all components are aligned with the latest API specifications.
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (4)
components/notion/sources/page-properties-updated-instant/page-properties-updated-instant.mjs (2)

63-76: Possible mismatch: filtering by property IDs but webhook may send property names

props.properties stores IDs (value: prop[1].id), but event.data.updated_properties may be names. If so, the filter won’t match and events won’t emit as expected. Please confirm payload shape; if names are sent, normalize by mapping names→IDs before comparing. Example:

-      let propertyHasChanged = false;
-      for (const propertyName of updatedProperties) {
-        if (!this.properties || this.properties.includes(propertyName)) {
-          propertyHasChanged = true;
-        }
-      }
+      let propertyHasChanged = false;
+      if (!this.properties?.length) {
+        propertyHasChanged = true;
+      } else {
+        const selected = new Set(this.properties);
+        // First try direct ID match
+        for (const p of updatedProperties) {
+          if (selected.has(p)) { propertyHasChanged = true; break; }
+        }
+        // Fallback: map names -> IDs if still no match
+        if (!propertyHasChanged) {
+          try {
+            const { properties } = await this.notion.retrieveDataSource(this.dataSourceId);
+            const nameToId = new Map(Object.values(properties).map((pr) => [pr.name, pr.id]));
+            for (const p of updatedProperties) {
+              const id = nameToId.get(p);
+              if (id && selected.has(id)) { propertyHasChanged = true; break; }
+            }
+          } catch (e) {
+            console.log("Failed to map Notion property names to IDs", e);
+          }
+        }
+      }

79-86: Harden page fetch with try/catch

Network/API hiccups from Notion can throw and drop the event. Wrap retrievePage and $emit in try/catch with a concise log; keep behavior unchanged.

-      const page = await this.notion.retrievePage(event.entity.id);
-
-      const meta = this._generateMeta(page);
-      this.$emit({
-        ...event,
-        page,
-      }, meta);
+      try {
+        const page = await this.notion.retrievePage(event.entity.id);
+        const meta = this._generateMeta(page);
+        this.$emit({ ...event, page }, meta);
+      } catch (err) {
+        console.log("Failed to retrieve Notion page", err);
+      }
components/notion/actions/delete-block/delete-block.mjs (2)

31-31: Wording nit: align summary with Notion’s “archive” semantics.

The API sets archived: true (moves to Trash). Consider reflecting that to avoid confusion.

-    $.export("$summary", `Successfully deleted block with ID ${this.blockId}`);
+    $.export("$summary", `Archived block (moved to Trash) with ID ${this.blockId}`);

9-9: LGTM: patch version bump is appropriate and verified.

Verification confirms deleteBlock exists in notion.app (line 316) and is correctly invoked in delete-block.mjs (line 30). Version 0.0.8 is correct for this metadata-only update.

Optional improvements to consider:

  • Extract blockId prop to a shared propDefinition in notion.app for consistency with other actions (e.g., append-block.mjs), though this would require creating the shared definition first.
  • Align summary text with API terminology: change "deleted" to "archived" for clarity, though the existing infoLabel already clarifies the block moves to Trash.
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2a1e9ec and a09a4f0.

📒 Files selected for processing (33)
  • components/notion/actions/append-block/append-block.mjs (1 hunks)
  • components/notion/actions/complete-file-upload/complete-file-upload.mjs (1 hunks)
  • components/notion/actions/create-comment/create-comment.mjs (1 hunks)
  • components/notion/actions/create-database/create-database.mjs (1 hunks)
  • components/notion/actions/create-file-upload/create-file-upload.mjs (1 hunks)
  • components/notion/actions/create-page/create-page.mjs (1 hunks)
  • components/notion/actions/delete-block/delete-block.mjs (1 hunks)
  • components/notion/actions/duplicate-page/duplicate-page.mjs (1 hunks)
  • components/notion/actions/get-current-user/get-current-user.mjs (1 hunks)
  • components/notion/actions/list-all-users/list-all-users.mjs (1 hunks)
  • components/notion/actions/list-file-uploads/list-file-uploads.mjs (1 hunks)
  • components/notion/actions/query-database/query-database.mjs (1 hunks)
  • components/notion/actions/retrieve-block/retrieve-block.mjs (1 hunks)
  • components/notion/actions/retrieve-database-content/retrieve-database-content.mjs (1 hunks)
  • components/notion/actions/retrieve-database-schema/retrieve-database-schema.mjs (1 hunks)
  • components/notion/actions/retrieve-file-upload/retrieve-file-upload.mjs (1 hunks)
  • components/notion/actions/retrieve-page-property-item/retrieve-page-property-item.mjs (1 hunks)
  • components/notion/actions/retrieve-page/retrieve-page.mjs (1 hunks)
  • components/notion/actions/retrieve-user/retrieve-user.mjs (1 hunks)
  • components/notion/actions/search/search.mjs (1 hunks)
  • components/notion/actions/send-file-upload/send-file-upload.mjs (1 hunks)
  • components/notion/actions/update-block/update-block.mjs (1 hunks)
  • components/notion/actions/update-database/update-database.mjs (1 hunks)
  • components/notion/actions/update-page/update-page.mjs (1 hunks)
  • components/notion/sources/new-comment-created/new-comment-created.mjs (1 hunks)
  • components/notion/sources/new-database/new-database.mjs (1 hunks)
  • components/notion/sources/new-page/new-page.mjs (1 hunks)
  • components/notion/sources/new-webhook-event-instant/new-webhook-event-instant.mjs (1 hunks)
  • components/notion/sources/page-or-subpage-updated/page-or-subpage-updated.mjs (1 hunks)
  • components/notion/sources/page-properties-updated-instant/page-properties-updated-instant.mjs (1 hunks)
  • components/notion/sources/updated-page-by-timestamp/updated-page-by-timestamp.mjs (1 hunks)
  • components/notion/sources/updated-page-id/updated-page-id.mjs (1 hunks)
  • components/notion/sources/updated-page/updated-page.mjs (1 hunks)
✅ Files skipped from review due to trivial changes (19)
  • components/notion/sources/new-database/new-database.mjs
  • components/notion/actions/create-comment/create-comment.mjs
  • components/notion/actions/retrieve-block/retrieve-block.mjs
  • components/notion/actions/update-page/update-page.mjs
  • components/notion/actions/retrieve-page-property-item/retrieve-page-property-item.mjs
  • components/notion/sources/updated-page-by-timestamp/updated-page-by-timestamp.mjs
  • components/notion/actions/create-file-upload/create-file-upload.mjs
  • components/notion/actions/query-database/query-database.mjs
  • components/notion/sources/new-comment-created/new-comment-created.mjs
  • components/notion/actions/append-block/append-block.mjs
  • components/notion/actions/update-database/update-database.mjs
  • components/notion/actions/list-file-uploads/list-file-uploads.mjs
  • components/notion/actions/create-page/create-page.mjs
  • components/notion/actions/list-all-users/list-all-users.mjs
  • components/notion/actions/retrieve-page/retrieve-page.mjs
  • components/notion/sources/new-page/new-page.mjs
  • components/notion/actions/complete-file-upload/complete-file-upload.mjs
  • components/notion/sources/updated-page/updated-page.mjs
  • components/notion/actions/search/search.mjs
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Publish TypeScript components
  • GitHub Check: Verify TypeScript components
  • GitHub Check: pnpm publish
  • GitHub Check: Lint Code Base
🔇 Additional comments (14)
components/notion/actions/retrieve-user/retrieve-user.mjs (1)

7-7: LGTM! Coordinated version bump.

The patch version increment is appropriate for this coordinated release across the Notion integration.

components/notion/actions/update-block/update-block.mjs (1)

10-10: LGTM! Version bump aligns with package updates.

The patch version bump from 0.0.7 to 0.0.8 is appropriate given the package-level updates (Notion package 1.0.5→1.0.6 and @notionhq/client ^5.0.0→^5.3.0) in this PR. Since no code changes were made to this action, a patch bump maintains version consistency across the Notion component suite.

components/notion/actions/get-current-user/get-current-user.mjs (1)

7-7: LGTM: Version bump with no functional changes.

The patch version increment from 0.0.1 to 0.0.2 aligns with the coordinated release pattern across Notion components in this PR. No code changes means no risk of regressions.

components/notion/sources/new-webhook-event-instant/new-webhook-event-instant.mjs (1)

9-9: LGTM! Version bump with no functional changes.

The version increment is part of a coordinated update across the Notion integration components.

components/notion/sources/updated-page-id/updated-page-id.mjs (1)

10-10: Verify necessity of version bump.

This source has no functional changes, and the PR's template support feature applies to the create-page-from-database action. Is this version bump necessary, or is it part of a coordinated release strategy across Notion components?

components/notion/actions/retrieve-database-schema/retrieve-database-schema.mjs (1)

7-7: LGTM! Version bump aligns with package-level dependency updates.

The patch version increment is appropriate as part of the coordinated package update (notably the @notionhq/client dependency bump from ^5.0.0 to ^5.3.0).

components/notion/sources/page-or-subpage-updated/page-or-subpage-updated.mjs (1)

10-10: Version bump to 0.0.14 — LGTM.

No logic changes; safe to merge.

components/notion/actions/create-database/create-database.mjs (1)

10-10: LGTM! Version bump aligns with package dependency updates.

The patch version bump is appropriate for maintaining compatibility with the updated Notion package (1.0.6) and @notionhq/client dependency (^5.3.0), even though this specific action has no functional changes.

components/notion/actions/send-file-upload/send-file-upload.mjs (1)

11-11: Version bump is appropriate for the coordinated package update.

The patch-level version increment aligns with the broader Notion package updates (parent package and @notionhq/client dependency upgrade) and maintains consistency across the module.

components/notion/actions/duplicate-page/duplicate-page.mjs (1)

10-10: LGTM! Routine version bump.

The version increment with no logic changes is appropriate for package maintenance, consistent with the broader dependency updates in this PR.

components/notion/actions/retrieve-file-upload/retrieve-file-upload.mjs (1)

9-9: Version bump acknowledged.

The patch version increment aligns with the coordinated version updates across multiple Notion actions in this PR.

components/notion/sources/page-properties-updated-instant/page-properties-updated-instant.mjs (1)

9-9: Patch bump LGTM

Version 1.0.1 is appropriate given no functional changes here.

components/notion/actions/retrieve-database-content/retrieve-database-content.mjs (1)

7-7: Let me verify the actual code changes in the file to understand the version bump context.

Version bump is correct and follows Pipedream standards—original concern about package.json mismatch is invalid.

In Pipedream's architecture, when you update a file, you must increment the versions of all components that import or are affected by the updated file. The individual action version (1.0.2) is separate from the components/notion/package.json version (1.0.6). Individual components have independent versioning—when you add an action to the registry, the version should be 0.0.1; if the action was at version 0.1.0 and you've fixed a bug, change it to 0.1.1 when committing your final code. The current public marketplace shows this action was previously at 1.0.1, so bumping to 1.0.2 is a standard patch increment for a bug fix or minor update. This is correct and follows Pipedream component guidelines.

Likely an incorrect or invalid review comment.

components/notion/actions/delete-block/delete-block.mjs (1)

23-27: The review comment is based on an incorrect assumption—no blockId propDefinition exists in notion.app.mjs.

The suggested refactor cannot be applied. The propDefinitions object contains: dataSourceId, pageId, pageIdInDataSource, propertyId, metaTypes, propertyTypes, archived, title, userId, fileUploadId, sortDirection, pageSize, startCursor, filter, and pageContent—but no blockId propDefinition. The current inline definition in delete-block.mjs is the correct approach.

Likely an incorrect or invalid review comment.

michelle0927
michelle0927 previously approved these changes Oct 28, 2025
Copy link
Collaborator

@michelle0927 michelle0927 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Ready for QA.

- Updated the `listTemplates` method call to use a parameters object for improved readability and maintainability.
- Added support for optional `start_cursor` parameter to handle pagination when retrieving templates.
@luancazarine luancazarine force-pushed the 18869-feature---upgrade-notion-create-page-in-data-source-action-to-support-templates branch from 47e9127 to 1c54013 Compare October 29, 2025 18:37
@michelle0927 michelle0927 merged commit 7f79f75 into master Oct 30, 2025
16 checks passed
@michelle0927 michelle0927 deleted the 18869-feature---upgrade-notion-create-page-in-data-source-action-to-support-templates branch October 30, 2025 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] - Upgrade Notion "Create Page in Data Source" Action to Support Templates

3 participants