Hudu icon

Hudu

Interact with Hudu REST API

Overview

This node integrates with the Hudu REST API to manage public photos associated with various records in Hudu. Specifically, the "Public Photo - Create" operation allows users to upload an image file and associate it with a specific record type and record ID within Hudu. This is useful for scenarios where visual documentation or images need to be linked to entities such as articles, assets, or other record types managed in Hudu.

Practical examples include:

  • Uploading a photo to illustrate an article or knowledge base entry.
  • Adding an image to an asset record for better identification.
  • Associating photos with any custom record type supported by Hudu to enrich data visually.

Properties

Name Meaning
Photo The photo file to be uploaded. Must be an image file (e.g., JPG, PNG).
Record Type The type of record the photo will be associated with, such as "Article" or other types.
Record ID The unique identifier of the record to which the photo will be linked.

Output

The node outputs JSON data representing the result of the photo creation operation. Each output item corresponds to one input item processed and includes details about the newly created public photo resource in Hudu.

If the node supports binary data output (not explicitly shown in the provided code), it would typically represent the uploaded image or related binary content. However, based on the static analysis, the output focuses on JSON metadata about the created photo.

Dependencies

  • Requires an active connection to the Hudu REST API.
  • Needs an API key credential configured in n8n to authenticate requests.
  • The base URL for the Hudu API must be set in the node credentials.
  • No additional external dependencies are indicated in the source code.

Troubleshooting

  • Common Issues:

    • Uploading a non-image file as the photo may cause the API to reject the request.
    • Providing an invalid or non-existent record type or record ID will likely result in errors from the API.
    • Missing or incorrect API credentials will prevent successful communication with Hudu.
  • Error Messages:

    • "The resource \"public_photos\" is not known!" — This error indicates that the resource parameter was incorrectly specified; ensure "public_photos" is selected.
    • API authentication errors due to invalid or missing API keys.
    • Validation errors if required properties like Photo, Record Type, or Record ID are missing or malformed.

To resolve these issues:

  • Verify the photo file is a valid image format.
  • Confirm the record type and record ID exist in Hudu.
  • Check that API credentials are correctly configured and have necessary permissions.

Links and References

Discussion