Actions252
- Api Keys Actions
- Attachments Actions
- Blocklists Actions
- Calendar Channel Event Associations Actions
- Find Many Calendar Channel Event Associations
- Create One Calendar Channel Event Association
- Create Many Calendar Channel Event Associations
- Find One Calendar Channel Event Association
- Delete One Calendar Channel Event Association
- Update One Calendar Channel Event Association
- Find Calendar Channel Event Association Duplicates
- Companies Actions
- Calendar Channels Actions
- Calendar Event Participants Actions
- Calendar Events Actions
- Connected Accounts Actions
- Favorite Folders Actions
- Favorites Actions
- Message Channel Message Associations Actions
- Find Many Message Channel Message Associations
- Create One Message Channel Message Association
- Create Many Message Channel Message Associations
- Find One Message Channel Message Association
- Delete One Message Channel Message Association
- Update One Message Channel Message Association
- Find Message Channel Message Association Duplicates
- Message Channels Actions
- Message Folders Actions
- View Fields Actions
- Message Participants Actions
- Messages Actions
- Message Threads Actions
- Notes Actions
- Note Targets Actions
- Opportunities Actions
- People Actions
- Tasks Actions
- Task Targets Actions
- Timeline Activities Actions
- View Filter Groups Actions
- View Filters Actions
- View Groups Actions
- Views Actions
- View Sorts Actions
- Webhooks Actions
- Workflow Automated Triggers Actions
- Workflow Runs Actions
- Workflows Actions
- Workflow Versions Actions
- Workspace Members Actions
Overview
This node operation allows you to create a single "View Field" in the target system via an API call. A "View Field" represents a field configuration within a view, including its visibility, size, position, and optional aggregate operations. This is useful when you want to programmatically customize or extend views by adding new fields with specific display and aggregation settings.
Common scenarios include:
- Automating dashboard or report configurations by adding fields dynamically.
- Setting up views with customized field visibility and ordering.
- Applying aggregate functions on fields for summarized data presentation.
For example, you might use this node to add a numeric field to a sales report view, set it visible, position it at the top, and apply a SUM aggregate operation to show total sales.
Properties
| Name | Meaning |
|---|---|
| Depth | Determines how much nested related object information to include in the response: 0 (only primary object), 1 (primary + directly related objects), or 2 (primary + related + related of related). |
| Is Visible | Boolean flag indicating whether the view field should be visible in the view. |
| Size | Numeric value specifying the size of the view field (e.g., width or character length). |
| Field Metadata Id | Required. The identifier of the target field metadata that this view field will represent. |
| View Id | Identifier of the view to which this field will be added. |
| Position | Numeric position/order of the view field within the view. |
| Aggregate Operation | Optional aggregate function to apply on the field's data. Options include: AVG, COUNT, MAX, MIN, SUM, COUNT EMPTY, COUNT NOT EMPTY, COUNT UNIQUE VALUES, PERCENTAGE EMPTY, PERCENTAGE NOT EMPTY, COUNT TRUE, COUNT FALSE. |
Output
The node outputs JSON data representing the newly created view field object as returned by the API. This typically includes all properties of the created view field such as its ID, visibility, size, position, associated field metadata, aggregate operation, and possibly nested related objects depending on the depth parameter.
If the API supports returning binary data for this operation (not indicated here), it would be summarized accordingly, but based on the provided info, output is JSON only.
Dependencies
- Requires an API key credential to authenticate requests against the Twenty API.
- The base URL for the API is configured from credentials.
- The node uses standard HTTP headers for JSON content type.
- No additional external dependencies are indicated.
Troubleshooting
- Missing Required Fields: If
Field Metadata Idis not provided, the API will likely reject the request. Ensure this required property is set. - Invalid Aggregate Operation: Using an unsupported aggregate operation value may cause errors. Use one of the predefined options.
- API Authentication Errors: Ensure the API key credential is valid and has permissions to create view fields.
- Incorrect View Id: Providing an invalid or non-existent view ID may result in a "not found" error.
- Depth Parameter Misuse: Setting depth too high may increase response size unnecessarily; use appropriate level.
- Network Issues: Check connectivity and API endpoint availability if requests fail.
Links and References
- Twenty API Documentation (hypothetical link)
- Aggregate Functions Explanation: Common SQL aggregate functions like AVG, COUNT, SUM, etc.
- n8n Documentation on Creating Custom Nodes: https://docs.n8n.io/integrations/creating-nodes/