Overview
This node executes workflows on the HjhComfyUI platform, which appears to be a service for processing and generating outputs based on JSON-defined workflows. It allows users to submit a workflow in JSON format, optionally use predefined Hjh services, and wait for the workflow execution to complete before returning results.
Common scenarios where this node is beneficial include:
- Automating image generation or processing pipelines defined in HjhComfyUI workflows.
- Integrating HjhComfyUI workflow execution into larger n8n automation workflows.
- Managing asynchronous workflow executions with optional waiting and timeout controls.
Practical example:
- A user submits a JSON workflow describing an image generation task to HjhComfyUI, waits for completion, and retrieves generated images as output files for further processing or storage.
Properties
| Name | Meaning |
|---|---|
| Use Hjh Services | Whether to use predefined Hjh services specified in the workflow or rely on credentials. |
| Hjh Services | JSON string defining the Hjh services to use, expected to contain a comfyui_check URL list. |
| Hjh Workflow JSON | The JSON definition of the HjhComfyUI workflow to execute (required). |
| Wait For Result | Whether to wait for the workflow execution to complete before returning results. |
| Timeout | Maximum time in seconds to wait for workflow completion before timing out. |
Output
The node outputs a JSON array containing one object with the following structure:
code: HTTP-like status code (e.g., 200 for success).message: Status message, typically "ok" on success.description: Additional description, usually "ok".files: An array of file paths (strings) pointing to images generated by the workflow. These are extracted from the workflow outputs and filtered by type ("output" or "temp").promptResult: The full detailed result object returned by the HjhComfyUI API for the executed prompt.promptId: The unique identifier of the submitted prompt/workflow execution.
If the node is configured not to wait for results, it returns immediately after submitting the workflow with empty files and promptResult.
In case of errors, the output contains error messages and descriptions explaining the failure.
Dependencies
- Requires access to the HjhComfyUI API endpoint(s), either provided via the "Hjh Services" JSON or through stored API credentials.
- Optionally requires an API key for authentication, passed as a Bearer token in the Authorization header.
- Network connectivity to the HjhComfyUI service(s) is necessary.
- No additional external libraries beyond standard n8n helpers and request utilities.
Troubleshooting
- No available service error: Occurs if none of the provided or credential-based service URLs respond successfully within a short timeout. Verify service URLs and network connectivity.
- Failed to get prompt ID: Indicates the POST request to queue the workflow did not return a valid prompt ID. Check the correctness of the workflow JSON and API availability.
- Execution timeout: Happens if waiting for the workflow result exceeds the configured timeout. Increase the timeout or disable waiting if appropriate.
- Workflow execution failed: Returned when the workflow completes but reports an error status. Inspect the workflow definition and service logs.
- No outputs found: The workflow completed without producing any output files. Confirm the workflow is designed to generate outputs.
- API key issues: If authentication fails, ensure the API key is correctly configured and has sufficient permissions.
Links and References
- HjhComfyUI Documentation (No direct link available in source; replace with actual URL if known)
- n8n Documentation on Creating Custom Nodes
- General REST API usage patterns in n8n: HTTP Request Node