HAP icon

HAP

Interact with HAP (Hyper Application Platform) API

Option Set → Update

AI-generated

Overview

This node interacts with the Hyper Application Platform (HAP) API to update an existing Option Set. An Option Set is a collection of selectable options, each potentially having attributes like value, index, color, and score. Updating an Option Set allows users to modify its name, the list of options it contains, and toggle features such as color and scoring for these options.

Common scenarios where this node is beneficial include:

  • Modifying the choices available in a dropdown or selection field within an application.
  • Adjusting metadata associated with options, such as enabling color coding or scoring for better categorization or ranking.
  • Keeping option sets up-to-date dynamically based on external data or user input.

Practical example:

  • A marketing team uses an Option Set to categorize leads by priority. They can update the Option Set to add new priority levels, assign colors to each level for visual cues, and enable scores to quantify lead quality.

Properties

Name Meaning
OptionSet ID The unique identifier of the Option Set to update.
Name The new or updated name of the Option Set.
Options An array of option objects defining the entries in the Option Set. Each object can include: value (string), index (number), color (hex color code), and score (number). Example: [{"value": "Option 1", "index": 1, "color": "#C3F2F2", "score": 1}]
Enable Color Boolean flag indicating whether color attributes are enabled for the options.
Enable Score Boolean flag indicating whether score attributes are enabled for the options.

Output

The node outputs JSON data representing the updated Option Set after the operation completes successfully. This typically includes the updated properties such as the Option Set ID, name, options array, and flags for color and score enablement.

If the node supports binary data output, it would generally relate to any file or media content returned by the API, but for this operation, the output is purely JSON-based reflecting the updated Option Set state.

Dependencies

  • Requires an active connection to the HAP API via an API key credential configured in n8n.
  • The node sends HTTP requests with JSON payloads and expects JSON responses.
  • Proper permissions on the HAP platform to update Option Sets are necessary.

Troubleshooting

  • Invalid OptionSet ID: If the provided OptionSet ID does not exist or is incorrect, the API will likely return an error indicating the resource was not found. Verify the ID before running the node.
  • Malformed Options JSON: The Options property must be a valid JSON array of objects. Syntax errors or invalid structure will cause request failures. Use proper JSON formatting.
  • Permission Denied: Insufficient API credentials or lack of update permissions on the Option Set will result in authorization errors. Ensure the API key has appropriate scopes.
  • API Connectivity Issues: Network problems or incorrect API endpoint configuration can cause timeouts or connection errors. Check network access and credential settings.
  • Feature Flags Mismatch: Enabling color or score without providing corresponding data in options may lead to inconsistent states or warnings from the API.

Links and References

Discussion