AvantGuard - Hudu icon

AvantGuard - Hudu

AvantGuard - Hudu

Actions109

Overview

This node allows you to update (replace) an existing asset for a specific company in the Hudu system via the "Put Companies Company Id Assets Id" operation. It is typically used when you need to modify details of an asset, such as its name, type, serial number, or any custom fields, within a given company record.

Common scenarios:

  • Updating asset information after inventory changes.
  • Correcting asset metadata (e.g., manufacturer, model, or serial).
  • Associating additional data (like cards or custom fields) with an asset.
  • Automating asset management workflows in IT operations.

Example:
You have an asset registered under a company and want to update its serial number and add new custom fields automatically from another system.


Properties

Name Type Meaning
Id Number The identifier of the requested Asset.
Company Id Number The identifier of the parent Company to which the asset belongs.
Additional Body Fields Collection Optional fields to further describe or update the asset. See below for options.

Additional Body Fields Options:

Name Type Meaning
Id Number The unique identifier of the asset.
Company Id Number The identifier of the company to which the asset belongs.
Asset Layout Id Number The identifier of the asset layout associated with the asset.
Slug String The URL slug used to identify the asset.
Name String The name of the asset.
Primary Serial String The primary serial number of the asset (if available).
Primary Mail String The primary email associated with the asset (if available).
Primary Model String The primary model of the asset (if available).
Primary Manufacturer String The primary manufacturer of the asset (if available).
Company Name String The name of the company to which the asset belongs.
Object Type String The type of object the asset represents.
Asset Type String The category of the asset.
Archived Boolean Indicates whether the asset is archived or not.
Url String The URL of the asset page.
Created At String The date and time when the asset was created.
Updated At String The date and time when the asset was last updated.
Fields JSON A list of fields associated with the asset.
Assets JSON Custom fields or nested asset data.
Cards JSON A list of cards associated with the asset (if available).

Output

The node returns the updated asset object as received from the Hudu API. The structure will generally reflect the asset's properties, including all standard and custom fields that were updated or returned by the API.

Typical output structure (json field):

{
  "id": 123,
  "company_id": 456,
  "name": "Asset Name",
  "asset_layout_id": 789,
  "slug": "asset-slug",
  "primary_serial": "SN123456",
  "primary_mail": "user@example.com",
  "primary_model": "Model X",
  "primary_manufacturer": "Manufacturer Y",
  "company_name": "Company Z",
  "object_type": "Device",
  "asset_type": "Laptop",
  "archived": false,
  "url": "https://hudu.example.com/assets/123",
  "created_at": "2023-01-01T12:00:00Z",
  "updated_at": "2023-06-01T15:30:00Z",
  "fields": [ ... ],
  "assets": { ... },
  "cards": [ ... ]
}

Note: The actual fields depend on what is present in Hudu and what was updated.

If binary data is returned (unlikely for this endpoint), it would represent file attachments or similar asset-related content.


Dependencies

  • External Service: Requires access to a Hudu instance with API enabled.
  • API Key: Needs valid credentials (avantguardHuduApi) configured in n8n.
  • Environment Variable: The base URL for the Hudu API must be set in the credentials (baseUrl).

Troubleshooting

Common Issues:

  • Invalid Credentials: If the API key or base URL is incorrect, authentication errors will occur.
  • Missing Required Fields: Omitting Id or Company Id will result in validation errors.
  • Incorrect Data Types: Supplying strings where numbers are expected (or vice versa) may cause request failures.
  • Permission Denied: The API user may lack permission to update assets.

Error Messages & Resolutions:

  • "401 Unauthorized": Check your API key and permissions.
  • "404 Not Found": Ensure the asset and company IDs exist in Hudu.
  • "400 Bad Request": Review input fields for missing or invalid data.
  • "422 Unprocessable Entity": Some required fields may be missing or incorrectly formatted.

Links and References

Discussion