Using Tables in Workflows
Tables can be manipulated using workflow actions. The Table related actions are listed under the Tables collection in the actions explorer.
Add a Record
There are two ways to Add a Record to a table
Add a record to a table by manually entering the table field name and the table field value.
Parameter | Description |
---|---|
Table | The name of the table. |
Record | Data of record, manually enter the field name and field value. |
Add a record to a table by manually entering the table field name and the table field value.
Parameter | Description |
---|---|
Table | The name of the table. |
Record | Data of record, manually enter the field name and field value. |
Records can be added by inputting values in JSON format. Bulk creation is also supported, allowing the input of a list of JSON objects.
Parameter | Description |
---|---|
Table | The name of the table. |
Record | Data of record, a JSON format containing Key : Value pairs. Can also be a list of JSON objects. |
Create or Update Record
There are two ways to Create or Update a Record in a table.
Create or Update an entire Record in a table by selecting the entire record option.
Parameter | Description |
---|---|
Table | The name of the table. |
Create or Update Condition | Set the condition for deciding weather to create or update the selected record. |
Record Data Format | Entire Record |
Record | The value of the record you want to create or update |
NOTE
Please note that if you leave any fields empty in the Create or Update Record action, the existing values in the table will remain unchanged.
INFO
In the below example, the Number
record field is updated.
Create or Update an entire Record in a table by selecting the entire record option.
Parameter | Description |
---|---|
Table | The name of the table. |
Create or Update Condition | Set the condition for deciding weather to create or update the selected record. |
Record Data Format | Entire Record |
Record | The value of the record you want to create or update |
NOTE
Please note that if you leave any fields empty in the Create or Update Record action, the existing values in the table will remain unchanged.
INFO
In the below example, the Number
record field is updated.
Create or Update a Record in a table by entering values in JSON format.
Parameter | Description |
---|---|
Table | The name of the table. |
Create or Update Condition | Set the condition for deciding weather to create or update the selected record. |
Record Data Format | JSON |
Record | The value of the record you want to create or update in JSON format |
INFO
In the below example, the Admin
record field is updated.
Get a Record
There are three different ways to Get record(s)
from a table
Get a Record from a table by using a condition
. All records that match the condition will be returned.
Parameter | Description |
---|---|
Query Method | The query method to get records |
Table | The table you want to get records from. |
Fields | Table Fields. |
Condition | Condition that compares two table field values. |
Output Format | The format of the output the records are returned- Table, JSON or CSV . |
Limit (optional) | Limit the amount of records returned by the query. |
Offset (optional) | Choose the offset from the data to start querying the table from. |
Order By (optional) | Choose what field to order the results by. |
Sort (optional) | Sort the records by ascending or descending order. |
Include Query Metadata In Output (optional) | Check the box to include Query Metadata in the Output. |
All Pages (optional) | Check the box to return all data in the table(this setting invalidates the Limit and Offset fields.) |
Get a Record from a table by using a condition
. All records that match the condition will be returned.
Parameter | Description |
---|---|
Query Method | The query method to get records |
Table | The table you want to get records from. |
Fields | Table Fields. |
Condition | Condition that compares two table field values. |
Output Format | The format of the output the records are returned- Table, JSON or CSV . |
Limit (optional) | Limit the amount of records returned by the query. |
Offset (optional) | Choose the offset from the data to start querying the table from. |
Order By (optional) | Choose what field to order the results by. |
Sort (optional) | Sort the records by ascending or descending order. |
Include Query Metadata In Output (optional) | Check the box to include Query Metadata in the Output. |
All Pages (optional) | Check the box to return all data in the table(this setting invalidates the Limit and Offset fields.) |
Get Record(s)
by querying a table for records using the RQL
query method.
Parameter | Description |
---|---|
Query Method | The query method to get records |
Table | The table you want to get records from. |
RQL Query | The RQL query to run against the table. |
Condition | Condition that compares two table field values. |
Output Format | The format of the output the records are returned- Table, JSON or CSV . |
Limit (optional) | Limit the amount of records returned by the query. |
Offset (optional) | Choose the offset from the data to start querying the table from. |
Include Query Metadata In Output (optional) | Check the box to include Query Metadata in the Output. |
All Pages (optional) | Check the box to return all data in the table(this setting invalidates the Limit and Offset fields.) |
-
Get a Record by using RQL format lets you query a table for record(s) using the
Select
,Filter
orSort
actions on the tables’ collection.- Select - Specify which fields to return by specifying fields name using the Select option.
- Filter - specify which records to return using the Filter option - only records that is the
Is Admin
value is false. - Sort - Define the sorting criteria by designating the relevant field and order. For ascending order, use
+
before the field name; for descending order, use-
instead. For Example:"sort": [+"updated_at"]
RQL Format Example:
Get Record(s)
by querying a table for records using the SQL
query method.
Parameter | Description |
---|---|
Query Method | The query method to get records |
Table | The table you want to get records from. |
SQL Query | The SQL query to run against the table. |
Condition | Condition that compares two table field values. |
Output Format | The format of the output the records are returned- Table, JSON or CSV . |
Limit (optional) | Limit the amount of records returned by the query. |
Offset (optional) | Choose the offset from the data to start querying the table from. |
Include Query Metadata In Output (optional) | Check the box to include Query Metadata in the Output. |
All Pages (optional) | Check the box to return all data in the table(this setting invalidates the Limit and Offset fields.) |
SQL Format Example:
Delete a Record
There are two ways to Delete a Record
from a table:
Delete a record from a table by the Record ID
.
Parameter | Description |
---|---|
Table Name | The name of the table. |
Record ID | The record unique identifier. Can be obtained via the Select action. |
Delete a record from a table by the Record ID
.
Parameter | Description |
---|---|
Table Name | The name of the table. |
Record ID | The record unique identifier. Can be obtained via the Select action. |
Delete a record from a table only when a certain condition
is met.
Parameter | Description |
---|---|
Table Name | The name of the table. |
Condition (Optional) | Condition that compares two table field values. |
Create a Table
Create a table based on a schema.
Parameters:
Parameter | Description |
---|---|
Table Name | The name of the table. |
Table Schema | The schema of the table in JSON format.For more information, see the Copy table schema. |
Skip | Skips table creation if table with the same name already exists. |
Does Table Exist
Check if a table with a given display name exists.
When using the Create Table action, and the inserted name of a Table already exists, the Create Table action will fail.
In order to prevent this scenario, you are recommended to use the Does Table Exist
Action before the Create Table step.
Parameters:
Parameter | Description |
---|---|
Table Name | The name of the table. |
Search By | Search by name , display name or both. Default is display name . |
Clear a Table
Clear all table records.
Parameters:
Parameter | Description |
---|---|
Table Name | The name of the table. |
Delete a Table
Deletes the entire table.
Parameters:
Parameter | Description |
---|---|
Table Name | The name of the table. |
Copy Table Schema
For each table that was created, there is a table schema.
- Click the 3 dots menu of the table > Copy table scheme.
Example of a Table Schema:
On New Record - Event-Based Trigger
The New Table Record option is an Event-Based Trigger that executes your Workflow every time a new record is added to your table.
NOTE
Please note that the “Table Name” in the trigger setup must exactly match the name you assigned to your table.