Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

michelle0927
Copy link
Collaborator

@michelle0927 michelle0927 commented Sep 15, 2025

Resolves #18349

Summary by CodeRabbit

  • New Features

    • When creating a page from a database, the new page is now explicitly parented to the selected data source.
  • Bug Fixes

    • Clearer configuration errors when property values don’t match expected types during Notion property conversion.
  • Chores

    • Version bumps across Notion components and actions (pages, databases, blocks, and file uploads); no behavior changes beyond the updates noted above.

Copy link

vercel bot commented Sep 15, 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 Sep 15, 2025 3:48pm
pipedream-docs-redirect-do-not-edit Ignored Ignored Sep 15, 2025 3:48pm

Copy link
Contributor

coderabbitai bot commented Sep 15, 2025

Walkthrough

This PR primarily bumps versions across multiple Notion actions and the Notion package. It adds configuration error handling during property conversion in the base page builder and updates create-page-from-database to set the parent via data_source_id when creating a page from a data source.

Changes

Cohort / File(s) Summary of Changes
Property conversion error handling
components/notion/actions/common/base-page-builder.mjs
Import ConfigurationError and wrap property conversion in try/catch; rethrow as ConfigurationError with property label and expected type details. No signature changes.
Create page from data source parent assignment
components/notion/actions/create-page-from-database/create-page-from-database.mjs
Include parent with data_source_id set to configured parentDataSource when creating a page; version bumped 1.0.0 → 1.0.1.
Version bumps — Notion actions
components/notion/actions/append-block/append-block.mjs, .../complete-file-upload/complete-file-upload.mjs, .../create-database/create-database.mjs, .../create-file-upload/create-file-upload.mjs, .../create-page/create-page.mjs, .../delete-block/delete-block.mjs, .../duplicate-page/duplicate-page.mjs, .../list-file-uploads/list-file-uploads.mjs, .../retrieve-file-upload/retrieve-file-upload.mjs, .../send-file-upload/send-file-upload.mjs, .../update-block/update-block.mjs, .../update-database/update-database.mjs, .../update-page/update-page.mjs
Bump versions only; no logic/control-flow changes.
Package version bump
components/notion/package.json
Version updated 1.0.0 → 1.0.1; no other changes.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant Action as Notion Action
  participant Builder as BasePageBuilder
  participant Converter as Property Converter

  User->>Action: Provide properties input
  Action->>Builder: _convertPropertiesToNotion(properties)
  Builder->>Converter: convertToNotion(property)
  alt conversion succeeds
    Converter-->>Builder: Notion-formatted value
    Builder-->>Action: Converted properties
    note right of Action: Continues with Notion API call
  else conversion throws
    Converter-->>Builder: Error
    Builder-->>Action: throw ConfigurationError(property label, expected type)
    note over Action: Error surfaced as ConfigurationError
  end
Loading
sequenceDiagram
  autonumber
  actor User
  participant Action as CreatePageFromDataSource
  participant Notion as Notion API

  User->>Action: Run with parentDataSource and properties
  Action->>Notion: Create page { parent: { data_source_id }, properties }
  Notion-->>Action: Page created response
  Action-->>User: Return created page
  note over Action,Notion: Parent now explicitly set via data_source_id
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

