Overview
The Xata - Append operation in this n8n node allows you to add (append) multiple records to a specified table within your Xata workspace database. This is particularly useful for bulk data ingestion, such as importing new datasets, synchronizing external sources, or automating the addition of new entries from other workflows.
Practical examples:
- Importing a batch of user signups into a "users" table.
- Logging events or transactions in real-time by appending them to an audit table.
- Migrating data from another system into Xata in bulk.
Properties
| Name | Type | Meaning |
|---|---|---|
| Workspace Slug | string | The unique slug identifier for your Xata workspace. |
| Database Location | options | The region where your Xata database is hosted (e.g., us-east-1, us-west-2, eu-west-1). |
| Database Name | string | The name of the database you want to access. |
| Branch Name | string | The branch of the database to which you want to append records. |
| Table Name | string | The specific table within the database where records will be appended. |
| Send All Columns | boolean | If true, all columns from the input data are sent; if false, only specified columns are sent. |
| Columns | string[] | (Shown if Send All Columns is false) List of column names to include in the append operation. |
| Additional Options | collection | Extra settings for the operation: |
| - Ignore Columns (string[]): Columns to exclude when sending all columns. | ||
| - Bulk Size (number): Number of records to process and send in each batch (default: 10). |
Output
- The output is a JSON array where each item represents the result of appending a record.
- For successful inserts, each object contains:
id: The ID of the newly created record.
- If an error occurs for a particular record and "Continue On Fail" is enabled, the object will contain:
error: The error message describing what went wrong.
Example output:
[
{ "id": "rec_c7x9k3l4m5" },
{ "id": "rec_8j2h1b0v6n" },
{ "error": "Missing required field 'email'" }
]
Dependencies
- External Service: Requires access to the Xata API.
- API Key: You must provide valid Xata API credentials (
xataApi) in n8n. - n8n Configuration: No special environment variables beyond standard credential setup.
Troubleshooting
Common Issues:
Missing Credentials:
Error:No credentials provided for Xata Api
Resolution: Ensure that the Xata API credentials are correctly set up in n8n.Invalid Table/Database/Branch:
Error: May return an error message from Xata indicating the resource does not exist.
Resolution: Double-check the workspace slug, database name, branch, and table name.Bulk Size Too Large:
Error: Xata may reject requests with too many records at once.
Resolution: Lower the "Bulk Size" option.Column Mismatch:
Error: Errors about missing or extra columns.
Resolution: Ensure the input data matches the schema of the target table, and use the "Columns" or "Ignore Columns" options as needed.Partial Failure Handling:
If "Continue On Fail" is enabled, failed records will appear in the output with anerrorproperty instead of stopping the workflow.