Skills/Tables/Query records

Query records

Free

Retrieves records from a collection that match a field-value filter. Supports sorting by a field, limiting the number of results, and paginating with an offset.

Cost

Free

What it accepts

Set these inside the intent when you run it.

collectionrequired

Name of the collection to query.

whereoptional

Filter expression matching records by field values.

sortoptional

Field and direction to sort results by.

limitoptional

Maximum number of records to return.

offsetoptional

Number of records to skip before returning results.

What you get back

A list of matching records from the collection, each including its id and fields.

Run it

Run this sub-skill directly: pin it with operation and pass its inputs in the intent. (Omit operation and the Tables skill will route from your intent instead.)

curl -X POST "https://skill.askfaro.com/skills/tables/run" \
  -H "Authorization: Bearer $FARO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"intent":{"operation":"query","collection":"tasks","where":"{\"status\": \"active\"}","sort":"{\"due_date\": \"asc\"}","limit":10,"offset":20}}'

Example requests

  • Find all records in the products collection where category is electronics
  • Get the first 10 items from my tasks collection sorted by due date
  • List all contacts with status active