haravan

n8n community node for Haravan Web API with modern architecture and comprehensive coverage

Package Information

Released: 10/16/2025
Downloads: 16 weeklyΒ /Β 38 monthly
Latest Version: 0.2.1
Author: n8n Community

Documentation

n8n Community Node: Haravan (Modern Architecture v2.0.0)

npm version
License: MIT
Node version

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

  1. Add the "Haravan" node to your workflow
  2. Select the desired resource (Blogs, Articles, Comments, Pages, Redirects, or Themes)
  3. Choose the operation (list, create, update, delete, etc.)
  4. Configure the required parameters
  5. 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 blogs
  • GET /web/blogs/count.json - Count blogs
  • GET /web/blogs/{id}.json - Get blog
  • POST /web/blogs.json - Create blog
  • PUT /web/blogs/{id}.json - Update blog
  • DELETE /web/blogs/{id}.json - Delete blog

Articles API

  • GET /web/blogs/{blog_id}/articles.json - List articles
  • GET /web/blogs/{blog_id}/articles/count.json - Count articles
  • GET /web/blogs/{blog_id}/articles/{article_id}.json - Get article
  • POST /web/blogs/{blog_id}/articles.json - Create article
  • PUT /web/blogs/{blog_id}/articles/{article_id}.json - Update article
  • DELETE /web/blogs/{blog_id}/articles/{article_id}.json - Delete article
  • GET /web/articles/tags.json - Get all tags
  • GET /web/articles/authors.json - Get all authors

Comments API

  • GET /web/comments.json - List comments
  • GET /web/comments/count.json - Count comments
  • GET /web/comments/{comment_id}.json - Get comment
  • POST /web/comments.json - Create comment
  • PUT /web/comments/{comment_id}.json - Update comment
  • POST /web/comments/{comment_id}/spam.json - Mark as spam
  • POST /web/comments/{comment_id}/not_spam.json - Mark as not spam
  • POST /web/comments/{comment_id}/approve.json - Approve comment
  • POST /web/comments/{comment_id}/remove.json - Remove comment
  • POST /web/comments/{comment_id}/restore.json - Restore comment

Pages API

  • GET /web/pages.json - List pages
  • GET /web/pages/count.json - Count pages
  • GET /web/pages/{page_id}.json - Get page
  • POST /web/pages.json - Create page
  • PUT /web/pages/{page_id}.json - Update page
  • DELETE /web/pages/{page_id}.json - Delete page

Redirects API

  • GET /web/redirects.json - List redirects
  • GET /web/redirects/count.json - Count redirects
  • GET /web/redirects/{redirect_id}.json - Get redirect
  • POST /web/redirects.json - Create redirect
  • PUT /web/redirects/{redirect_id}.json - Update redirect
  • DELETE /web/redirects/{redirect_id}.json - Delete redirect

Themes/Assets API

  • GET /web/themes/{theme_id}/assets.json - List assets
  • GET /web/themes/{theme_id}/assets.json?asset[key]=... - Get asset
  • PUT /web/themes/{theme_id}/assets.json - Create/update asset
  • DELETE /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

  1. Authentication Errors

    • Verify your access token is valid
    • Check if the token has the required scopes
  2. Rate Limiting

    • The node includes intelligent rate limit handling
    • Implement delays between bulk operations
  3. 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.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“ž Support

πŸ—ΊοΈ 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

Discussion