n8n-nodes-haravan
v0.2.1
Published
n8n community node for Haravan Web API with modern architecture and comprehensive coverage
Downloads
68
Maintainers
Readme
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 [email protected]🔧 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 lintTesting
# 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
