Skip to main content

Ontologie

Queries the workspace's ontology graph. Five operations available: query (list by type), lookup (search by ID), traverse (follow relations), search (text search), aggregate (count/sum).

Common parameters

ParameterTypeRequiredVariableDescription
operationchoice (query, lookup, traverse, search, aggregate)YesNoType of operation to perform on the ontology.
limitnumberNoYesMaximum number of results to return. (Default: 50, min 1, max 1000)
outputFieldsarrayNoNoList of fields to include in the results. Empty = all fields.
outputVariabletextNoNoOutput variable name to reference results in subsequent blocks.
allSpacesbooleanNoNoSearch across all spaces in the workspace instead of the current space. (Default: false)
espaceIdsarrayNoNoSpecific spaces to query (when allSpaces is disabled).

Parameters marked Variable = Yes accept the {{blockName.field}} syntax.

Parameters by operation

query — Query

Search entities by type and filters.

ParameterTypeRequiredVariableDescription
entityTypetextYesYesEntity type to search for (e.g. Client, Product).
filtersarrayNoNoFilter conditions (field, operator, value). Combined with AND/OR.
includeRelationsbooleanNoNoInclude direct relations of found entities. (Default: false)

Parameters marked Variable = Yes accept the {{blockName.field}} syntax.

lookup — Lookup

Look up an entity by ID or unique key.

ParameterTypeRequiredVariableDescription
entityTypetextYesYesEntity type to search for.
filtersarrayNoNoFilters to identify the entity (e.g. id equals "abc").

Parameters marked Variable = Yes accept the {{blockName.field}} syntax.

traverse — Traversal

Traverse graph relationships from an entity type.

ParameterTypeRequiredVariableDescription
entityTypetextYesYesStarting entity type for the traversal.
filtersarrayNoNoFilters on the starting entities.
traversal.depthnumberYesNoTraversal depth (number of relation levels to follow). (Default: 1, min 1, max 10)
traversal.directionchoice (outgoing, incoming, both)YesNoTraversal direction: outgoing, incoming, or both. (Default: "outgoing")
traversal.edgeTypesarrayNoNoRelation types to follow. Empty = all relations.
includeRelationsbooleanNoNoInclude relations of found entities in results. (Default: false)

Parameters marked Variable = Yes accept the {{blockName.field}} syntax.

Semantic similarity search on entity content.

ParameterTypeRequiredVariableDescription
searchQuerydynamic valueYesYesSearch text or dynamic variable. The engine compares against embeddings.

Parameters marked Variable = Yes accept the {{blockName.field}} syntax.

aggregate — Aggregation

Statistical calculations on entities (count, sum, average, min, max).

ParameterTypeRequiredVariableDescription
entityTypetextYesYesEntity type to aggregate on.
filtersarrayNoNoFilters to restrict entities before aggregation.
aggregate.operationchoice (count, sum, avg, min, max)YesNoType of calculation to perform.
aggregate.fieldtextNoYesField to calculate on (required for sum, avg, min, max; optional for count).
aggregate.outputFieldtextNoNoOutput field name for the result. Defaults to the operation name.

Parameters marked Variable = Yes accept the {{blockName.field}} syntax.

Output

Output variable : ontologyData

{
"success": false,
"operation": "...",
"entityType": "...",
"items": [],
"totalCount": 0,
"returnedCount": 0
}

Example

List all entities of type Lead.

Input :

{"operation": "query", "entityType": "Lead"}

Output :

{"success": true, "operation": "query", "entityType": "Lead", "items": [{"id": "c9cb...", "name": "Lead", "type": "ObjectType", "properties": {}}], "totalCount": 15, "returnedCount": 15}

Common errors

ProblemSolution
The result is emptyCheck the exact entity type name. Valid operations are: query, lookup, traverse, search, aggregate.
Tip

Use {{ontologyData.items}} for the array (not {{ontologyData.results}}). In lookup mode, the field is {{ontologyData.item}} (single object) and {{ontologyData.found}} (boolean).