DocsNodesDataTables Node

Tables Node(Beta)

Loading node sections...

Overview

The Tables Node is a structured data management component that performs various operations on relational data tables, including querying, inserting, updating, and deleting records. This node provides full CRUD control over your Lamatic Data Tables directly within a flow.

The Tables Node uses SQLite as its underlying database engine.

extract-file.png

Node Type Information

TypeDescriptionStatus
Batch TriggerStarts the flow on a schedule or batch event. Ideal for periodic data processing.❌ False
Event TriggerStarts the flow based on external events (e.g., webhook, user interaction).❌ False
ActionExecutes a task or logic as part of the flow (e.g., API call, transformation).✅ True

This node is an **Action** node that performs read and write operations on structured data tables for data management and manipulation.

Features

Key Functionalities
  1. Multi-Action Capability: Choose between Select, Insert, Update, Delete, or raw SQL Query operations.
  2. Visual Where Clause Builder: Add filter conditions without writing SQL using the condition builder.
  3. Flexible Column Selection: Choose all columns (SELECT *) or limit to specific fields.
  4. Sorting & Pagination: Control result order with Order By, and paginate using Limit and Offset.
  5. Raw SQL Support: Run custom SQL queries directly for advanced use cases.
Benefits
  1. Simplicity: Manage structured data without leaving the flow editor.
  2. Control: Fine-tune reads and writes with filters, ordering, and pagination.
  3. Flexibility: Use the visual builder for common operations or raw SQL for complex queries.
  4. Integration: Combine with AI nodes to build data-driven pipelines and automations.

What Can I Build?

  • Store user inputs or API responses into a table from a flow.
  • Query records to personalise AI responses with real data.
  • Update or delete table records based on flow logic or conditions.
  • Build admin-style data workflows with full CRUD capability.

Setup

1. Select Action

Retrieves rows from a table based on optional column selection, filters, ordering, and pagination.

Configuration Reference

ParameterDescriptionRequiredExample Value
ActionThe action to perform on the table.YesSelect
TableThe target table to query.Yesusers
ColumnsColumns to return. Defaults to all (SELECT *).Noid, name, email
Where ClauseFilter conditions to narrow results. Add one or more conditions.Nostatus = 'active'
Order ByColumn(s) to sort results by, with direction (ASC/DESC).Nocreated_at DESC
LimitMaximum number of rows to return. Defaults to 10.No10
OffsetNumber of rows to skip before returning results. Defaults to 0.No0

Low-Code Example

nodeName: Tables
action: select
tableName: Tables
columns:
  - id
  - created_at
data: '{}'
where:
  conjunction: AND
  conditions:
    - column: id
      operator: '='
      value: '1'
orderBy:
  - column: ''
    order: ASC
limit: '10'
offset: '0'
query: SELECT * FROM your_table WHERE id = ?

Output

  • rows: An array of records matching the query criteria.
  • count: The number of records returned.
Example Output
{
  "rows": [
    { "id": 1, "name": "Alice", "email": "[email protected]" },
    { "id": 2, "name": "Bob", "email": "[email protected]" }
  ],
  "count": 2
}

2. Insert Action

Inserts one or more new records into the specified table.

Configuration Reference

ParameterDescriptionRequiredExample Value
ActionSet to Insert.YesInsert
DataThe record(s) to insert. Accepts a JSON object or array.Yes{{triggerNode_1.output.body}}
TableThe target table to insert into.Yesusers

Low-Code Example

nodeName: Tables
action: insert
tableName: Tables
columns:
  - id
  - created_at
data: '{"id": "{{triggerNode_1.output.id}}"}'
where:
  conjunction: AND
  conditions:
    - column: id
      operator: '='
      value: '1'
orderBy:
  - column: ''
    order: ASC
limit: '10'
offset: '0'
query: SELECT * FROM your_table WHERE id = ?

Output

  • insertedCount: Number of records successfully inserted.
  • message: A status message summarising the operation.
Example Output
{
  "insertedCount": 1,
  "message": "Record inserted successfully"
}

3. Update Action

Updates existing records in a table that match the specified where clause.

Configuration Reference

ParameterDescriptionRequiredExample Value
ActionSet to Update.YesUpdate
DataThe fields and values to update. Accepts a JSON object.Yes{{triggerNode_1.output.body}}
TableThe target table to update.Yesusers
Where ClauseFilter conditions to identify which records to update.Yesid = 1

Low-Code Example

nodeName: Tables
action: update
tableName: Tables
columns:
  - id
  - created_at
data: '{"id": "{{triggerNode_1.output.id}}"}'
where:
  conjunction: AND
  conditions:
    - column: id
      operator: '='
      value: '1'
orderBy:
  - column: ''
    order: ASC
limit: '10'
offset: '0'
query: SELECT * FROM your_table WHERE id = ?

Output

  • updatedCount: Number of records successfully updated.
  • message: A status message summarising the operation.
Example Output
{
  "updatedCount": 1,
  "message": "Record updated successfully"
}

4. Delete Action

Deletes records from a table that match the specified where clause.

Configuration Reference

ParameterDescriptionRequiredExample Value
ActionSet to Delete.YesDelete
TableThe target table to delete records from.Yesusers
Where ClauseFilter conditions to identify which records to delete.Yesid = 1

Low-Code Example

nodeName: Tables
action: delete
tableName: Tables
columns:
  - id
  - created_at
data: '{{triggerNode_1.output.sampleInput}}'
where:
  conjunction: AND
  conditions:
    - column: id
      operator: '='
      value: '1'
orderBy:
  - column: ''
    order: ASC
limit: '10'
offset: '0'
query: SELECT * FROM your_table WHERE id = ?

Output

  • deletedCount: Number of records successfully deleted.
  • message: A status message summarising the operation.
Example Output
{
  "deletedCount": 1,
  "message": "Record deleted successfully"
}

5. Query Action

Executes a raw SQL query for advanced or complex operations not covered by the visual builder.

Configuration Reference

ParameterDescriptionRequiredExample Value
ActionSet to Query.YesQuery
SQL QueryA raw SQL statement to execute. Use ? as a placeholder for values.YesSELECT * FROM your_table WHERE id = ?

Low-Code Example

nodeName: Tables
action: query
tableName: Tables
columns:
  - id
  - created_at
data: '{{triggerNode_1.output.sampleInput}}'
where:
  conjunction: AND
  conditions:
    - column: id
      operator: '='
      value: '1'
orderBy:
  - column: ''
    order: ASC
limit: '10'
offset: '0'
query: SELECT * FROM your_table WHERE id = 1

Output

  • rows: An array of records returned by the query.
  • count: The number of records returned.
Example Output
{
  "rows": [
    { "id": 1, "name": "Alice", "email": "[email protected]" }
  ],
  "count": 1
}

Troubleshooting

Common Issues

ProblemSolution
No table appears in listClick the refresh icon next to the Table field to reload available tables.
Where Clause not workingEnsure a table is selected first; conditions can only be added after selection.
Insert fails with no dataVerify the Data field contains a valid JSON object or array.
Query returns no resultsCheck your SQL syntax and confirm the table name and column names are correct.
Columns field greyed outSelect a table first; column selection is only available after table selection.

Was this page useful?

Subscribe to updates