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 interfaceBaseEntity- Base entity interface for all CRM objectsApplication,Document,Tag,TagValue,DocumentType- Specific entity interfacesApiResponse<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
- Set up credentials in n8n
- Choose environment (production/staging/custom)
- Configure custom URLs if using custom environment
- Select resource and operation
- Configure operation-specific parameters
Contributing
- Follow the modular structure
- Add types to
types/Constants.ts - Add constants to
constants/Constants.ts - Implement business logic in appropriate modules
- Update UI helpers if needed
- Test thoroughly before submitting
License
MIT License