Strapi Bot Lookup (Stage) icon

Strapi Bot Lookup (Stage)

Fetch a single bot by ID or search/list bots with filters, populate, pagination, sort, and field selection

List / Search

AI-generated

Summary

List or search bots in a Strapi collection using filters, pagination, sorting, and field selection.

Inputs

  • operation — Select operation mode: 'getById' to fetch a bot by ID or 'List / Search' to retrieve bots with filters.
  • collectionPath — REST path for the bots collection (e.g., '/api/bots'); can be overridden per workflow.
  • botId — Bot ID to look up when operation is 'getById'; can be supplied from input data.
  • continueOnNotFound — If true, return a not‑found object instead of throwing when a bot is not found.
  • populateGetById — Relations to populate in the single‑record response (e.g., 'funnel', 'geos').
  • filters — Array of filter objects (field, operator, value) to narrow the list results.
  • populate — Relations to include in the list response (e.g., 'funnel', 'geos').
  • paginationMode — Choose 'page' or 'offset' pagination style.
  • page — Page number when paginationMode is 'page'.
  • pageSize — Number of items per page when paginationMode is 'page'.
  • start — Offset to start from when paginationMode is 'offset'.
  • limit — Maximum items to return when paginationMode is 'offset'.
  • withCount — Include total count in the pagination metadata.
  • fetchAll — When using 'page' mode, fetch all pages and concatenate results.
  • sortField — Primary field to sort results by.
  • sortOrder — Sort direction: 'asc' or 'desc'.
  • additionalSorts — Additional sort definitions (field and order) applied after the primary sort.
  • fields — List of bot fields to return; empty returns all fields.

Output shape

Array of result objects; each object contains a json property with the bot data (or error info) and a pairedItem property indicating the input item index.

Results may be empty; pagination metadata appears in meta when fetchAll is false; handled errors are returned as JSON with an error field.

Examples

Example 1: Lookup a specific bot by its ID from a workflow input.

Set operation to 'getById', provide botId, optionally enable populate and continueOnNotFound.

Example 2: Retrieve a paginated list of bots filtered by external ID.

Set operation to 'List / Search', define a filter on field 'external_id' with operator '$eq' and value '123', choose pagination mode 'page' with pageSize 10.

Example 3: Fetch all bot pages and return combined results.

Set operation to 'List / Search', enable 'fetchAll', optionally set 'withCount' true; no pagination parameters needed.

Links

Discussion