Find All Collection Documents (Lookup) v1.0.0 Help
Retrieves documents from a specified Lookup collection.
How can I use the Step?
Use this Step to fetch documents from a Lookup collection based on specific search criteria or sorting parameters. It's handy for data analysis, content management, and integrating Lookup data into other processes or workflows.
How does the Step work?
The Step takes the collection name and search parameters as input. It constructs a query based on these parameters and sends it to the Lookup system. The response contains the documents that match the query, sorted and paginated according to the provided settings.
Prerequisites
- For custom authentication, ensure proper cross-account settings with
Super Admin
permission level for account and Flow and the necessary account ID or authentication token.
Input settings
- Collection: a Lookup collection whose documents you wish to find. This field is required.
Advanced settings
Configure the search or sorting parameters for retrieval:
- Query - Sorting: option to search for documents using query or sorting with corresponding parameters:
- Query: search query. If it's empty, the Step fetches all documents.
- Search mode: searching approach, 'bm25' for full-text search or 'vector' for vector similarity search. Defaults to 'bm25'.
- Order property: the property to order the documents by, such as
description
,name
,status
,id,
createdAt
, orupdatedAt
. - Order direction: the ordering direction, either
ascending
ordescending
.
- Limit: the number of documents to display per page. Defaults to 10.
- Offset: the number of documents to skip in the search results. Defaults to 0.
Cross-account settings
To access the Lookup service of another Onereach account, take these steps:
- Enable Use custom authentication token.
- Choose one of the following access types:
Authentication token
Account ID
- Enter the token or account ID (depending on the chosen access type).
Merge field settings
The Step returns the result as a JSON object and stores it under the Merge field name. To learn more about Merge fields and how to work with them, see our Merge fields guide.
Output example
The output object has the following properties:
items
: [array] an array of objects representing the documents in the collection. Each object has the following properties:id
: [string] the id of the document.accountId
: [string] the id of the account that the document belongs to.name
: [string] the name of the document.description
: [string] the description of the document.
total
: [number] the total number of documents in the collection.
Example:
{
"items": [
{
"id": "e5f6g7h8-uuid",
"accountId": "i9j0k1l2-uuid",
"name": "Sample Document",
"description": "A sample document"
}
],
"total": 1
}
{
"items": [
{
"id": "e5f6g7h8-uuid",
"accountId": "i9j0k1l2-uuid",
"name": "Sample Document",
"description": "A sample document"
}
],
"total": 1
}
Error handling
By default, the Step handles errors using a separate exit. So if any error occurs during the Step execution, the Flow proceeds down the error
exit. For more information, see Error and timeout handling.
Reporting
The Step automatically generates Reporting events during its execution, allowing for real-time tracking and analysis of its performance and user interactions. To learn more, see Reporting events
Service dependencies
- flow builder - v2.28.3
- event-manager - v2.3.0
- deployer - v2.6.0
- library v2.11.3
- studio v2.64.1
Release notes
v1.0.0
- Initial release