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 new "View Sort" configuration in the target system. A "View Sort" defines how data within a specific view should be ordered based on a particular field and direction (ascending or descending). This is useful when you want to programmatically control the sorting behavior of views, for example, to ensure that users see data sorted by priority, date, or any other relevant field automatically.
Practical examples include:
- Automatically setting a default sort order for a dashboard or report view.
- Creating custom sorts for different user roles or contexts.
- Dynamically adjusting sort criteria based on external triggers or workflows.
Properties
| Name | Meaning |
|---|---|
| Depth | Determines the level of nested related objects included in the response: - 0: Only primary object info. - 1: Primary object + directly related objects. - 2: Primary + directly related + their related objects. |
| View Id | The identifier of the view where the sort will be applied. |
| Direction | The direction of the sort. Typically this would be values like ascending or descending (the exact allowed values depend on the API but are not explicitly listed here). |
| Field Metadata Id | Required. The identifier of the field on which the view sort will be based. This specifies the target field used for sorting. |
Output
The node outputs JSON data representing the newly created View Sort object as returned by the API. This typically includes details such as the sort's unique ID, the associated view ID, the field metadata ID, the direction of the sort, and possibly related nested objects depending on the Depth parameter.
No binary data output is indicated.
Dependencies
- Requires an API key credential to authenticate requests against the target service.
- The base URL for the API is configured via credentials.
- The node sends HTTP requests with JSON payloads and expects JSON responses.
Troubleshooting
- Missing required fields: If the "Field Metadata Id" or "View Id" is missing or invalid, the API will likely return an error indicating a bad request. Ensure these IDs are correct and provided.
- Invalid direction value: Providing an unsupported sort direction may cause the API to reject the request. Verify allowed values for the direction property.
- Authentication errors: If the API key or domain credentials are incorrect or expired, authentication will fail. Check credential validity.
- Depth parameter misuse: Setting an unsupported depth level might result in incomplete or unexpected response data.
Links and References
- Refer to the target API documentation for detailed information about the "View Sort" resource and its properties.
- Consult the API docs for valid values for the "Direction" property and examples of usage.
- n8n documentation on creating custom nodes and using API credentials.