Hudu icon

Hudu

Interact with Hudu REST API

Overview

This node interacts with a system managing "procedures" and supports duplicating an existing procedure. The duplication operation creates a copy of a specified procedure under a potentially different company, optionally allowing the user to rename or add a description to the duplicated procedure.

Common scenarios for this node include:

  • Quickly creating a new procedure based on an existing one without manually recreating all details.
  • Managing procedures across multiple companies by duplicating and assigning them accordingly.
  • Automating workflows where similar procedures need to be created programmatically with slight variations.

For example, if you have a standard onboarding procedure for employees in one company, you can duplicate it to create a customized version for another company, changing the name or description as needed.

Properties

Name Meaning
Procedure ID The unique identifier of the procedure to duplicate.
Company Name or ID The target company for the duplicated procedure. You can select from a list or specify an ID via expression.
Additional Fields Optional fields to customize the duplicated procedure:
- Name New name for the duplicated procedure.
- Description New description for the duplicated procedure.

Note: There is also a property named "Company Name or ID" (with internal name company_id) used in other operations like create or createFromTemplate, but for duplication, the relevant property is companyId.

Output

The node outputs JSON data representing the duplicated procedure. Each output item corresponds to one input item processed and includes the duplicated procedure's details as returned by the underlying API.

If the node supports binary data output, it is not indicated in the provided code or properties, so the output is purely JSON.

Dependencies

  • Requires an API key credential to authenticate requests to the external service managing procedures.
  • Uses dynamic loading of company options via a method that fetches available companies.
  • Relies on the base URL and API key configured in the node credentials for making REST API calls.

Troubleshooting

  • Invalid Procedure ID: If the provided procedure ID does not exist or is invalid, the node will throw an error. Verify the ID before running.
  • Invalid Company ID: Selecting or specifying a non-existent company ID will cause failure. Use the dropdown or valid expressions.
  • API Authentication Errors: Missing or incorrect API key credential will prevent successful duplication.
  • Permission Issues: The API key must have permissions to read the original procedure and create procedures under the target company.
  • Continue On Fail: If enabled, the node will continue processing subsequent items even if some fail, returning error messages in the output JSON.

Links and References

  • n8n Expressions Documentation — For using expressions in property values.
  • Refer to the external API documentation of the procedure management system for detailed info on procedure duplication endpoints and required permissions. (Not provided here.)

Discussion