Skip to content

Conversation

@RLeek
Copy link
Contributor

@RLeek RLeek commented Aug 12, 2025

WHY

When retrieveMarkdown is true, this will convert the pages content into markdown, including child page as those are included in the child-blocks of a page. If the page has many child pages, this will cause the request to timeout and/or hit rate-limits as it recursively fetches the content for all child pages.

This change makes it so that child pages are skipped when shouldRetrieveChildren is false to avoid this lengthy operation, as it isn't required and removed in the output.

Summary by CodeRabbit

  • New Features
    • Added an option to enable or disable parsing of child pages during Markdown export, reducing work and improving performance when disabled.
  • Chores
    • Bumped release metadata across Notion actions, sources, and package; no changes to public APIs or runtime behavior.

@vercel
Copy link

vercel bot commented Aug 12, 2025

@RLeek is attempting to deploy a commit to the Pipedreamers Team on Vercel.

A member of the Team first needs to authorize it.

@vercel
Copy link

vercel bot commented Aug 12, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
pipedream-docs-redirect-do-not-edit ⬜️ Ignored Aug 12, 2025 1:36pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 12, 2025

Walkthrough

Adds a conditional NotionToMarkdown config flag to control child-page parsing (parseChildPages set to false when shouldRetrieveChildren is false); bumps version metadata across many Notion actions, sources, and package.json. No runtime control-flow or public API signature changes.

Changes

Cohort / File(s) Summary of Changes
Notion Markdown Parsing Config
components/notion/notion.app.mjs
Adds conditional config to set parseChildPages: false when shouldRetrieveChildren is false; separateChildPage: true unchanged. Return logic unchanged; no public API/signature changes.
Action Version Bumps (bulk)
components/notion/actions/append-block/append-block.mjs, components/notion/actions/create-comment/create-comment.mjs, components/notion/actions/create-page-from-database/create-page-from-database.mjs, components/notion/actions/create-page/create-page.mjs, components/notion/actions/duplicate-page/duplicate-page.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-page-property-item/retrieve-page-property-item.mjs, components/notion/actions/retrieve-page/retrieve-page.mjs, components/notion/actions/search/search.mjs, components/notion/actions/update-page/update-page.mjs
Patch-version increments in each module's exported version field; no logic, props, or run() changes.
Source Version Bumps (bulk)
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/page-or-subpage-updated/page-or-subpage-updated.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-version increments in each source's exported version field; no runtime or API changes.
Package Metadata
components/notion/package.json
Package version bumped from 0.8.0 to 0.8.1. No other fields changed.

Sequence Diagram(s)

sequenceDiagram
  participant Caller
  participant NotionModule as Notion Module
  participant N2M as NotionToMarkdown

  Caller->>NotionModule: getPageAsMarkdown(pageId, shouldRetrieveChildren)
  alt shouldRetrieveChildren = false
    NotionModule->>N2M: new NotionToMarkdown({ ..., parseChildPages:false, separateChildPage:true })
  else
    NotionModule->>N2M: new NotionToMarkdown({ ..., separateChildPage:true })
  end
  NotionModule->>N2M: pageToMarkdown(pageId)
  N2M-->>NotionModule: blocks
  NotionModule->>N2M: toMarkdownString(blocks)
  N2M-->>NotionModule: output
  alt shouldRetrieveChildren
    NotionModule-->>Caller: output
  else
    NotionModule-->>Caller: output.parent
  end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Suggested reviewers

  • lcaresia
  • danhsiung
  • jcortes

Poem

I nibbled a config and set children to rest,
Tucked markdown subpages into a neat nest.
Parents still hop with their content intact,
A rabbit-approved patch — tidy and compact. 🐇✨


📜 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 884fd75 and 945ce81.

