AvantGuard - Hudu icon

AvantGuard - Hudu

AvantGuard - Hudu

Actions109

Overview

The AvantGuard - Hudu node's "Uploads" resource with the "Post Uploads" operation allows users to upload a file and associate it with a specific record in the Hudu system. This is useful for automating the process of attaching documents, images, or other files to assets, websites, procedures, passwords, companies, or articles within Hudu.

Common scenarios:

  • Automatically uploading documentation or images to an asset record after a workflow completes.
  • Attaching compliance reports to company records.
  • Adding procedure-related files directly from another automated process.

Practical example:
After generating a PDF report in a workflow, you can use this node to upload the PDF and attach it to a specific asset in Hudu.


Properties

Name Type Meaning
File string The file to upload. Expects a reference to binary data available in the n8n workflow.
Upload Uploadable Id number ID of the record (e.g., asset, website, etc.) to which the file will be attached.
Upload Uploadable Type string Type of record to attach the file to. Valid values include: Asset, Website, Procedure, AssetPassword, Company, Article.

Output

The node outputs a json object containing the response from the Hudu API after the upload. The structure typically includes details about the uploaded file and its association, such as:

{
  "id": 123,
  "filename": "example.pdf",
  "uploadable_id": 456,
  "uploadable_type": "Asset",
  // ...other metadata fields returned by the API
}

Note: The exact output fields depend on the Hudu API's response.

If the upload involves binary data, the node expects the file to be referenced from the workflow's binary data but does not output binary data itself.


Dependencies

  • External Service: Requires access to a Hudu instance with API enabled.
  • API Key: Needs valid credentials (avantguardHuduApi) configured in n8n, including the base URL and API key/token.
  • n8n Configuration: The file to upload must be present in the workflow's binary data.

Troubleshooting

Common issues:

  • Missing Binary Data: If the specified file is not found in the workflow's binary data, the upload will fail.
  • Invalid Credentials: Incorrect or missing API credentials will result in authentication errors.
  • Incorrect Record ID/Type: Providing an invalid Upload Uploadable Id or Upload Uploadable Type may cause the API to reject the request.

Error messages and resolutions:

  • "File not found": Ensure the file exists in the workflow's binary data under the expected property.
  • "401 Unauthorized": Check that the API credentials are correctly set up in n8n.
  • "422 Unprocessable Entity": Verify that the provided record ID and type are valid and exist in Hudu.

Links and References

Discussion