TwentyDEV icon

TwentyDEV

Consume the Twenty API

Actions252

Overview

This node operation allows you to create a new "View Group" within the Twenty API. A View Group typically represents a grouping or categorization of fields in a view, which can be used to organize data presentation or filtering in an application. This operation is useful when you want to programmatically define how data fields are grouped and displayed in a custom view.

Practical examples include:

  • Creating a group of fields that share a common attribute for easier data analysis.
  • Defining visibility and position of grouped fields in a user interface.
  • Setting nested levels of related objects to control the depth of data returned.

Properties

Name Meaning
Depth Determines the level of nested related objects included in the response. Options: 0 (only primary object), 1 (primary + directly related objects), 2 (primary + directly related + their related objects).
Field Metadata Id The identifier of the target field metadata for the View Group. This is required and specifies which field the group will be associated with.
View Id Identifier of the view to which this View Group belongs.
Position Numeric value indicating the position/order of the View Group within the view.
Field Value The specific field value by which to group.
Is Visible Boolean flag indicating whether the View Group should be visible or hidden in the view. Defaults to true.

Output

The output JSON contains the details of the newly created View Group as returned by the Twenty API. This includes all properties sent in the request along with any additional metadata assigned by the API, such as unique identifiers or timestamps.

No binary data output is involved in this operation.

Dependencies

  • Requires an active connection to the Twenty API service.
  • An API key credential (or equivalent authentication token) must be configured in n8n to authorize requests.
  • The base URL for the API is dynamically set from the credentials configuration.

Troubleshooting

  • Missing Required Fields: If the "Field Metadata Id" is not provided, the API will likely return an error indicating a missing required parameter. Ensure all mandatory fields are filled.
  • Invalid Depth Value: Providing a depth value outside the allowed options (0, 1, 2) may cause errors or unexpected responses.
  • Authentication Errors: If the API key or domain is misconfigured, authentication failures will occur. Verify credentials and endpoint settings.
  • Position Conflicts: Using duplicate or out-of-range position values might lead to ordering issues in the view. Use sensible numeric positions.
  • Visibility Issues: Setting "Is Visible" incorrectly could hide groups unintentionally; verify boolean input.

Links and References

Discussion