notion-overlimit-writer

Enhanced n8n node for unlimited Notion content with professional markdown-to-rich-text conversion, robust property management, comprehensive file support, full-featured page read/export capabilities, and fast content erasure with backup functionality

Package Information

Released: 11 mo ago
Downloads: 29 weeklyย /ย 207 monthly
Latest Version: 2.13.3
Author: Your Name

Documentation

n8n-nodes-notion-overlimit-writer

npm version
License: MIT

A powerful n8n community node that enables writing unlimited content to Notion properties with advanced multi-mapping capabilities, dynamic page selection, and intelligent allocation strategies.

๐Ÿš€ Enhanced Features (v2.0+)

Multi-Input/Output Mapping

  • Multiple Content Fields: Process multiple input fields in a single execution
  • Independent Settings: Each mapping can have its own chunk size and allocation strategy
  • Property Isolation: No conflicts between different content mappings
  • Parallel Processing: All mappings process simultaneously for maximum speed

Dynamic Page Selection

  • Manual Entry: Enter page ID or URL directly
  • Database Selection: Choose from databases, then select specific pages
  • Global Search: Search and select from all accessible pages
  • Smart Validation: Pre-execution validation of page access and properties

Advanced Content Processing

  • Unlimited Content: Write text of any size to Notion properties
  • Intelligent Chunking: Automatically splits content into optimal chunks (1900 chars by default)
  • Greedy Allocation: Fills one property completely before moving to the next (maximizes efficiency)
  • Balanced Allocation: Distributes content evenly across all available properties
  • Global + Override Settings: Set defaults globally, override per mapping as needed

Enhanced User Experience

  • Pre-Execution Validation: Validate all configurations before processing any content
  • Fail-Fast Error Handling: Stop on first error with detailed diagnostics
  • Rich Text Support: Maintains proper Notion rich text formatting
  • Comprehensive Logging: Detailed execution metrics and error reporting

๐Ÿ“ฆ Installation

Install via n8n Community Nodes

  1. Go to Settings โ†’ Community Nodes in your n8n instance
  2. Click Install a community node
  3. Enter: n8n-nodes-notion-overlimit-writer
  4. Click Install

Install via npm (for self-hosted n8n)

npm install n8n-nodes-notion-overlimit-writer

Then restart your n8n instance.

๐Ÿ”ง Configuration

Prerequisites

  1. Notion Integration: Create a Notion integration and get your API key

    • Go to Notion Developers
    • Create a new integration
    • Copy the "Internal Integration Token"
  2. Page Access: Share your target page with the integration

    • Open your Notion page
    • Click "Share" โ†’ "Invite" โ†’ Select your integration
  3. Property Setup: Ensure your page has the required text properties

    • Add properties like "Text", "Text 2", "Text 3" to your page/database

Node Parameters

Required Parameters

  • Page ID: The Notion page ID (32-character hex string)

    • Example: 29e81e6b477081aeab51f7a4a8a89642
    • Can be found in the page URL
  • Content Field: The input field containing your large text content

    • Default: content
    • Must contain string data
  • Output Properties: Comma-separated list of Notion property names

    • Example: Text, Text 2, Text 3
    • Properties must exist on the target page

Advanced Options

  • Chunk Size: Characters per chunk (100-2000)

    • Default: 1900 (recommended for safety margin)
    • Lower values = more chunks, higher values = fewer chunks
  • Allocation Strategy: How to distribute content

    • greedy (default): Fill Property 1 โ†’ Property 2 โ†’ Property 3
    • balanced: Distribute evenly across all properties
  • Parallel Requests: Update multiple properties simultaneously

    • Default: true (faster execution)
    • Set to false for sequential updates
  • Validate Properties: Check property existence before processing

    • Default: true (recommended)
    • Validates page access and property names
  • Max Retries: Maximum API request retries

    • Default: 3
    • Helps handle temporary API issues

๐Ÿ“‹ Usage Examples

Basic Usage

{
  "pageId": "29e81e6b477081aeab51f7a4a8a89642",
  "contentField": "transcript",
  "outputProperties": {
    "propertyNames": "Text, Text 2, Text 3"
  }
}

Input Data:

{
  "transcript": "Your very long content here... (252,000 characters)",
  "title": "Meeting Notes",
  "date": "2024-01-15"
}

Result: Content automatically split and written to Text, Text 2, and Text 3 properties.

Advanced Configuration

{
  "pageId": "29e81e6b477081aeab51f7a4a8a89642",
  "contentField": "articleContent",
  "outputProperties": {
    "propertyNames": "Article Text, Article Text 2, Article Text 3, Article Text 4"
  },
  "advancedOptions": {
    "chunkSize": 1800,
    "allocationStrategy": "balanced",
    "parallelRequests": true,
    "validateProperties": true,
    "maxRetries": 5
  }
}

๐Ÿ“Š Allocation Strategies

Greedy Allocation (Default)

Fills properties sequentially, maximizing content per property:

Content: 380,000 characters
โ”œโ”€โ”€ Text: 190,000 chars (100% full)
โ”œโ”€โ”€ Text 2: 190,000 chars (100% full)
โ””โ”€โ”€ Text 3: 0 chars (unused)

Best for: Most content types, minimizes property usage

Balanced Allocation

Distributes content evenly across all properties:

Content: 380,000 characters
โ”œโ”€โ”€ Text: 126,667 chars (~67% full)
โ”œโ”€โ”€ Text 2: 126,667 chars (~67% full)
โ””โ”€โ”€ Text 3: 126,666 chars (~67% full)