📒 Files selected for processing (21)
  • components/notion/actions/append-block/append-block.mjs (1 hunks)
  • components/notion/actions/create-comment/create-comment.mjs (1 hunks)
  • components/notion/actions/create-page-from-database/create-page-from-database.mjs (1 hunks)
  • components/notion/actions/create-page/create-page.mjs (1 hunks)
  • components/notion/actions/duplicate-page/duplicate-page.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-page-property-item/retrieve-page-property-item.mjs (1 hunks)
  • components/notion/actions/retrieve-page/retrieve-page.mjs (1 hunks)
  • components/notion/actions/search/search.mjs (1 hunks)
  • components/notion/actions/update-page/update-page.mjs (1 hunks)
  • components/notion/package.json (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/page-or-subpage-updated/page-or-subpage-updated.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 (20)
  • components/notion/sources/page-or-subpage-updated/page-or-subpage-updated.mjs
  • components/notion/actions/retrieve-block/retrieve-block.mjs
  • components/notion/actions/retrieve-database-schema/retrieve-database-schema.mjs
  • components/notion/package.json
  • components/notion/sources/new-page/new-page.mjs
  • components/notion/actions/retrieve-page-property-item/retrieve-page-property-item.mjs
  • components/notion/actions/query-database/query-database.mjs
  • components/notion/sources/new-comment-created/new-comment-created.mjs
  • components/notion/actions/search/search.mjs
  • components/notion/actions/retrieve-page/retrieve-page.mjs
  • components/notion/sources/updated-page/updated-page.mjs
  • components/notion/actions/retrieve-database-content/retrieve-database-content.mjs
  • components/notion/actions/create-comment/create-comment.mjs
  • components/notion/actions/duplicate-page/duplicate-page.mjs
  • components/notion/actions/create-page/create-page.mjs
  • components/notion/actions/append-block/append-block.mjs
  • components/notion/actions/update-page/update-page.mjs
  • components/notion/actions/create-page-from-database/create-page-from-database.mjs
  • components/notion/sources/new-database/new-database.mjs
  • components/notion/sources/updated-page-id/updated-page-id.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 (1)
components/notion/sources/updated-page-by-timestamp/updated-page-by-timestamp.mjs (1)

11-11: Version bump only — LGTM

No logic changes; safe metadata update consistent with the PR’s broader Notion versioning.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@adolfo-pd adolfo-pd added the User submitted Submitted by a user label Aug 12, 2025
@pipedream-component-development
Copy link
Collaborator

Thank you so much for submitting this! We've added it to our backlog to review, and our team has been notified.

@pipedream-component-development
Copy link
Collaborator

Thanks for submitting this PR! When we review PRs, we follow the Pipedream component guidelines. If you're not familiar, here's a quick checklist:

@RLeek RLeek changed the title [ACTIONS] Notion - notion-retrieve-block - Fix ratelimits when fetching only page content when markdown is true [ACTIONS] Notion - notion-retrieve-block - Fix timeouts when fetching only page content when markdown is true Aug 12, 2025
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 (1)
components/notion/notion.app.mjs (1)

367-369: Prefer explicit config over conditional object spread

Replace the conditional spread with a direct assignment for clarity and to avoid spreading a boolean. Semantics remain the same and it’s easier to read/maintain.

           separateChildPage: true,
-          ...!shouldRetrieveChildren && {
-            parseChildPages:false
-          }
+          parseChildPages: shouldRetrieveChildren,
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1f3a659 and 2c1bf3a.

📒 Files selected for processing (1)
  • components/notion/notion.app.mjs (1 hunks)
🔇 Additional comments (1)
components/notion/notion.app.mjs (1)

363-371: No action needed: parseChildPages is supported in the installed version

  • The project’s components/notion/package.json pins [email protected], and parseChildPages was added in v3.1.0.
  • Both separateChildPage and parseChildPages options are officially supported (see v3.1.0+ in the notion-to-md API docs and changelog).

@andrewjschuang andrewjschuang merged commit 569d531 into PipedreamHQ:master Aug 12, 2025
10 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

User submitted Submitted by a user

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants