Actions31
- Option Set Actions
- Public Query Actions
- Record Actions
- Role Actions
- Workflow Actions
- Worksheet Actions
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 whether colors or scores are enabled for those options.
Common scenarios where this node is beneficial include:
- Modifying the choices available in a dropdown or selection field within an application.
- Adjusting scoring or color coding schemes associated with options for better data visualization or processing.
- Renaming an Option Set to reflect updated business terminology or requirements.
Practical example: Suppose you have a survey application where respondents select from predefined options. If you want to add new options, change option colors for better UI clarity, or enable scoring to quantify responses, this node can update the Option Set accordingly.
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 | A JSON array representing the list of option objects. Each option can include properties such as value (the option text), index (order), color (hex color code), and score (numeric score). 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 as returned by the HAP API. 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 relate to any file or media content associated with the Option Set, but based on the provided code and properties, this node primarily deals with JSON data.
Dependencies
- Requires an active connection to the HAP API via an API key credential configured in n8n.
- The node expects the HAP API to be accessible and properly authenticated.
- No additional external dependencies beyond the HAP API and its authentication.
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: Ensure that the
Optionsproperty is valid JSON and follows the expected structure. Invalid JSON or missing required fields in options may cause request failures. - Authentication Errors: If the API key credential is missing, expired, or invalid, the node will fail to authenticate. Check the credential configuration in n8n.
- API Rate Limits or Downtime: Temporary API unavailability or rate limiting can cause errors. Retry after some time or check API status.
- Enabling Color or Score without Proper Option Fields: If
Enable ColororEnable Scoreis set to true but the options do not contain correspondingcolororscorefields, the API might ignore these settings or return warnings.
Links and References
- Hyper Application Platform (HAP) API Documentation (example placeholder link, replace with actual if available)
- n8n Documentation on Creating Custom Nodes
- JSON formatting guide for options: Use standard JSON syntax with objects containing
value,index,color, andscorekeys as needed.