A thump of my paw, a version hop,
A parent set—no need to stop.
Properties checked, errors clear,
Configuration whispers in your ear.
I twitch my nose, review done quick—
Ship it swift, ears up, click! 🐇✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The PR description does not follow the repository template: the template expects a "## WHY" section explaining motivation and details, but the current description contains only "Resolves #18349" and lacks a summary of what changed, why it was needed, and how it was verified. This omission makes the description incomplete for reviewers. As written, the PR description fails the repository's required description standard. Please update the PR description to follow the template by adding a "## WHY" section that summarizes the motivation, the substantive changes (notably the validation wrapper in base-page-builder.mjs and the parent data_source assignment in create-page-from-database.mjs), and how this resolves #18349, and include any verification steps or tests performed; also mention the metadata version bumps across other Notion actions. This will help reviewers understand intent and scope and speed up approval. After updating, re-run checks or request a quick re-review.
✅ Passed checks (4 passed)
Check name Status Explanation
Title Check ✅ Passed The title "Notion property building improvements" accurately and concisely reflects the primary functional changes in this PR — improved Notion property building and validation (notably changes in base-page-builder.mjs and create-page-from-database.mjs). It is specific, short, and free of noisy elements, so a teammate scanning history will understand the main intent. No edits are required for clarity.
Linked Issues Check ✅ Passed The changes satisfy the coding-related objectives of the linked issue [#18349]: base-page-builder.mjs now wraps convertToNotion in a try/catch and rethrows a ConfigurationError with a descriptive message when conversion fails, which provides the requested clearer validation errors, and create-page-from-database.mjs adds the parent data_source_id assignment aligning the action with the Data Sources migration. Other edits are metadata-only version bumps and do not affect the validation behavior. Overall, the PR implements the required property validation and error-reporting improvements described in the issue.
Out of Scope Changes Check ✅ Passed Most other diffs are package/component version bumps across various Notion action files and components/notion/package.json, which are metadata-only and unrelated to the property-validation work but appear harmless; the only functional changes in scope are the conversion error handling in base-page-builder.mjs and the parent assignment in create-page-from-database.mjs. I did not find other unrelated functional code changes outside the issue's scope. Therefore there are no concerning out-of-scope code changes that would block merge.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch issue-18349

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


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.

@michelle0927 michelle0927 marked this pull request as ready for review September 15, 2025 15:49
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: 1

🧹 Nitpick comments (3)
components/notion/actions/update-page/update-page.mjs (1)

131-133: Preserve original error (don’t wrap) to keep stack and error type.
Wrapping loses ConfigurationError raised by the base builder and can stringify to [object Object].

Apply this diff:

-    } catch (error) {
-      throw new Error(error.body || error);
-    }
+    } catch (error) {
+      if (error instanceof Error) throw error;
+      const msg = typeof error?.body === "string"
+        ? error.body
+        : typeof error === "string"
+          ? error
+          : JSON.stringify(error?.body ?? error);
+      throw new Error(msg);
+    }
components/notion/actions/send-file-upload/send-file-upload.mjs (1)

40-45: Avoid loading entire file into memory for large uploads.
Current approach buffers whole stream; consider a size guard to fail fast on oversized files.

Apply this guard:

   const fileBinary = await new Promise((resolve, reject) => {
     const chunks = [];
+    let total = 0;
+    const MAX_BYTES = 25 * 1024 * 1024; // 25MB, tune as needed
     stream.on("data", (chunk) => {
-      chunks.push(chunk));
+      total += chunk.length;
+      if (total > MAX_BYTES) {
+        stream.destroy(new Error(`File exceeds ${MAX_BYTES} bytes`));
+        return;
+      }
+      chunks.push(chunk);
     });
     stream.on("end", () => resolve(Buffer.concat(chunks)));
     stream.on("error", reject);
   });
components/notion/actions/create-page-from-database/create-page-from-database.mjs (1)

88-90: Parent assignment via data_source_id looks correct; verify API expectations.
Notion’s create page API should accept parent: { data_source_id }. If their API requires an explicit type or shape differs, this may fail.

Run against a test workspace to confirm behavior when:

  • Parent is a Data Source with/without default title property.
  • Both meta-derived parent (if any) and this explicit parent exist; confirm the explicit parent wins as intended.

If you prefer, we can add a guard to only set parent here when meta didn’t already provide it.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 445f5f9 and 3eea20b.

