Nextcloud Tables icon

Nextcloud Tables

Manage your Nextcloud Tables - tables, rows, and data

Overview

The "Create Column" operation in the Nextcloud Tables node allows users to add a new column to an existing table within their Nextcloud Tables environment. This is useful for dynamically extending the structure of tables by defining new fields with specific data types and constraints.

Common scenarios include:

  • Adding a text field to capture additional information about records.
  • Creating a number column with validation rules for financial or statistical data.
  • Defining date/time columns for scheduling or logging purposes.
  • Setting up selection dropdowns for categorization or status tracking.
  • Allowing user or group selections to assign ownership or responsibility.

Practical example: You have a project management table and want to add a "Priority" column as a dropdown selection with options like "High", "Medium", and "Low". Using this operation, you can create that column programmatically and set default values or constraints.

Properties

Name Meaning
Table Select the target table where the new column will be created. Can be chosen from a list or specified by its numeric ID.
Title The name/title of the new column.
Description Optional description providing more details about the column's purpose.
Column Type The data type of the column. Options: Text, Number, Date/Time, Selection (dropdown), User/Group selection.
Required Field Whether the column must have a value (mandatory).
Text Subtype For Text columns only: choose between single-line ("Line") or multiline ("Long Text").
Default Text Default text value for new rows in Text columns.
Maximum Length Maximum allowed characters for Text columns; empty means unlimited.
Validation Pattern Regex pattern to validate input in Text columns (optional).
Default Number Default numeric value for new rows in Number columns.
Minimum Minimum allowed value for Number columns (optional).
Maximum Maximum allowed value for Number columns (optional).
Decimal Places Number of decimal places for Number columns.
Prefix Text prefix displayed before numbers (e.g., currency symbol).
Suffix Text suffix displayed after numbers (e.g., units like "kg").
Default Date Default date/time value for Date/Time columns, either ISO 8601 format or the string "today".
Selection Options For Selection columns: define multiple dropdown options by specifying their values.
Default Selection Default selected option(s) for Selection columns; must be one of the defined options.
Multiple Selection Whether multiple options can be selected simultaneously in Selection columns.
User/Group Type For User/Group columns: specify if only users or only groups are selectable.
Default User/Group Default user or group for User/Group columns.
Multiple Selection Whether multiple users/groups can be selected simultaneously in User/Group columns.

Output

The output JSON contains the details of the newly created column as returned by the Nextcloud Tables API. This typically includes the column's unique identifier, title, type, configuration settings (such as defaults, validation rules, and options), and metadata.

If the node supports binary data output (not indicated here), it would represent any file or media content related to the column creation, but this operation primarily deals with JSON data describing the column.

Dependencies

  • Requires a valid API authentication token credential configured in n8n to connect to the Nextcloud Tables API.
  • The node depends on Nextcloud Tables being accessible and the user having permissions to modify the specified table.
  • No additional external services are required beyond the Nextcloud Tables API.

Troubleshooting

  • Invalid Table ID: Ensure the table ID is numeric and corresponds to an existing table accessible by the API credentials.
  • Validation Errors: If regex patterns or numeric limits are invalid or conflict with existing data, the API may reject the request. Double-check patterns and numeric ranges.
  • Default Value Mismatch: Default selections must be among the defined options; otherwise, the operation may fail.
  • Permission Denied: Insufficient permissions to modify the table will cause errors. Verify API credentials and user rights.
  • Unknown Column Type: Only the specified column types are supported; using unsupported types will result in errors.

Common error messages usually indicate these issues and can be resolved by correcting input parameters or verifying access rights.

Links and References

Discussion