SQL query
Last updated
Action — Executes a read-only SQL query against a connected database. Only SELECT queries are permitted.
Queries a connected database mid-chat and stores the result in a variable for use by downstream actions.
To read live data directly from your own database during a chat — looking up a record or checking a status — when the data is in a database rather than behind an API.
Database connector
The connected database to query. Connections must first be verified in Database connections settings.
Query
The SQL SELECT statement, entered as a chat script expression. Only read queries are allowed.
Timeout after (seconds)
The maximum query execution time before the action times out.
Resulting variable
The chat variable that stores the query result. Must start with a letter and contain only letters, numbers, or underscores.
Press Save to confirm edits.
The action branches into Success, Error, and Timeout. Nest subsequent actions under each as needed.
Last updated
SQL query
• Connector: complaints_db
• Query: SELECT status FROM complaints WHERE ref = {complaint_ref}
• Result: complaint_status