Actions100
- Activity Actions
- Asset Actions
- Authentication Actions
- Collection Actions
- Extension Actions
- Field Actions
- File Actions
- Folder Actions
- Item Actions
- Permission Actions
- Preset Actions
- Relation Actions
- Revision Actions
- Role Actions
- Setting Actions
- User Actions
- Utility Actions
Overview
This node is designed to update settings in a system via an API. It allows users to modify configuration or metadata by sending partial settings objects and applying various query parameters such as filtering, sorting, grouping, and aggregation. This node is useful when you want to programmatically adjust system settings or export updated data in different formats (JSON, CSV, XML).
Common scenarios include:
- Updating project URLs or other configuration values dynamically.
- Exporting updated settings data for backup or reporting purposes.
- Applying complex queries with filters, sorts, and aggregations on settings data before updating.
Example: You might use this node to update the "project_url" setting of a system while exporting the response as a CSV file for audit purposes.
Properties
Name | Meaning |
---|---|
JSON/RAW Parameters | Whether to input query and/or body parameters using a key-value UI or directly as JSON/RAW. |
Query Parameters | Query parameters as a flat JSON object, used if JSON/RAW Parameters is enabled. |
Additional Fields | Extra options including: - Aggregate: Perform aggregation functions like count, sum, average on specified fields. - Binary Property for Export Data: Name of binary property to store exported data. - Deep (JSON): Nested relational query parameters. - Export: Format to save API response (json, csv, xml). - File Name for Export Data: Filename without extension. - Fields: Specify which fields to return. - Filter (JSON): Conditions to filter items. - Group By: Field(s) to group aggregation results. - Meta: Metadata to include in response. - Offset: Number of items to skip. - Search: Text search filter. - Sort: Fields to sort by, supports ascending, descending, and random order. |
Data (JSON) | Partial settings object to update, provided as JSON. Required. |
Output
The node outputs the API response in the json
field, which contains the updated settings data or the result of the update operation. If export is enabled, the response can also be saved as a file in the specified format (JSON, CSV, or XML) under a binary property named by the user (default "data"). This binary data represents the exported content of the updated settings.
Dependencies
- Requires access to the target system's API that manages settings.
- Needs appropriate API authentication credentials configured in n8n to authorize update operations.
- No additional external libraries beyond those bundled are required.
Troubleshooting
- Invalid JSON Input: When using JSON/RAW parameters or providing the partial settings object, ensure valid JSON syntax to avoid parsing errors.
- Missing Required Fields: The
data
property is mandatory; omitting it will cause the update to fail. - API Authentication Errors: Ensure the API credentials are correctly set up and have permissions to update settings.
- Unsupported Export Format: Only "json", "csv", and "xml" are supported for export; selecting others will cause errors.
- Aggregation Misconfiguration: Aggregation functions require valid field names; incorrect fields may lead to empty or error responses.
Links and References
- Directus Settings API Documentation (for understanding the structure of the settings object)
- General REST API usage guides for configuring authentication and request formatting in n8n.