Payhawk icon

Payhawk

Interact with the Zitadel API

Actions99

Custom Fields → Create A New Custom Field

AI-generated

Overview

This node operation allows users to create a new custom field within an account in an external system. Custom fields are user-defined data points that can be added to records to capture additional information not covered by default fields. This operation is useful for tailoring data structures to specific business needs, such as adding specialized attributes to customer profiles, products, or transactions.

Practical examples include:

  • Adding a "Customer Loyalty Tier" field to track membership levels.
  • Creating a "Warranty Expiration Date" field for product records.
  • Defining a "Preferred Contact Method" field for client communication preferences.

Properties

Name Meaning
Account Id Identifier of the account where the custom field will be created.
Label The display name or label of the custom field.
Is Required Boolean indicating if this custom field must always have a value (true/false).
Description A textual description explaining the purpose or usage of the custom field.
External Id Unique identifier of the custom field in the external system, used for integration purposes.
External Source Unique identifier of the external system where the custom field originates.
Type The type of the custom field. Options:
- Dynamic List
- Predefined List
- Free Text Input
- Date

Output

The node outputs JSON data representing the newly created custom field object as returned by the external API. This typically includes all properties of the custom field such as its unique ID, label, type, and metadata like creation timestamps.

If the node supports binary data output, it would represent any associated files or attachments related to the custom field, but based on the provided code and properties, this node primarily deals with JSON data.

Dependencies

  • Requires an API key credential or similar authentication token configured in n8n to connect securely to the external system's API.
  • The base URL for the API must be set in the credentials configuration.
  • The node depends on an OpenAPI specification (payhawk.api.json) for request construction and response parsing.
  • Uses the @devlikeapro/n8n-openapi-node package for building operations from the OpenAPI spec.
  • Utilizes lodash for utility functions.

Troubleshooting

  • Missing Required Fields: If "Account Id" or "Label" is not provided, the API will likely reject the request. Ensure these required fields are filled.
  • Invalid Field Type: Selecting a type outside the allowed options may cause errors. Use only the specified types.
  • Authentication Errors: If the API key or credentials are missing or invalid, the node will fail to authenticate. Verify credentials setup.
  • API Endpoint Issues: Incorrect base URL or network issues can cause connection failures. Confirm the API endpoint is reachable.
  • Duplicate External Ids: Using an existing externalId might cause conflicts. Ensure uniqueness when integrating with external systems.

Links and References

Discussion