Documentation is being updated. Some sections may not reflect the latest features.
Looking for step-by-step guides? Explore Tutorials →

Write Data Node

Perform database write operations against a data source.

Overview

The Write Data node performs insert, update, upsert, or delete operations against a selected data source. Use it to persist workflow results, update records, or manage data in your project's tables.

Works with Ubex Tables. Any table you create in My Data can be used as a data source here. Store users, products, orders, or any data directly inside Ubex — no external database required. See the My Data documentation for how to create tables.

Configuration

Field Description Required
Select Datasource The target table or data source Yes
Operation Insert, Update, Upsert, or Delete Yes
Output Variable Variable name to store the result Yes

Operations

Operation Description
Insert Adds a new row to the table
Update Modifies existing rows that match specified conditions
Upsert Inserts a new row, or updates it if a match exists
Delete Removes rows that match specified conditions

Column Mapping

For Insert, Update, and Upsert operations, map values to table columns:

Property Description
Name The column name
Type The column data type (TEXT, SELECT, LONGTEXT, NUMBER, DATE)
Required Displayed in red if the column is mandatory
Value Literal value or {{variable}} reference

Where Conditions (Update / Delete)

Define which rows to target. Each condition consists of:

  1. Column - Select from available table columns
  2. Operator - Comparison operator
  3. Value - The comparison value (supports {{variable}} syntax)

Operators

Operator Description
= Equal to (default)
Not equal to
> Greater than
< Less than
Greater than or equal to
Less than or equal to
Contains Contains the value
Is Empty Field is empty
Is Not Empty Field is not empty

Match Columns (Upsert)

For Upsert operations, select one or more columns used to detect existing rows. If a match is found, the row is updated; otherwise, a new row is inserted.

Options

Option Type Default Description
Return inserted/updated row Toggle On Returns the affected row data in the output variable
Embed immediately Toggle Off Blocks execution until embedding completes

Example: Insert a New Record

Datasource: users
Operation: Insert
Column Mapping:
  name → {{form_data.name}}
  email → {{form_data.email}}
  role → "member"
  created_at → {{current_time}}
Output Variable: writeResult

Example: Update Existing Record

Datasource: orders
Operation: Update
Where: order_id = {{order_id}}
Column Mapping:
  status → "completed"
  completed_at → {{current_time}}
Output Variable: updateResult

Example: Upsert (Insert or Update)

Datasource: user_preferences
Operation: Upsert
Match Columns: user_id
Column Mapping:
  user_id → {{user.id}}
  theme → {{selected_theme}}
  language → {{selected_language}}
Output Variable: upsertResult

Example: Delete Records

Datasource: temp_sessions
Operation: Delete
Where: created_at < {{expiry_date}}
Output Variable: deleteResult

Best Practices

  • Always use Where conditions for Update and Delete to avoid affecting all rows
  • Use Upsert when you're unsure if a record already exists
  • Enable "Return inserted/updated row" when you need the result in downstream nodes
  • Use descriptive output variable names to track which operation produced the data
AI AssistantPowered by Ubex
Beta
Ask me anything about Ubex workflows, nodes, or the API.