AvantGuard - Hudu icon

AvantGuard - Hudu

AvantGuard - Hudu

Actions109

Overview

The Duplicate Procedure operation in the "Procedures" resource allows users to create a copy of an existing procedure within the AvantGuard Hudu system. This is useful when you want to replicate a procedure's structure and optionally assign it a new name or description, typically for use in another company context or as a template for similar processes.

Common scenarios:

  • Creating a new procedure based on an existing one for a different company.
  • Quickly generating variations of standard procedures with minor changes.
  • Streamlining onboarding by duplicating best-practice procedures.

Example:
A user wants to duplicate a standard onboarding procedure for a new client company, giving it a unique name and description relevant to that client.


Properties

Name Type Meaning
Id Number The ID of the procedure to duplicate.
Company Id Number The ID of the company where the duplicated procedure will be created.
Additional Query Parameters Collection Optional fields to further customize the duplicated procedure. Includes:
- Name (String): The new name for the duplicated procedure.
- Description (String): The new description for the duplicated procedure.

Output

The node outputs a json object containing details of the newly duplicated procedure. While the exact structure depends on the API response, typical fields may include:

{
  "id": 123,
  "name": "Duplicated Procedure Name",
  "description": "New description if provided",
  "company_id": 456,
  // ...other procedure details
}
  • If binary data is ever returned, it would represent the content of the duplicated procedure, but this node primarily returns structured JSON.

Dependencies

  • External Service: Requires access to the AvantGuard Hudu API.
  • API Key/Credentials: Needs valid avantguardHuduApi credentials configured in n8n, including the base URL (baseUrl) for the Hudu instance.
  • n8n Configuration: Ensure the credentials are set up in the n8n credential store.

Troubleshooting

Common Issues:

  • Invalid Procedure ID: If the provided "Id" does not exist, the API may return a "Not Found" error.
  • Missing Company ID: Omitting the "Company Id" will result in a validation error.
  • Insufficient Permissions: The API key used must have permission to read the source procedure and create new ones for the target company.
  • Duplicate Name Conflict: If a procedure with the same name already exists in the target company, the API may reject the request or overwrite, depending on its rules.

Error Messages & Resolutions:

  • "Procedure not found": Check that the "Id" matches an existing procedure.
  • "Company not found": Verify the "Company Id" is correct and accessible.
  • "Unauthorized": Ensure your API credentials are valid and have sufficient permissions.
  • "Validation failed": Double-check all required fields and their formats.

Links and References

Discussion