JSPM

n8n-nodes-nextcloud-tables-en

2.5.3
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 7
  • Score
    100M100P100Q37370F
  • License MIT

Production-ready n8n node for Nextcloud Tables โ€“ full API coverage with advanced filters, multi-column sorting, CSV import, and professional data validation

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (n8n-nodes-nextcloud-tables-en) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    n8n-nodes-nextcloud-tables

    A community n8n node for integration with Nextcloud Tables. This node enables full table management, advanced data operations, and is specifically optimized for AI agents.

    This repo is the english translation of the original one https://github.com/terschawebIT/n8n-nodes-nextcloud-tables

    ๐Ÿš€ Production Status: v2.5.2 โœ…

    This node is production-ready for the tested core features and hardened against critical NaN bugs!

    โœ… Version 2.5.0 - Production-Ready:

    • โœ… English translation - All node is now accessible in english

    โœ… Version 2.4.8 - Production-Ready:

    • โœ… Robust Resource Locator Validation - No more NaN errors
    • โœ… AI-Agent Compatibility - Special AI-friendly operations
    • โœ… Comprehensive Error Handling - Detailed HTTP status codes
    • โœ… Optimized API Performance - Query parameters for column operations
    • โœ… Improved Log Labeling - Unique node identification for better grepping
    • โœ… Structured Logging - Debug, Info, Warn, Error levels with context

    โœ… Version 2.4.7 - Production-Ready:

    • ๐Ÿ›ก๏ธ NaN Bug Fixes: Robust validation against all NaN sources (null, undefined, 'NaN' strings)
    • ๐Ÿงน Production Cleanup: Removed all debug tools, clean codebase
    • โšก Enhanced Error Handling: Helpful error messages for Resource Locator issues
    • ๐Ÿ”ง Optimized Builds: TypeScript compilation without warnings
    • ๐Ÿ“ฆ Clean Dependencies: Removed outdated scripts and legacy code

    โœ… Tested & Production-Ready:

    • Table Management: Basic CRUD operations (getAll, get) โœ…
    • Column Management: All operations including AI-friendly extensions โœ…
    • Row Management: Basic CRUD (create, getAll, get) โœ…
    • Views Management: Basic operations (getAll, create) โœ…
    • Shares Management: User/Group sharing โœ…
    • NaN Bug Protection: Robust Resource Locator validation โœ…

    โš ๏ธ Implemented but Untested:

    • Advanced Table Ops: update, delete
    • Advanced Row Ops: update (delete not supported by API)
    • Advanced Views Ops: get, update, delete, getRows
    • Advanced Shares Ops: update, delete
    • CSV Import: Complete import pipeline
    • Context Integration: App-context features
    • Advanced Filter/Sort: Complex multi-column operations

    ๐Ÿ›ก๏ธ Critical Bug Fixes in v2.4.7

    Problem Solved: NaN Table IDs

    Nextcloud logs showed critical errors like: [error] Did expect one result but found none for table id = NaN [error] no read access to table id = 0

    Root Cause: Resource Locator Handling

    // BEFORE: Insufficient validation led to NaN IDs
    if (!tableId || isNaN(tableId)) { ... }
    
    // AFTER: Robust validation against ALL NaN sources
    if (resourceLocator === null || resourceLocator === undefined || 
        resourceLocator === 'null' || resourceLocator === 'undefined' ||
        resourceLocator === 'NaN' || 
        (typeof resourceLocator === 'number' && isNaN(resourceLocator))) {
        throw new Error('Resource Locator is required but not set or invalid');
    }
    Hardened Validation in Load Options
    
        โœ… Table ID Extraction: Robust handling of __rl resource locators
    
        โœ… Column/View Loading: Validation prevents /tables/NaN/columns requests
    
        โœ… Error Messages: Helpful debugging information
    
        โœ… String-to-Number Conversion: Safe parseInt() with validation
    
    ๐Ÿค– AI-Agent Optimized โญ
    
    Unique: This is the first n8n community node specifically optimized for AI agents!
    Problem Solved:
    
    Standard n8n nodes use displayOptions to dynamically hide parameters. AI agents can't see these.
    Solution: AI-Friendly Operations
    
        โœ… All parameters visible at once
    
        โœ… No UI dependencies for AI agents
    
        โœ… String-based IDs instead of dropdown navigation
    
        โœ… Flat parameter structure without nesting
    
        โœ… Robust NaN protection in v2.4.7
    
    Available AI-Friendly Operations:
    Column Management (AI-Optimized)
    
    // Optimized for AI agents - ALL parameters visible
    Operation: "Create Column (AI-Friendly)"
    {
      "tableIdAI": "123",
      "columnType": "selection", 
      "columnTitle": "Status",
      "columnMandatory": true,
    
      // All type-specific parameters available at once:
      "selectionOptionsAI": "[\"Open\", \"In Progress\", \"Done\"]",
      "selectionDefaultAI": "Open",
      "selectionMultipleAI": false,
    
      // Text parameters (ignored for other types):
      "textSubtypeAI": "line",
      "textMaxLengthAI": 255
      // ... all other parameters available
    }
    
    // Full updates possible
    Operation: "Update Column (AI-Friendly)"
    {
      "columnIdAI": "456",
      "columnType": "text",           // Change type
      "columnTitle": "New Name",      // Change title
      "textSubtypeAI": "long",        // Text-specific
      "textMaxLengthAI": 500          // Change max length
      // Only relevant parameters are used
    }
    
    Benefits for AI Agents:
    
        ๐Ÿ” Parameter transparency: 24 parameters visible at once
    
        ๐ŸŽฏ Autonomous operations: No UI interaction required
    
        ๐Ÿš€ String-based inputs: No dropdowns, maximum flexibility
    
        ๐Ÿ›ก๏ธ NaN protection: Robust validation prevents API errors (v2.4.7)
    
        โ†ฉ๏ธ Backward compatible: Human UI remains unchanged
    
    ๐Ÿ“Š Feature Overview & Test Status
    ๐Ÿ—๏ธ Table Operations
    
        โœ… Get all tables: Tested, production-ready
    
        โœ… Get table: Tested, production-ready
    
        โš ๏ธ Create table: Implemented, untested
    
        โš ๏ธ Update table: Implemented, untested
    
        โš ๏ธ Delete table: Implemented, untested
    
    ๐Ÿ“‹ Column Management โœ… FULLY TESTED & AI-OPTIMIZED
    
    Standard operations:
    
        โœ… Get all columns: Tested, production-ready
    
        โœ… Get column: Tested, production-ready
    
        โœ… Create column: Tested, production-ready
    
        โš ๏ธ Update column: Implemented, untested
    
        โš ๏ธ Delete column: Implemented, untested
    
    ๐Ÿค– AI-Friendly Operations:
    
        โœ… Create Column (AI-Friendly): Tested, production-ready - 23 parameters visible
    
        โš ๏ธ Update Column (AI-Friendly): Implemented, untested - 24 parameters for full updates
    
    5 fully supported column types:
    
        โœ… Text: Tested - pattern validation, max length, subtypes (single/multiline)
    
        โœ… Number: Tested - min/max, decimals, prefix/suffix, validation
    
        โœ… DateTime: Tested - default date, flexible input formats
    
        โœ… Selection: Tested - dropdown options, default values, multi-select
    
        โœ… UserGroup: Tested - user/group selection, multi-select, teams
    
    ๐ŸŽฏ Row Operations
    
        โœ… Get all rows: Tested, production-ready
    
        โœ… Get row: Tested, production-ready (client-side filtering)
    
        โœ… Create row: Tested, production-ready
    
        โš ๏ธ Update row: Implemented, untested
    
        โŒ Delete row: Not supported by Nextcloud Tables API
    
    Advanced row features (untested):
    
        โš ๏ธ Smart pagination: Optimized for 1-1000 rows
    
        โš ๏ธ 11 filter operators: =, !=, >, >=, <, <=, LIKE, starts_with, ends_with, is_empty, is_not_empty
    
        โš ๏ธ Multi-column sorting: Priority-based sorting
    
        โš ๏ธ Full-text search: Case-sensitive/insensitive, column-specific
    
        โœ… Automatic validation: Column-based data formatting
    
    ๐Ÿ“‹ Views Management
    
        โœ… Get views: Tested, production-ready
    
        โœ… Create view: Tested, production-ready
    
        โš ๏ธ Get view (single): Implemented, untested
    
        โš ๏ธ Update view: Implemented, untested
    
        โš ๏ธ Delete view: Implemented, untested
    
        โš ๏ธ Get rows from view: Implemented, untested
    
    ๐Ÿค Collaboration Features
    
        โœ… Get shares: Tested, production-ready
    
        โœ… Create share: Tested, production-ready (users & groups)
    
        โš ๏ธ Update share: Implemented, untested
    
        โš ๏ธ Delete share: Implemented, untested
    
        โœ… Get users/groups: Tested, production-ready
    
    ๐Ÿ“ฅ CSV Import โš ๏ธ UNTESTED
    
        โš ๏ธ Flexible options: Header detection, delimiter selection
    
        โš ๏ธ Column mapping: Automatic or manual mapping
    
        โš ๏ธ Data type conversion: Auto, text, number, datetime, boolean
    
        โš ๏ธ Import status: Monitoring and error handling
    
    ๐ŸŒ App-Context Integration โš ๏ธ UNTESTED
    
        โš ๏ธ Context navigation: Seamless Nextcloud app integration
    
        โš ๏ธ Context tables: Filtered views by app context
    
        โš ๏ธ Context pages: App page management
    
    ## Installation
    
    ```bash
    npm install n8n-nodes-nextcloud-tables
    
    Restart n8n to load the new node.
    Configuration
    Credentials
    
    Create new credentials of type Nextcloud Tables API:
    
        Nextcloud URL: Full URL (e.g. https://cloud.example.com)
    
        Username: Your Nextcloud username
    
        Password: App password (recommended) or normal password
    
    ๐Ÿ”’ Security Tip: Use App Passwords:
    
        Nextcloud โ†’ Settings โ†’ Security โ†’ App Passwords
    
        Create a new app password for n8n
    
    ๐Ÿค– AI-Agent Usage Examples
    Create Column (AI-Friendly)
    
    {
      "resource": "Column",
      "operation": "Create Column (AI-Friendly)",
      "tableIdAI": "123",
      "columnType": "selection",
      "columnTitle": "Project Status", 
      "columnDescription": "Current status of the project",
      "columnMandatory": true,
      "selectionOptionsAI": "[\"Planned\", \"In Progress\", \"Testing\", \"Done\", \"Archived\"]",
      "selectionDefaultAI": "Planned",
      "selectionMultipleAI": false
    }
    
    Update Column (AI-Friendly)
    
    {
      "resource": "Column", 
      "operation": "Update Column (AI-Friendly)",
      "columnIdAI": "456",
      "columnTitle": "Advanced Project Status",
      "selectionOptionsAI": "[\"Backlog\", \"Sprint\", \"Review\", \"Done\", \"Cancelled\"]",
      "selectionDefaultAI": "Backlog"
    }
    
    Various Column Types for AI Agents
    
    // Create Text Column
    {
      "columnType": "text",
      "columnTitle": "Description",
      "textSubtypeAI": "long",
      "textMaxLengthAI": 1000,
      "textPatternAI": "^[A-Za-z0-9\\s]+$"
    }
    
    // Create Number Column  
    {
      "columnType": "number",
      "columnTitle": "Budget",
      "numberMinAI": 0,
      "numberMaxAI": 100000,
      "numberDecimalsAI": 2,
      "numberPrefixAI": "โ‚ฌ"
    }
    
    // Create User/Group Column
    {
      "columnType": "usergroup", 
      "columnTitle": "Responsible",
      "usergroupTypeAI": "user",
      "usergroupMultipleAI": false
    }
    
    Human vs. AI-Agent Comparison
    
    // HUMAN (UI-optimized) - Parameters appear dynamically
    Operation: "Create Column"
    Table: [Dropdown Selection]
    Type: "Selection" 
    // โ†’ Then type-specific parameters appear
    
    // AI-AGENT (AI-optimized) - All parameters visible
    Operation: "Create Column (AI-Friendly)"  
    // โ†’ ALL 23 parameters immediately visible and usable
    // โ†’ String-based inputs instead of dropdowns
    // โ†’ Maximum flexibility for autonomous execution
    
    ๐Ÿ”ง Advanced Usage
    Advanced Row Query with Filters
    
    {
      "resource": "Row",
      "operation": "Get All Rows",
      "source": "table",
      "tableId": "123",
      "useFiltering": true,
      "filters": [
        {
          "columnId": "5",
          "operator": "EQ", 
          "value": "Active"
        },
        {
          "columnId": "8",
          "operator": "GT",
          "value": "2024-01-01"
        }
      ],
      "useSorting": true,
      "sorting": [
        {
          "columnId": "10",
          "direction": "DESC"
        }
      ]
    }
    
    CSV Import with Column Mapping
    
    {
      "resource": "Import",
      "operation": "Import CSV to Table",
      "tableId": "123",
      "csvData": "[Binary CSV Data]",
      "hasHeader": true,
      "delimiter": ";",
      "columnMapping": [
        {
          "csvColumn": "Customer Name",
          "tableColumn": "1",
          "dataType": "text"
        },
        {
          "csvColumn": "Created Date", 
          "tableColumn": "2",
          "dataType": "datetime"
        }
      ]
    }
    
    ๐Ÿ“Š Full API Coverage
    โœ… Implemented Endpoints
    
        Tables: /tables/* (full CRUD)
    
        Rows: /tables/{id}/rows, /views/{id}/rows (full CRUD except DELETE*)
    
        Views: /tables/{id}/views, /views/{id} (full CRUD)
    
        Columns: /tables/{id}/columns, /columns/{id} (full CRUD + AI-friendly)
    
        Shares: /tables/{id}/shares, /shares/{id} (full CRUD)
    
        Import: /tables/{id}/import (POST + status monitoring)
    
        Context: /contexts/* (GET operations)
    
    *Note: Row DELETE is not supported by the Nextcloud Tables API
    ๐Ÿ”ง Compatibility
    
        Nextcloud: 28+ (tested)
    
        Tables App: 0.6+ (tested)
    
        n8n: 1.0+ (tested)
    
    ๐Ÿ› ๏ธ Technical Details
    
        API Version: Hybrid v1/v2 (optimized per operation)
    
        Authentication: Basic Auth with app-password support
    
        Error Handling: 10 HTTP status codes with specific messages
    
        Retry Logic: 3 attempts with exponential backoff
    
        Validation: Column-based real-time validation
    
    Development & Testing
    Setup
    
    npm install          # Install dependencies
    npm run build        # Compile TypeScript  
    npm run dev          # Development mode
    npm run lint         # Lint code
    npm run format       # Format code
    
    Project Structure
    
    nodes/NextcloudTables/
    โ”œโ”€โ”€ NextcloudTables.node.ts           # Main node
    โ”œโ”€โ”€ descriptions/                     # UI definitions
    โ”‚   โ”œโ”€โ”€ column.ts     โ† AI-OPTIMIZED
    โ”‚   โ”œโ”€โ”€ table.ts      โ”œโ”€โ”€ row.ts
    โ”‚   โ”œโ”€โ”€ view.ts       โ”œโ”€โ”€ share.ts  
    โ”‚   โ”œโ”€โ”€ import.ts     โ””โ”€โ”€ context.ts
    โ”œโ”€โ”€ handlers/                         # Business logic
    โ”‚   โ”œโ”€โ”€ column.handler.ts โ† AI-FRIENDLY LOGIC
    โ”‚   โ””โ”€โ”€ *.handler.ts
    โ”œโ”€โ”€ helpers/                          # Core utilities
    โ”‚   โ”œโ”€โ”€ api.helper.ts                 # HTTP + error handling
    โ”‚   โ”œโ”€โ”€ data.formatter.ts             # Validation
    โ”‚   โ””โ”€โ”€ node.methods.ts               # Dynamic dropdowns
    โ””โ”€โ”€ interfaces/                       # TypeScript types
    
    ๐Ÿ› ๏ธ Troubleshooting
    Logging & Debugging
    
    ๐Ÿ” Improved Log Labeling (New in v2.4.8)
    All node logs are now clearly labeled for better grepping:
    
    # All Nextcloud Tables node logs
    grep "N8N-NEXTCLOUD-TABLES" /path/to/n8n/logs
    
    # Only API errors
    grep "N8N-NEXTCLOUD-TABLES.*API-ERROR" /path/to/n8n/logs
    
    # Only validation errors
    grep "N8N-NEXTCLOUD-TABLES.*VALIDATION-ERROR" /path/to/n8n/logs
    
    # Operation-specific logs
    grep "N8N-NEXTCLOUD-TABLES.*OPERATION-" /path/to/n8n/logs
    
    # Resource Locator debugging
    grep "N8N-NEXTCLOUD-TABLES.*RESOURCE-VALIDATION" /path/to/n8n/logs
    
    Log Categories:
    
        [N8N-NEXTCLOUD-TABLES] [DEBUG] [API-REQUEST] - API requests
    
        [N8N-NEXTCLOUD-TABLES] [DEBUG] [API-RESPONSE] - API responses
    
        [N8N-NEXTCLOUD-TABLES] [INFO] [OPERATION-START] - Operation started
    
        [N8N-NEXTCLOUD-TABLES] [INFO] [OPERATION-SUCCESS] - Operation successful
    
        [N8N-NEXTCLOUD-TABLES] [ERROR] [OPERATION-ERROR] - Operation failed
    
        [N8N-NEXTCLOUD-TABLES] [WARN] [VALIDATION-ERROR] - Validation error
    
        [N8N-NEXTCLOUD-TABLES] [DEBUG] [RESOURCE-VALIDATION] - Resource locator debugging
    
    Example Logs:
    
    2024-01-15T10:30:45.123Z [N8N-NEXTCLOUD-TABLES] [INFO] [OPERATION-START] table.getAll
    2024-01-15T10:30:45.124Z [N8N-NEXTCLOUD-TABLES] [DEBUG] [API-REQUEST] GET /tables
    2024-01-15T10:30:45.234Z [N8N-NEXTCLOUD-TABLES] [DEBUG] [API-RESPONSE] GET /tables -> 200 (110ms)
    2024-01-15T10:30:45.235Z [N8N-NEXTCLOUD-TABLES] [INFO] [OPERATION-SUCCESS] table.getAll completed (112ms)
    
    ### Common Issues
    
    **401 Unauthorized**  
    โœ… **Solution**: Use an app password, check permissions.
    
    **AI Agent can't see parameters**  
    โœ… **Solution**: Use AI-Friendly operations (`createAIFriendly`, `updateAIFriendly`).
    
    **๐Ÿšจ NaN Table ID Errors (FIXED in v2.4.7)**  
    โŒ **Symptom**: Nextcloud logs show `table id = NaN` or `table id = 0`.  
    โœ… **Solution**: Update to v2.4.7 โ€“ robust Resource Locator validation implemented.
    
    **Filters not working**  
    โœ… **Solution**: Use column IDs instead of names, ensure correct operators.
    
    **Column creation failed**  
    โœ… **Fixed**: Uses optimized API v1 with query parameters.
    
    **Resource Locator Validation Errors**  
    โœ… **New in v2.4.7**: Detailed error messages to help with debugging:
    
    "Resource Locator is required but not set or invalid"
    "Invalid ID in Resource Locator: 'undefined' is not a valid number"
    
    
    ### Error Handling
    Detailed error messages for all HTTP status codes:
    - **400โ€“404**: Client errors with suggested fixes
    - **429**: Rate-limiting with automatic retry
    - **5xx**: Server errors with retry logic
    - **Resource Locator**: Specific validation and helpful debugging (v2.4.7)
    
    ## ๐ŸŽฏ **Roadmap**
    
    ### โœ… **Version 2.4.8 (Current)**
    - โœ… **Improved Log Labeling** โ€“ clear `[N8N-NEXTCLOUD-TABLES]` prefixes
    - โœ… **Structured Logging** โ€“ Debug, Info, Warn, Error levels with context
    - โœ… **API Request/Response Logging** โ€“ detailed debugging information
    - โœ… **Operation Tracking** โ€“ start, success, error logging with timestamps
    - โœ… **Validation Logging** โ€“ resource locator and parameter validation
    - โœ… **Grep-friendly logs** โ€“ easy filtering by category
    
    ### โœ… **Version 2.4.7**
    - ๐Ÿ›ก๏ธ **Critical NaN Bug Fixes**: Robust resource locator validation
    - ๐Ÿงน **Production Cleanup**: Removed all debug tools and legacy code
    - โšก **Enhanced Error Handling**: Helpful messages and validation
    - ๐Ÿ“ฆ **Optimized Builds**: Clean TypeScript compilation without warnings
    
    ### โœ… **Version 2.4.6 (Previous)**
    - Full AI-Agent optimization
    - 24 AI parameters with systematic separation
    - Robust validation and error handling
    - Clean UX for all operations
    
    ### ๐Ÿ”ฎ **Future Versions**
    - More AI-Friendly operations for other resources
    - Extended AI features (bulk operations, schema inference)
    - Performance optimizations for large datasets
    - Extended context integration with more Nextcloud apps
    
    ## Contributing
    
    **Contributions welcome!** Especially:
    - ๐Ÿค– **AI-Agent Testing**: Help test the AI-friendly operations
    - ๐Ÿ› **Bug Reports**: Use GitHub Issues
    - ๐Ÿ’ป **Code**: Improvements and new features
    - ๐Ÿ“ **Documentation**: Examples and best practices
    
    ## License
    
    MIT
    
    ## Support
    
    - **GitHub**: [Issues & Discussions](https://github.com/terschawebIT/n8n-nodes-nextcloud-tables)
    - **n8n Community**: [Community Forum](https://community.n8n.io/)
    - **Documentation**: [Nextcloud Tables API](https://github.com/nextcloud/tables/blob/main/docs/API.md)
    
    ---
    
    **๐Ÿค– This node is the first AI-Agent-optimized n8n community node!**  
    **Try the AI-friendly operations and experience fully autonomous table mana