exan-crm-test

Exante CRM nodes for n8n

Package Information

Downloads: 21 weekly / 44 monthly
Latest Version: 0.1.8
Author: Exan

Documentation

Exante CRM n8n Node

Exante CRM nodes for n8n workflow automation platform.

Project Structure

The project has been refactored into a modular structure for better maintainability:

exante-crm-n8n-node/
├── types/                    # TypeScript interfaces and types
│   └── Constants.ts             # Main types export
├── constants/                # Configuration constants
│   └── Constants.ts             # API URLs, endpoints, status messages
├── auth/                     # Authentication management
│   └── ExanteCrmAuthManager.ts
├── api/                      # API client implementation
│   └── ExanteCrmApiClient.ts
├── ui/                       # UI helper functions
│   └── helpers.ts           # Property creation helpers
├── nodes/                    # n8n node implementations
│   └── ExanteCrm/
│       └── ExanteCrm.node.ts
├── credentials/              # n8n credentials
│   └── ExanteCrmOAuth2Api.credentials.ts
└── dist/                     # Compiled output

Architecture

1. Types (types/Constants.ts)

  • ExanteCrmCredentials - Authentication credentials interface
  • BaseEntity - Base entity interface for all CRM objects
  • Application, Document, Tag, TagValue, DocumentType - Specific entity interfaces
  • ApiResponse<T>, ApiErrorResponse - API response interfaces

2. Constants (constants/Constants.ts)

  • Environment-specific API URLs (production, staging, custom)
  • Authentication endpoints
  • API endpoint paths
  • HTTP status code messages
  • Default configuration values

3. Authentication Manager (auth/ExanteCrmAuthManager.ts)

  • Handles OAuth2 token management
  • Supports token refresh and password grant
  • Environment-aware authentication URL selection
  • Token validation and expiration handling

4. API Client (api/ExanteCrmApiClient.ts)

  • Centralized API communication
  • Automatic token management and caching
  • Error handling and formatting
  • Safe data extraction and mapping
  • All CRUD operations for CRM entities

5. UI Helpers (ui/helpers.ts)

  • Reusable functions for creating n8n node properties
  • Consistent UI structure across operations
  • Pagination and filtering property generators

6. Main Node (nodes/ExanteCrm/ExanteCrm.node.ts)

  • n8n node implementation
  • Operation routing and execution
  • Smart parallel processing with adaptive batching
  • Error handling and logging

Features

  • Multi-environment support: Production, staging, and custom environments
  • OAuth2 authentication: Secure token management with automatic refresh
  • Smart batching: Adaptive parallel processing for large datasets
  • Comprehensive error handling: Detailed error messages and logging
  • Type safety: Full TypeScript support with strict typing
  • Modular design: Easy to maintain and extend

Installation

npm install
npm run build

Development

npm run dev          # Watch mode compilation
npm run lint         # Code linting
npm run format       # Code formatting
npm run build        # Production build

Usage

The node provides operations for:

  • Applications: Get all applications with filtering and pagination
  • Documents: Retrieve documents with optional application filtering
  • Tags: Manage tag metadata
  • Tag Values: Create and retrieve tag values for objects
  • Document Types: Get document type information

Configuration

  1. Set up credentials in n8n
  2. Choose environment (production/staging/custom)
  3. Configure custom URLs if using custom environment
  4. Select resource and operation
  5. Configure operation-specific parameters

Contributing

  1. Follow the modular structure
  2. Add types to types/Constants.ts
  3. Add constants to constants/Constants.ts
  4. Implement business logic in appropriate modules
  5. Update UI helpers if needed
  6. Test thoroughly before submitting

License

MIT License

Discussion