TwentyDEV icon

TwentyDEV

Consume the Twenty API

Actions252

Overview

This node operation allows you to create a new "View" object within the target system. A "View" typically represents a customized way to display or organize data records, such as in lists, kanban boards, or other formats. Creating a view is useful when you want to tailor how data is presented to users, for example by defining filters, layout types, aggregation operations, and display options.

Practical scenarios include:

  • Defining a kanban board view with specific columns and aggregate calculations.
  • Creating a compact list view for quick browsing of records.
  • Setting up views that open records in side panels or full record pages depending on user preference.

Properties

Name Meaning
Depth Determines the level of nested related objects included in the response: 0 (primary only), 1 (primary + directly related), 2 (primary + related + related of related).
Kanban Aggregate Operation Optional aggregate operation applied in kanban views. Options: AVG, COUNT, MAX, MIN, SUM, COUNT EMPTY, COUNT NOT EMPTY, COUNT UNIQUE VALUES, PERCENTAGE EMPTY, PERCENTAGE NOT EMPTY, COUNT TRUE, COUNT FALSE.
Key View key identifier. Currently supports "INDEX".
Kanban Field Metadata Id Identifier for the field used as kanban column.
Position Numeric position/order of the view among others.
Is Compact Boolean indicating if the view should be displayed in compact mode.
Open Record In Defines where to open records: SIDE PANEL or RECORD PAGE.
Kanban Aggregate Operation Field Metadata Id Field metadata ID used for the aggregate operation in kanban views.
Object Metadata Id Required. Identifier of the target object this view applies to.
Name Name of the view.
Type Type of the view (e.g., list, kanban, table).
Icon Icon representing the view.

Output

The node outputs JSON data representing the newly created view object. This JSON includes all properties of the view as stored in the backend system, such as its ID, name, type, position, and any configured kanban or display settings.

If the node supports binary data output, it is not indicated here; thus, the output is purely JSON describing the created view.

Dependencies

  • Requires an API key credential to authenticate requests to the external service hosting the Views resource.
  • The base URL for API requests is configured via credentials.
  • The node uses standard HTTP headers for JSON content negotiation.

Troubleshooting

  • Missing Required Fields: If the required Object Metadata Id or other mandatory fields are not provided, the API will likely return validation errors. Ensure all required inputs are set.
  • Invalid Enum Values: Providing unsupported values for options like Depth, Kanban Aggregate Operation, or Open Record In may cause errors. Use only the documented option values.
  • Authentication Errors: If the API key or domain credentials are incorrect or missing, authentication failures will occur.
  • API Limitations: Some fields like Key currently support limited options (only "INDEX"). Using unsupported keys may result in errors.
  • Network Issues: Connectivity problems to the API endpoint will prevent view creation.

Links and References

  • No direct links available from the source code. For more information, consult the API documentation of the service managing Views or the n8n community forums for usage examples.

Discussion