Package Information
Available Nodes
Documentation
n8n Community Node: Haravan (Modern Architecture v2.0.0)
A modern, feature-rich n8n community node for Haravan Web API with comprehensive coverage and advanced architecture.
β¨ Version 2.0.0 - Complete Modern Architecture Overhaul
This release represents a complete transformation from a monolithic structure to a modern, maintainable, and extensible architecture with TypeScript support, comprehensive error handling, and advanced development tools.
π Features
Core Functionality
- Blogs: list, count, get, create, update, delete
- Articles: list, count, get, create, update, delete, tags, authors
- Comments: list, count, get, create, update, spam, not_spam, approve, remove, restore
- Pages: list, count, get, create, update, delete
- Redirects: list, count, get, create, update, delete
- Themes/Assets: assetsList, assetsGet, assetsPut, assetsDelete
Modern Architecture
- β TypeScript: Full type safety with comprehensive interfaces
- β Modular Design: Clean separation of concerns with dedicated modules
- β Error Handling: Comprehensive validation and user-friendly error messages
- β Testing: Jest framework with unit tests and mocking
- β Development Tools: ESLint, Prettier, modern build pipeline
- β MCP Support: Model Context Protocol integration for enhanced development
Advanced Features
- π Advanced Filtering: Sophisticated query parameters and filters
- π Bulk Operations: Support for batch processing
- π Search Capabilities: Built-in search functionality
- π‘οΈ Rate Limiting: Intelligent rate limit handling
- π Data Transformation: Built-in data mapping and transformation
- π§ Custom Fields: Support for Haravan custom fields
π¦ Installation
# Install the latest version
npm install n8n-nodes-haravan
# Or install a specific version
npm install n8n-nodes-haravan@0.2.0
π§ Setup
1. Add Credentials
In n8n, create a new credential for "Haravan API":
- Base URL:
https://apis.haravan.com(default) - Access Token: Your Haravan API Bearer token
2. Configure Node
- Add the "Haravan" node to your workflow
- Select the desired resource (Blogs, Articles, Comments, Pages, Redirects, or Themes)
- Choose the operation (list, create, update, delete, etc.)
- Configure the required parameters
- Run your workflow
π Usage Examples
Example 1: List Articles with Advanced Filtering
Resource: Articles
Operation: List
Blog ID: 241253187
Filters:
- Published Status: Published
- Limit: 50
- Created At Min: 2024-01-01
- Tags: "featured,popular"
Example 2: Create Article with Image
Resource: Articles
Operation: Create
Blog ID: 241253187
Title: "My New Article"
Author: "John Smith"
Tags: "announcement,product"
Body HTML: "<h1>Exciting News!</h1><p>We have launched something amazing...</p>"
Published At: "2024-01-15T10:00:00.000Z"
Image Mode: URL
Image URL: "https://example.com/hero-image.jpg"
Example 3: Moderate Comments
Resource: Comments
Operation: Approve
Comment ID: 123456789
ποΈ Architecture
The modern v2.0.0 architecture includes:
n8n-nodes-haravan/
βββ types/ # TypeScript type definitions
β βββ common.ts # Shared interfaces
β βββ blogs.ts # Blog-related types
β βββ articles.ts # Article-related types
β βββ comments.ts # Comment-related types
β βββ pages.ts # Page-related types
β βββ redirects.ts # Redirect-related types
β βββ themes.ts # Theme-related types
β βββ operations.ts # Operation configuration types
βββ utils/ # Reusable utilities
β βββ api/ # API client and endpoints
β βββ operations/ # Modular operation handlers
βββ tests/ # Test suite
βββ credentials/ # Credential definitions
βββ nodes/ # Main node implementation
π οΈ Development
Prerequisites
- Node.js >= 18.0.0
- npm >= 8.0.0
Setup Development Environment
# Clone the repository
git clone https://github.com/n8n-io/n8n-nodes-haravan.git
cd n8n-nodes-haravan
# Install dependencies
npm install
# Development mode (watch for changes)
npm run dev
# Run tests
npm test
# Build for production
npm run build
# Format code
npm run format
# Lint code
npm run lint
Testing
# Run all tests
npm test
# Watch mode
npm run test:watch
# Coverage report
npm run test:coverage
π§ MCP Integration
This node includes Model Context Protocol (MCP) support for enhanced development capabilities:
Available MCP Servers
- File System Operations: Advanced file manipulation
- Sequential Thinking: Structured problem-solving
- Database Operations: PostgreSQL integration
- Browser Automation: Puppeteer-based testing
Setup MCP
See MCP_SETUP.md for detailed configuration instructions.
π API Reference
Blogs API
GET /web/blogs.json- List blogsGET /web/blogs/count.json- Count blogsGET /web/blogs/{id}.json- Get blogPOST /web/blogs.json- Create blogPUT /web/blogs/{id}.json- Update blogDELETE /web/blogs/{id}.json- Delete blog
Articles API
GET /web/blogs/{blog_id}/articles.json- List articlesGET /web/blogs/{blog_id}/articles/count.json- Count articlesGET /web/blogs/{blog_id}/articles/{article_id}.json- Get articlePOST /web/blogs/{blog_id}/articles.json- Create articlePUT /web/blogs/{blog_id}/articles/{article_id}.json- Update articleDELETE /web/blogs/{blog_id}/articles/{article_id}.json- Delete articleGET /web/articles/tags.json- Get all tagsGET /web/articles/authors.json- Get all authors
Comments API
GET /web/comments.json- List commentsGET /web/comments/count.json- Count commentsGET /web/comments/{comment_id}.json- Get commentPOST /web/comments.json- Create commentPUT /web/comments/{comment_id}.json- Update commentPOST /web/comments/{comment_id}/spam.json- Mark as spamPOST /web/comments/{comment_id}/not_spam.json- Mark as not spamPOST /web/comments/{comment_id}/approve.json- Approve commentPOST /web/comments/{comment_id}/remove.json- Remove commentPOST /web/comments/{comment_id}/restore.json- Restore comment
Pages API
GET /web/pages.json- List pagesGET /web/pages/count.json- Count pagesGET /web/pages/{page_id}.json- Get pagePOST /web/pages.json- Create pagePUT /web/pages/{page_id}.json- Update pageDELETE /web/pages/{page_id}.json- Delete page
Redirects API
GET /web/redirects.json- List redirectsGET /web/redirects/count.json- Count redirectsGET /web/redirects/{redirect_id}.json- Get redirectPOST /web/redirects.json- Create redirectPUT /web/redirects/{redirect_id}.json- Update redirectDELETE /web/redirects/{redirect_id}.json- Delete redirect
Themes/Assets API
GET /web/themes/{theme_id}/assets.json- List assetsGET /web/themes/{theme_id}/assets.json?asset[key]=...- Get assetPUT /web/themes/{theme_id}/assets.json- Create/update assetDELETE /web/themes/{theme_id}/assets.json?asset[key]=...- Delete asset
π Security
- All API requests use Bearer token authentication
- Tokens are stored securely in n8n credentials
- Input validation on all parameters
- Proper error handling prevents information leakage
π Troubleshooting
Common Issues
Authentication Errors
- Verify your access token is valid
- Check if the token has the required scopes
Rate Limiting
- The node includes intelligent rate limit handling
- Implement delays between bulk operations
Invalid Parameters
- Check API documentation for required fields
- Ensure proper date formatting (ISO 8601)
Debug Mode
Enable debug mode in n8n settings to see detailed API request/response logs.
π License
MIT License - see the LICENSE file for details.
π€ Contributing
Contributions are welcome! Please read our contributing guidelines and submit pull requests to the main repository.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
π Support
- Documentation: Full API Documentation
- Changelog: Version History
- Issues: GitHub Issues
- Discussions: GitHub Discussions
πΊοΈ Roadmap
- Webhook support for real-time data sync
- Bulk operations with batch processing
- Advanced search functionality
- Data transformation pipelines
- Custom field management
- Multi-store support
Built with β€οΈ for the n8n community