TwentyDEV icon

TwentyDEV

Consume the Twenty API

Actions252

Overview

This node operation allows creating multiple "View Fields" in a batch for a given system. It is useful when you need to define or update several view fields at once, which can be beneficial in scenarios where views or reports require multiple field configurations simultaneously. For example, if you are setting up a dashboard and want to specify various aggregated metrics or metadata fields in one go, this operation streamlines the process by sending all the required field definitions together.

Properties

Name Meaning
Depth Determines how much nested related object information to include in the response:
- 0: Only the primary object's information.
- 1: Primary object plus its directly related objects (no further nesting).
- 2: Primary object, its directly related objects, and their related objects.
Body JSON object representing the array of view fields to create. Each item typically includes properties like fieldMetadataId (identifier of the field metadata) and aggregateOperation (e.g., AVG, SUM) specifying aggregation type or other field-specific settings.

Output

The output will contain a JSON structure representing the created view fields with their details as returned by the API. This typically includes identifiers, metadata, and any computed or aggregated values based on the input. The node does not explicitly handle binary data output.

Dependencies

  • Requires an API key credential for authenticating requests to the external Twenty API service.
  • The node uses the base URL and headers configured via credentials.
  • No additional environment variables are indicated.

Troubleshooting

  • Invalid JSON in Body: If the JSON provided in the Body property is malformed, the request will fail. Ensure valid JSON syntax.
  • Authentication Errors: Missing or incorrect API credentials will cause authentication failures. Verify that the API key or token is correctly set up.
  • Depth Parameter Misuse: Setting an unsupported depth value may result in incomplete or unexpected responses. Use only 0, 1, or 2.
  • API Limits or Quotas: Creating many view fields at once might hit API rate limits; consider batching smaller sets if errors occur.

Links and References

Discussion