Nqdev: Tích hợp Haravan icon

Nqdev: Tích hợp Haravan

Tích hợp Haravan với n8n để lắng nghe các sự kiện như đơn hàng, sản phẩm, tài khoản... và tự động kích hoạt các workflow tương ứng.

Products → Get Product Count

AI-generated

Overview

This node integrates with the Haravan platform to interact with various resources such as orders, products, and accounts. Specifically, for the Products resource and the Get Product Count operation, it retrieves the total count of products available in the connected Haravan store.

Common scenarios where this node is beneficial include:

  • Monitoring inventory size by fetching the current number of products.
  • Triggering workflows based on product catalog size changes.
  • Reporting or analytics that require up-to-date product counts.

For example, a user might use this node to automatically check how many products are listed in their store and then decide whether to trigger restocking workflows or promotional campaigns.

Properties

Name Meaning
Options A collection of optional settings:
- Logging Request Boolean flag to enable logging of each API request sent to Haravan for debugging purposes.

The "Options" property allows users to toggle detailed request logging, which can help during development or troubleshooting.

Output

The node outputs an array of JSON objects, each representing the result of the executed operation. For the "Get Product Count" operation, the output JSON contains at least the following fields:

  • executionId: The unique identifier for the execution instance.
  • resource: The resource name, e.g., "Products".
  • operation: The operation performed, e.g., "Get Product Count".
  • status: The status of the operation, typically "completed".
  • timestamp: ISO string timestamp when the operation was completed.

The actual product count value is expected to be included in the output JSON, although the provided code snippet does not explicitly show the retrieval or inclusion of the count itself. It is likely handled internally or via the imported Haravan library.

No binary data output is indicated by the source code.

Dependencies

  • Requires an API key credential to authenticate with the Haravan platform.
  • Depends on the external Haravan API service to fetch product data.
  • Uses an internal Haravan library (../../nqdev-libraries/haravan) for API interactions.
  • n8n environment must have this credential configured properly for the node to function.

Troubleshooting

  • Common Issues:

    • Authentication failures due to missing or invalid API credentials.
    • Network connectivity problems preventing access to the Haravan API.
    • API rate limits or quota exceeded errors from Haravan.
    • Misconfiguration of the resource or operation parameters.
  • Error Messages:

    • Errors thrown during execution will include the item index for easier identification.
    • If "continue on fail" is disabled, the node will stop on the first error; enabling it allows processing subsequent items.
    • Enabling the "Logging Request" option can help diagnose issues by providing detailed logs of API requests.

Links and References

Discussion