📒 Files selected for processing (16)
  • components/notion/actions/append-block/append-block.mjs (1 hunks)
  • components/notion/actions/common/base-page-builder.mjs (2 hunks)
  • components/notion/actions/complete-file-upload/complete-file-upload.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-from-database/create-page-from-database.mjs (2 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/list-file-uploads/list-file-uploads.mjs (1 hunks)
  • components/notion/actions/retrieve-file-upload/retrieve-file-upload.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/package.json (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-08-19T09:02:18.222Z
Learnt from: nurul3101
PR: PipedreamHQ/pipedream#18092
File: components/prisma_management_api/README.md:24-31
Timestamp: 2025-08-19T09:02:18.222Z
Learning: In Prisma Management API documentation, the "Create Database" section title is intentional and should not be changed to "Create Project", even though the action technically creates a complete project with database. This naming choice follows user-facing terminology preferences.

Applied to files:

  • components/notion/actions/create-database/create-database.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). (3)
  • GitHub Check: Publish TypeScript components
  • GitHub Check: Verify TypeScript components
  • GitHub Check: Lint Code Base
🔇 Additional comments (17)
components/notion/actions/update-page/update-page.mjs (2)

10-10: Version bump only — OK.
No functional changes. Safe to merge.


61-79: Sanity-check the new schema validation flow end-to-end.

  • Confirmed: base builder throws ConfigurationError on conversion failures (components/notion/actions/common/base-page-builder.mjs — _convertPropertiesToNotion).
  • Unconfirmed: the search for create-page-from-database → parent via data_source_id failed due to a regex parse error; verify that create-page-from-database sets parent using data_source_id or run:
    fd -a 'create-page-from-database.mjs' components | xargs -I{} sh -c 'echo "---- {} ----"; rg -n "data_source_id" {} -n -C3'
components/notion/actions/send-file-upload/send-file-upload.mjs (1)

11-11: Version bump only — OK.
No logic changes.

components/notion/actions/list-file-uploads/list-file-uploads.mjs (1)

9-9: Version bump only — OK.
No behavioral changes.

components/notion/package.json (1)

3-3: Package patch bump — OK.
Matches action version bumps.

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

10-10: Version bump only — OK.
No functional diffs.

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

10-10: Version bump only — OK.
No logic changes.

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

10-10: Version bump only — OK.
No behavioral changes.

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

9-9: Version bump only — OK.
No functional changes.

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

10-10: Version bump only — LGTM.
No functional changes observed.

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

9-9: Version bump only — LGTM.
No functional changes observed.

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

10-10: Version bump only — LGTM.
No functional changes observed.

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

9-9: Version bump only — LGTM.
No functional changes observed.

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

9-9: Version bump only — LGTM.
No functional changes observed.

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

10-10: Version bump only — LGTM.
No functional changes observed.

components/notion/actions/common/base-page-builder.mjs (1)

8-8: Good upgrade: use ConfigurationError for actionable config feedback.
This will surface clearer UI errors to users.

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

11-11: Version bump — LGTM.
No functional concerns for the version change itself.

Copy link
Collaborator

@luancazarine luancazarine left a comment

Choose a reason for hiding this comment

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

Hi @michelle0927, LGTM! Ready for QA!

@vunguyenhung vunguyenhung merged commit 27d3d08 into master Sep 16, 2025
10 checks passed
@vunguyenhung vunguyenhung deleted the issue-18349 branch September 16, 2025 09:26
sergio-eliot-rodriguez pushed a commit to sergio-eliot-rodriguez/sergio_wong_does_pipedream that referenced this pull request Sep 21, 2025
* updates

* remove console.log

* versions
vunguyenhung added a commit that referenced this pull request Sep 24, 2025
* Leonardo AI components

* added unzoom image action

* fixing link errors

* more lint fixes

* Merging pull request #18359

* fix: pagination prop and params struct

* fix: no need for paginate here

* chore: update version

* chore: cleanup

* chore: update package

* feat: allow raw response

* chore: bump package

* fix: buffer response instead

* Update components/google_drive/actions/download-file/download-file.mjs

Co-authored-by: Jorge Cortes <[email protected]>

* versions

* pnpm-lock.yaml

* pnpm-lock.yaml

* pnpm-lock.yaml

* feat: add content selector

* chore: bump package

* fix: comments

* chore: bump versions

* chore: fix versions

* fixes: QA fixes

* feat: add cursor to req

* package.json

---------

Co-authored-by: joao <[email protected]>
Co-authored-by: joaocoform <[email protected]>
Co-authored-by: Jorge Cortes <[email protected]>
Co-authored-by: Michelle Bergeron <[email protected]>
Co-authored-by: Luan Cazarine <[email protected]>

* Merging pull request #18361

* update siteId prop

* pnpm-lock.yaml

* package.json version

* Google Sheets - update row refresh fields  (#18369)

* change prop order and refresh fields

* bump package.json

* Pipedrive - fix app name (#18370)

* use pipedriveApp instead of app

* bump package.json

* Pipedrive - pipelineId integer (#18372)

* pipelineId - integer

* bump versions

* Adding app scaffolding for lightspeed_ecom_c_series

* Adding app scaffolding for financial_data

* Adding app scaffolding for microsoft_authenticator

* Merging pull request #18345

* updates

* versions

* versions

* Merging pull request #18368

* updates

* remove console.log

* versions

* Coinbase Developer Platform - New Wallet Event (#18342)

* new component

* pnpm-lock.yaml

* updates

* updates

* Hubspot - update search-crm (#18360)

* update search-crm

* limit results to one page

* update version

* package.json version

* Merging pull request #18347

* widget props

* fix version

* Adding app scaffolding for rundeck

* Merging pull request #18378

* Update Taiga component with new actions and sources

- Bump version to 0.1.0 in package.json and add dependency on @pipedream/platform.
- Introduce new actions for creating, updating, and deleting issues, tasks, and user stories.
- Add sources for tracking changes and deletions of issues and tasks.
- Implement utility functions for parsing and cleaning objects in common/utils.mjs.
- Enhance prop definitions for better integration with Taiga API.

* pnpm update

* Refactor Taiga actions to utilize parseObject utility

- Added parseObject utility for tags, watchers, and points in update-issue, update-task, and update-userstory actions.
- Removed the update-project action as it is no longer needed.
- Enhanced base source to include secret key validation for webhook security.

* Merging pull request #18382

* add testSources prop

* pnpm-lock.yaml

* fix

* Merging pull request #18323

* Added actions

* Added actions

* Added actions

* Merging pull request #18377

* Added actions

* Update components/weaviate/actions/create-class/create-class.mjs

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: Luan Cazarine <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Merging pull request #18376

* Adding app scaffolding for etrusted

* Adding app scaffolding for intelliflo_office

* Adding app scaffolding for thoughtspot

* Adding app scaffolding for kordiam

* Adding app scaffolding for ticketsauce

* trustpilot fixes (#18152)

* trustpilot fixes

* more fixes

* update versions

* more version updates

* fixes

* Bump all Trustpilot actions to version 0.1.0

Major improvements and API updates across all actions:
- Enhanced private API support with proper authentication
- Improved parameter handling and validation
- Better error handling and response structures
- Added new conversation flow for product reviews
- Fixed endpoint URLs to match latest API documentation
- Streamlined request/response processing

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>

* up version and clean up sources

* merge

* fix business ID

* delete temp action

* Update components/trustpilot/sources/new-product-reviews/new-product-reviews.mjs

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update components/trustpilot/sources/new-product-reviews/new-product-reviews.mjs

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update components/trustpilot/sources/new-product-reviews/new-product-reviews.mjs

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update components/trustpilot/sources/new-service-reviews/new-service-reviews.mjs

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* comments

* Pagination

* fixes

* comments

* missed some `$`'s

* unduplicated

* more fixes

* final comments

* more comments

* .

---------

Co-authored-by: Claude <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Adding app scaffolding for peekalink

* 18314 twilio (#18350)

* Update Twilio component versions and dependencies

- Update Twilio Send Message action adding detailed description for 'from' prop and refactoring phone number validation logic.
- Incremented action versions for several Twilio actions.

* pnpm update

* Updating LinkedIn API version (#18399)

* Merging pull request #18394

* Databricks API - Jobs action components (#18371)

* Notion property building improvements (#18381)

* validate property types

* versions

* Google Business - add debug log (#18407)

* add debug log

* bump versions

* Notion API Key - update @pipedream/notion version (#18409)

* update @pipedream/notion dependency version

* pnpm-lock.yaml

* Adding app scaffolding for reduct_video

* Adding app scaffolding for shopware

* Adding app scaffolding for instamojo

* Hubspot - bug fix to sources w/ property changes (#18379)

* updates

* versions

* Google sheets type fix (#18411)

* Fixing worksheetId prop type from string to integer

* Version bumps

---------

Co-authored-by: Leo Vu <[email protected]>

* Merging pull request #18393

* new components

* remove console.log

* versions

* update

* Merging pull request #18408

* 403 error message

* versions

* update

* Merging pull request #18419

* Changes per PR Review

* Removes leonardo_ai_actions.mdc not indented for merging

* synced lockfile after install

* fully lock form-data for leonardo_ai

* conflict solving

* lint fixes

* Chipped down Readme, implemented async options in gen motion

---------

Co-authored-by: jocarino <[email protected]>
Co-authored-by: joao <[email protected]>
Co-authored-by: joaocoform <[email protected]>
Co-authored-by: Jorge Cortes <[email protected]>
Co-authored-by: Michelle Bergeron <[email protected]>
Co-authored-by: Luan Cazarine <[email protected]>
Co-authored-by: michelle0927 <[email protected]>
Co-authored-by: Andrew Chuang <[email protected]>
Co-authored-by: danhsiung <[email protected]>
Co-authored-by: Lucas Caresia <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Job <[email protected]>
Co-authored-by: Claude <[email protected]>
Co-authored-by: Guilherme Falcão <[email protected]>
Co-authored-by: Leo Vu <[email protected]>
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.

Notion property building improvements
3 participants