Actions31
- Table Actions
- View Actions
- Column Actions
- Share Actions
- Import Actions
- Row Actions
Overview
This node enables creating a new column in a Nextcloud Table with AI-friendly options. It is designed to simplify the process of adding columns by allowing detailed configuration of the column's type, validation rules, default values, and other attributes tailored for different data types such as text, number, datetime, selection lists, or user/group selectors.
Common scenarios where this node is beneficial include:
- Automating table schema updates by programmatically adding columns with specific constraints.
- Creating dynamic forms or data structures that require precise control over input validation and defaults.
- Integrating with AI workflows that generate or modify table schemas based on analysis or predictions.
Practical example:
- Adding a "Status" selection column with predefined options like ["Pending", "In Progress", "Completed"] and setting "Pending" as the default.
- Creating a numeric "Price" column with currency prefix "€", two decimal places, and minimum/maximum value constraints.
- Defining a multiline text column for "Comments" with a maximum length and regex pattern validation.
Properties
| Name | Meaning |
|---|---|
| tableIdAI | The ID of the table where the column should be created (used only for this operation). |
| columnType | Type of the column. Valid values: text, number, datetime, selection, usergroup. |
| columnTitle | The title/name of the column. |
| columnDescription | Optional description for the column. |
| columnMandatory | Whether this column is required (true/false). |
| textSubtypeAI | Subtype for text columns. Valid values: line (single line), long (multiline). Ignored for other types. |
| textDefaultAI | Default text value for new rows. Ignored for other types. |
| textMaxLengthAI | Maximum number of characters allowed in text columns. Ignored for other types. |
| textPatternAI | Regex pattern for validating text input. Ignored for other types. |
| numberDefaultAI | Default numeric value for new rows. Ignored for other types. |
| numberMinAI | Minimum allowed numeric value. Ignored for other types. |
| numberMaxAI | Maximum allowed numeric value. Ignored for other types. |
| numberDecimalsAI | Number of decimal places for numbers. Ignored for other types. |
| numberPrefixAI | Text prefix before the number, e.g., currency symbol like "€". Ignored for other types. |
| numberSuffixAI | Text suffix after the number, e.g., unit like "kg". Ignored for other types. |
| datetimeDefaultAI | Default date/time value in ISO 8601 format or "today". Ignored for other types. |
| selectionOptionsAI | JSON array string with selection options, e.g., ["Option 1", "Option 2"]. Ignored for other types. |
| selectionDefaultAI | Default selected option (must be one of the options). Ignored for other types. |
| selectionMultipleAI | Whether multiple options can be selected (true/false). Ignored for other types. |
| usergroupTypeAI | Type of user/group selection. Valid values: user, group. Ignored for other types. |
| usergroupDefaultAI | Default user or group. Ignored for other types. |
| usergroupMultipleAI | Whether multiple users/groups can be selected (true/false). Ignored for other types. |
Output
The node outputs a JSON object representing the newly created column's details as returned by the Nextcloud Tables API. This typically includes identifiers, metadata, and configuration reflecting the properties set during creation.
No binary data output is produced by this operation.
Dependencies
- Requires an active connection to a Nextcloud instance with the Tables app enabled.
- Needs an API authentication token or API key credential configured in n8n to authorize requests.
- The node relies on internal handlers to communicate with the Nextcloud Tables API endpoints for column management.
Troubleshooting
Common issues:
- Invalid or missing
tableIdAIwill cause the operation to fail because the target table cannot be identified. - Providing invalid JSON in
selectionOptionsAIwill result in parsing errors. - Setting default values not matching the specified options (e.g., default selection not in options) may cause validation errors.
- Using unsupported
columnTypeor subtype values will trigger errors.
- Invalid or missing
Error messages:
"Unknown resource": Indicates the resource parameter is incorrect; ensure it is set to "column".- API errors related to authorization: Verify API credentials and permissions.
- Validation errors from the API: Check property values for correctness, especially JSON formatting and allowed values.
To resolve errors, verify all required fields are correctly filled, validate JSON inputs, and confirm API credentials have sufficient rights.