HAP icon

HAP

Interact with HAP (Hyper Application Platform) API

Overview

This node interacts with the Hyper Application Platform (HAP) API to update the configuration of an existing worksheet. It allows users to modify worksheet metadata such as its name, alias, and section grouping, as well as manage the fields within the worksheet by adding new fields, editing existing ones, or removing fields.

Common scenarios where this node is beneficial include:

  • Renaming a worksheet or changing its identifier for better clarity.
  • Reorganizing worksheets by assigning them to different sections or groups.
  • Dynamically updating the structure of a worksheet by adding new data fields, modifying existing field properties, or cleaning up obsolete fields.

For example, a user managing a dynamic form system could use this node to update the form's fields based on evolving requirements without recreating the entire worksheet.

Properties

Name Meaning
Worksheet ID The unique identifier of the worksheet to update (required).
Worksheet Name The new name to assign to the worksheet.
Alias The new alias or identifier string for the worksheet.
Section ID The ID of the group or section to which the worksheet should be assigned.
Add Fields A JSON array describing new fields to add to the worksheet. Each field includes properties like name, type (as a number), and whether it is required. Example: [{"name": "New Field", "type": 2, "required": true}]
Edit Fields A JSON array describing existing fields to edit. Each object must include the field ID and any updated properties such as name. Example: [{"ID": "field_id", "name": "Updated Field Name"}]
Remove Fields A JSON array of field IDs to remove from the worksheet. Example: ["field_id_1", "field_id_2"]

Output

The node outputs JSON data representing the result of the update operation performed on the worksheet. This typically includes the updated worksheet details reflecting the changes made, such as the new name, alias, section assignment, and the current set of fields after additions, edits, and removals.

If the API supports it, the output may also contain status information or confirmation messages about the success of the update.

No binary data output is indicated for this operation.

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 are indicated beyond the API access.

Troubleshooting

  • Invalid Worksheet ID: If the provided worksheet ID does not exist or is incorrect, the API will likely return an error indicating that the worksheet was not found. Verify the worksheet ID before running the node.
  • Malformed JSON in Fields: The Add Fields, Edit Fields, and Remove Fields inputs expect valid JSON arrays. Improperly formatted JSON will cause parsing errors. Use the JSON editor or validate your JSON input.
  • Permission Issues: Insufficient permissions or invalid API credentials can lead to authorization errors. Ensure the API key has rights to update worksheets.
  • Field ID Missing in Edit Fields: When editing fields, each entry must include the field ID. Omitting this will cause the update to fail for those fields.
  • API Rate Limits or Downtime: Network issues or API rate limiting might cause intermittent failures. Check connectivity and API status if errors persist.

Links and References

Discussion