Used to query and retrieve data records from a collection that meet specific conditions.
You can configure it to query a single record or multiple records. The query result can be used as a variable in subsequent nodes. When querying multiple records, the result is an array. When the query result is empty, you can choose whether to continue executing subsequent nodes.
In the workflow configuration interface, click the plus ("+") button in the flow to add a "Query Data" node:


Select the collection from which to query data.
The result type is divided into "Single Record" and "Multiple Records":
null.Similar to the filter conditions in a regular collection query, you can use the workflow's context variables.
When querying one or more records, you can use sorting rules to control the desired result. For example, to query the latest record, you can sort by the "Creation Time" field in descending order.
When the result set might be very large, you can use pagination to control the number of query results. For example, to query the latest 10 records, you can sort by the "Creation Time" field in descending order, and then set the pagination to 1 page with 10 records.
In single record mode, if no data meets the conditions, the query result will be null. In multiple records mode, it will be an empty array ([]). You can choose whether to check "Exit workflow when query result is empty". If checked, and the query result is empty, subsequent nodes will not be executed, and the workflow will exit early with a failed status.