# Query Collection Data

This action will extract one or more records from a give collection.

<figure><img src="/files/aDqY44GYCu8qYPe8KGvG" alt=""><figcaption></figcaption></figure>

### Settings

The action uses the following settings:

| Setting    | Description                                                                          | [Parsed](/actions-and-operations/dynamic-parsing.md) |
| ---------- | ------------------------------------------------------------------------------------ | ---------------------------------------------------- |
| Bot        | The bot that is providing collection access. The current bot is selected by default. | :no\_entry:                                          |
| Collection | The collection to be used for the action                                             | :no\_entry:                                          |

### Remarks

This action does not directly extract any data but instead create a record cursor that can extract a single record on each read using a [Move To Next Record](/actions-and-operations/database/move-to-next-record.md) action. The flow of a complete loop on multiple records may look similar to this:

![](/files/-M_bkbmwJ6tm5luaXS4P)

If no [Field Filter Operation](/actions-and-operations/database/set-field-filter-value.md) is used, this action will open a record cursor for all of the records of the selected collection.

### Trigger

This action automatically triggers all of the [Set Field Filter ](/actions-and-operations/database/set-field-filter-value.md)operations that are attached.

### Variables

This action has no variables.

### Availability

Channel specific availability follows the table below:

| Channel          | Availability     |
| ---------------- | ---------------- |
| Facebook         | Fully Available. |
| WhatsApp         | Fully Available. |
| SMS              | Fully Available. |
| Telegram         | Fully Available. |
| Web              | Fully Available. |
| Alexa            | Fully Available. |
| Google Assistant | Fully Available. |
| Slack            | Fully Available. |
| API              | Fully Available. |

This action requires an active [Database ](broken://pages/-LdYpe93z-UqrvvQdX7V)package.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.xenioo.com/actions-and-operations/database/query-collection-data.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
