npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

n8n-nodes-notion-rich-text-splitter

v1.0.0

Published

Split and append rich text to Notion pages, bypassing the 2,000 character limit

Readme

n8n-nodes-notion-rich-text-splitter

This is an n8n community node that helps you bypass Notion's 2,000 character limit for rich text blocks by automatically splitting and appending large rich text content to Notion pages.

Features

  • Bypass Character Limits: Automatically split rich text into multiple blocks (max 2,000 chars each)
  • Preserve Formatting: Maintains all text annotations (bold, italic, colors, links, etc.)
  • Smart Splitting: Splits on word boundaries to avoid breaking mid-word
  • Batch Processing: Send up to 100 blocks per API request for efficiency
  • Rate Limiting: Built-in delays between batches to avoid Notion API limits
  • Preview Mode: Test splitting without actually appending to pages
  • Multiple Block Types: Support for paragraphs, headings, quotes, and callouts

Installation

Community Nodes (Recommended)

  1. Open your n8n instance
  2. Go to SettingsCommunity Nodes
  3. Click Install
  4. Enter: n8n-nodes-notion-rich-text-splitter
  5. Click Install
  6. Restart n8n

Manual Installation

# In your n8n installation directory
cd ~/.n8n
npm install n8n-nodes-notion-rich-text-splitter

# Restart n8n
n8n start

Development Installation

# Clone the repository
git clone https://github.com/createsomethingtoday/n8n-nodes-notion-rich-text-splitter.git
cd n8n-nodes-notion-rich-text-splitter

# Install dependencies
npm install

# Build the node
npm run build

# Link for local development
npm link

# In your n8n directory
cd ~/.n8n
npm link n8n-nodes-notion-rich-text-splitter

# Restart n8n
n8n start

Prerequisites

  • n8n version 0.190.0 or higher
  • Notion API credentials configured in n8n
  • A Notion integration with appropriate permissions

Operations

1. Append Rich Text

Splits and appends rich text content to a Notion page.

Parameters:

  • Page ID (required): The Notion page ID to append to
  • Rich Text (required): Notion rich text array (JSON format)
  • Max Characters Per Block: Maximum chars per block (default: 1900)
  • Block Type: Type of block to create (paragraph, heading, quote, callout)
  • Batch Size: Number of blocks per API request (default: 100, max: 100)

Additional Options:

  • After Block ID: Insert blocks after a specific block
  • Delay Between Batches: Milliseconds to wait between requests (default: 300ms)

Example Input:

{
  "pageId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "richText": [
    {
      "type": "text",
      "text": {
        "content": "This is a very long text that exceeds 2000 characters..."
      },
      "annotations": {
        "bold": false,
        "italic": false,
        "strikethrough": false,
        "underline": false,
        "code": false,
        "color": "default"
      }
    }
  ]
}

Output:

{
  "success": true,
  "pageId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "totalBlocksCreated": 5,
  "batchesSent": 1,
  "results": [...]
}

2. Split Rich Text Only

Preview how text will be split without appending to Notion.

Parameters:

  • Rich Text (required): Notion rich text array (JSON format)
  • Max Characters Per Block: Maximum chars per block (default: 1900)
  • Block Type: Type of block to create

Output:

{
  "blocks": [...],
  "blockCount": 5,
  "preview": [
    {
      "length": 1895,
      "preview": "This is the first block content..."
    },
    {
      "length": 1823,
      "preview": "This is the second block content..."
    }
  ]
}

Use Cases

1. Translate and Append Long Text

Webhook → DeepL Translation → Format Rich Text → Notion Rich Text Splitter → Response

2. Import Large Documents

HTTP Request (Fetch Document) → Parse Content → Notion Rich Text Splitter → Notion

3. AI-Generated Content

OpenAI → Format Rich Text → Notion Rich Text Splitter → Notion

Rich Text Format

The node expects Notion's rich text array format:

[
  {
    "type": "text",
    "text": {
      "content": "Hello world",
      "link": null
    },
    "annotations": {
      "bold": false,
      "italic": false,
      "strikethrough": false,
      "underline": false,
      "code": false,
      "color": "default"
    },
    "plain_text": "Hello world",
    "href": null
  }
]

Supported Rich Text Types

  • text: Regular text with annotations
  • mention: User, page, or database mentions
  • equation: LaTeX equations

Supported Annotations

  • Bold, Italic, Strikethrough, Underline
  • Code formatting
  • Colors: default, gray, brown, orange, yellow, green, blue, purple, pink, red
  • Background colors

Block Types

The node supports these Notion block types:

  • paragraph: Regular text block
  • heading_1: Top-level heading
  • heading_2: Second-level heading
  • heading_3: Third-level heading
  • quote: Quote block
  • callout: Callout block (with icon)

Configuration Tips

Optimal Max Characters

  • Default (1900): Safe buffer below 2000 limit
  • Conservative (1800): Extra safety for complex formatting
  • Aggressive (1950): Minimize blocks, slight risk

Batch Size

  • Default (100): Maximum allowed by Notion API
  • Smaller (50): For rate-limited scenarios
  • Single (1): For sequential insertion with specific order

Rate Limiting

Notion API limits:

  • Rate limit: 3 requests per second
  • Recommended delay: 300-500ms between batches

Error Handling

The node handles these errors gracefully:

  • Invalid JSON: Returns error with message
  • API Rate Limits: Respects delays between batches
  • Authentication Errors: Returns Notion API error
  • Invalid Page ID: Returns Notion API error

Enable "Continue on Fail" in n8n to handle errors in workflows.

Troubleshooting

"Invalid rich text JSON format"

  • Ensure the rich text input is valid JSON
  • Check that it's an array of rich text objects

"Rate limit exceeded"

  • Increase the delay between batches
  • Reduce batch size

"Block not found"

  • Verify the page ID is correct
  • Check Notion integration permissions

Blocks appear in wrong order

  • Reduce batch size to 1
  • Use the "After Block ID" parameter

Development

# Install dependencies
npm install

# Build
npm run build

# Watch mode (development)
npm run dev

# Lint
npm run lint

# Format
npm run format

Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

License

MIT

Support

Changelog

1.0.0 (2025-10-03)

  • Initial release
  • Support for splitting and appending rich text
  • Support for multiple block types
  • Batch processing and rate limiting
  • Preview mode for testing

Related Resources

Credits

Created by Create Something ([email protected])

Inspired by the need to handle large text translations and AI-generated content in Notion workflows.