Best for: Visual balance, specific formatting requirements

๐Ÿ“ File Support & Limitations

โœ… Supported File Input Types

  • URLs: Public file URLs from any web service

    "https://example.com/document.pdf"
    "https://drive.google.com/uc?id=FILE_ID&export=download"
    
  • Notion File IDs: Files already uploaded to Notion

    "abc123def-456-789-ghi012jkl"
    

โŒ NOT Supported: Binary Data

Important: Notion's API does NOT accept binary data directly. This is a Notion API limitation, not a node limitation.

โŒ Binary data from "Convert to File" node
โŒ File buffers from HTTP Request node  
โŒ Direct file uploads from file system

๐Ÿ”„ Workarounds for Binary Files

If you have binary file data, use one of these approaches:

Option 1: Google Drive Upload

1. HTTP Request โ†’ Upload to Google Drive
2. Get public sharing URL
3. Use URL in this node

Option 2: AWS S3 Upload

1. AWS S3 โ†’ Upload file
2. Get public URL or signed URL
3. Use URL in this node

Option 3: External File Hosting

1. Upload to: Dropbox, OneDrive, CloudFlare R2, etc.
2. Get public URL
3. Use URL in this node

Option 4: Manual Notion Upload

1. Upload file directly in Notion interface
2. Get the file ID from the property
3. Use file ID in this node

File Handling Modes

  • Replace All Files: Overwrites all existing files in the property (default)
  • Append to Existing Files: Adds new files while keeping existing ones

๐ŸŽจ Enhanced Markdown Support (v2.2+)

Rich Text Processing

The node now supports comprehensive markdown-to-rich-text conversion using @tryfabric/martian:

Supported Markdown Features

  • Headers: # H1, ## H2, ### H3
  • Bold: **bold text**
  • Italic: *italic text*
  • Code: `inline code`
  • Strikethrough: ~~strikethrough~~
  • Links: [text](url)
  • Lists: Ordered and unordered lists
  • Code blocks: ` language
  • Blockquotes: > quote text

Usage Example

{
  "contentFormat": "rich",
  "inputField": "# My Document\n\nThis is **bold** and *italic* text with `code`."
}

Result in Notion

The text will appear in Notion with proper formatting:

  • Headers as actual headers
  • Bold text rendered bold
  • Italic text rendered italic
  • Code with proper code formatting

Fallback Behavior

If markdown parsing fails, the node gracefully falls back to plain text mode.

๐Ÿ—๏ธ Technical Details

Notion API Limits

  • Max Rich Text Blocks: 100 per property
  • Max Characters per Block: 2000
  • Max Characters per Property: ~190,000 (100 ร— 1900)
  • Safe Chunk Size: 1900 characters (safety margin)

Content Processing Pipeline

  1. Content Extraction: Get content from specified input field
  2. Sanitization: Remove invalid characters and control codes
  3. Chunking: Split into optimal-sized chunks
  4. Allocation: Assign chunks to properties using chosen strategy
  5. Rich Text Building: Convert chunks to Notion rich text blocks
  6. Validation: Verify all limits are respected
  7. API Updates: Send parallel/sequential PATCH requests
  8. Result Aggregation: Combine all update results

Error Handling

The node provides detailed error messages for common issues:

  • Invalid Page ID: Format validation and suggestions
  • Missing Properties: Lists available properties
  • Content Too Large: Calculates required properties
  • API Errors: Notion-specific error handling
  • Network Issues: Automatic retries with backoff

๐Ÿ”„ Migration from Workflow

If you're migrating from the manual workflow approach:

Old Workflow (5 nodes)

Trigger โ†’ Settings โ†’ Chunking โ†’ Allocation โ†’ HTTP Updates

New Node (1 node)

Trigger โ†’ Notion Overlimit Writer

Configuration Mapping

Workflow Setting Node Parameter
input_field Content Field
output_field Output Properties
page_id Page ID
Hardcoded chunks Chunk Size
Greedy logic Allocation Strategy

๐Ÿงช Testing

# Run tests
npm test

# Run tests with coverage
npm run test:coverage

# Run tests in watch mode
npm run test:watch

๐Ÿ› ๏ธ Development

# Clone repository
git clone https://github.com/yourusername/n8n-nodes-notion-overlimit-writer.git
cd n8n-nodes-notion-overlimit-writer

# Install dependencies
npm install

# Build the node
npm run build

# Run in development mode
npm run dev

# Lint code
npm run lint

# Format code
npm run format

๐Ÿ“ˆ Performance

  • Small Content (<10K chars): ~200ms execution time
  • Medium Content (50K chars): ~500ms execution time
  • Large Content (200K+ chars): ~1-2s execution time
  • Parallel Updates: 2-3x faster than sequential
  • Memory Usage: Minimal, processes content in chunks

๐Ÿค Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Make your changes and add tests
  4. Ensure tests pass: npm test
  5. Commit changes: git commit -m 'Add amazing feature'
  6. Push to branch: git push origin feature/amazing-feature
  7. Open a Pull Request

๐Ÿ“œ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ†˜ Support

๐ŸŽฏ Roadmap

  • Support for markdown formatting preservation
  • HTML to rich text conversion
  • Custom allocation rules
  • Batch processing for multiple pages
  • Database property support
  • Block content support (not just properties)

๐Ÿ™ Acknowledgments

  • n8n - The amazing workflow automation platform
  • Notion - For their comprehensive API
  • Original workflow concept from the n8n community

Made with โค๏ธ for the n8n community

Discussion