Data operation actions allow you to interact with databases in your workflows. These actions support SQL databases (PostgreSQL, MySQL, SQLite) and MongoDB through configured integrations.
Before using data operations, ensure you have a database integration configured. See Configuration Reference for setup details.
fetch
Retrieves data from a database table using filters.
Integration ID
The database integration to query against.
YAML Key integrationIDType string Required Yes
Table
The database table or collection name to query.
YAML Key tableType string Required Yes
Filters
Query filters to narrow down results. See Filter Syntax for available operators.
YAML Key filtersType array Required No
Single
Return a single result object instead of an array.
YAML Key singleType boolean Required No Default false
Fail If Empty
Treat no results as a failure, routing to the fail step.
YAML Key failIfEmptyType boolean Required No Default true
Example
actions:
get_user:
type: fetch
config:
integrationID: my_database
table: users
filters:
- field: email
operator: eq
value: "{{ param \"email\" }}"
single: true
failIfEmpty: true
next: response.success
fail: response.not_found
store
Stores a new record in a database table.
Integration ID
The database integration to store data in.
YAML Key integrationIDType string Required Yes
Table
The database table or collection name to insert into.
YAML Key tableType string Required Yes
Fields
Data fields to store as key-value pairs.
YAML Key fieldsType map Required Yes
Datasource Options
Additional datasource-specific options.
YAML Key datasourceOptionsType map Required No
Example
actions:
create_user:
type: store
config:
integrationID: my_database
table: users
fields:
email: "{{ param \"email\" }}"
name: "{{ param \"name\" }}"
password: "{{ .hash_password }}"
created_at: "{{ now }}"
next: response.created
fail: response.error
If no id field is provided, a UUID will be automatically generated.
update
Updates existing records in a database table.
Integration ID
The database integration containing the records.
YAML Key integrationIDType string Required Yes
Table
The database table or collection name to update.
YAML Key tableType string Required Yes
Filters
Filters to identify which records to update. See Filter Syntax for available operators.
YAML Key filtersType array Required Yes
Fields
Fields to update with their new values.
YAML Key fieldsType map Required Yes
Datasource Options
Additional datasource-specific options.
YAML Key datasourceOptionsType map Required No
Example
actions:
update_user:
type: update
config:
integrationID: my_database
table: users
filters:
- field: id
operator: eq
value: "{{ param \"user_id\" }}"
fields:
name: "{{ param \"name\" }}"
updated_at: "{{ now }}"
next: response.success
fail: response.error
delete
Deletes records from a database table.
Integration ID
The database integration containing the records.
YAML Key integrationIDType string Required Yes
Table
The database table or collection name to delete from.
YAML Key tableType string Required Yes
Filters
Filters to identify which records to delete. See Filter Syntax for available operators.
YAML Key filtersType array Required Yes
Datasource Options
Additional datasource-specific options.
YAML Key datasourceOptionsType map Required No
Example
actions:
delete_user:
type: delete
config:
integrationID: my_database
table: users
filters:
- field: id
operator: eq
value: "{{ param \"user_id\" }}"
next: response.success
fail: response.error
mongoquery
Executes native MongoDB queries with filter and projection support.
Integration ID
The MongoDB integration to query against.
YAML Key integrationIDType string Required Yes
Collection
The MongoDB collection name to query.
YAML Key collectionType string Required Yes
Filter Query
MongoDB filter query in JSON format.
YAML Key filterQueryType string Required Yes
Projection
MongoDB projection query in JSON format to select specific fields.
YAML Key projectionType string Required No
Fail If Empty
Treat no results as a failure, routing to the fail step.
YAML Key failIfEmptyType boolean Required No Default true
Example
actions:
query_users:
type: mongoquery
config:
integrationID: my_mongodb
collection: users
filterQuery: '{"status": "active", "age": {"$gte": 18}}'
projection: '{"name": 1, "email": 1, "_id": 0}'
failIfEmpty: false
next: response.success
Dynamic filter example:
actions:
search_users:
type: mongoquery
config:
integrationID: my_mongodb
collection: users
filterQuery: '{"email": "{{ param "email" | stringescape }}"}'
next: response.success
Use the stringescape template function when inserting user input into JSON queries to prevent injection attacks.
Filter Syntax
The fetch, update, and delete actions use a common filter syntax:
filters:
- field: field_name
operator: eq
value: "comparison_value"
Available Operators
Operator Description eqEqual to neNot equal to gtGreater than gteGreater than or equal ltLess than lteLess than or equal inValue in array ninValue not in array
Multiple Filters Example
filters:
- field: status
operator: eq
value: active
- field: age
operator: gte
value: "18"
- field: role
operator: in
value:
- admin
- moderator
Next Steps
Actions Overview Learn about action structure and chaining.
Vector Operations Store and query vector embeddings.
Authentication Secure your APIs with JWT and authentication.
Secrets Management Securely store database credentials.