Search Company Data
Use this action when you need a list of matching records instead of one specific record.
Best for
- Looking up contacts, services, events, or workflows by filters
- Finding the newest or oldest matching record
- Driving later steps based on whether matches exist
Main fields
| Field | What it does |
|---|---|
| Dynadata Item Type | Chooses what kind of records to search |
| Filter CEL Mongo Filter | Defines which records should match. Do not use $regex here — it is rejected with a 400 error; use Search + Search fields for partial-text matching |
| Search | Case-insensitive substring ("contains") term, matched literally against the fields listed in Search fields |
| Search fields | The field names the Search term is matched against, e.g. ["name","email"] |
| Sort CEL Sort Object | Controls record order with a single-field map or ordered [field, direction] pairs |
| Limit | Controls how many records to return. If you leave it empty, the default is 50 |
| Skip | Lets you page through results |
Sort order
For one field, a map is accepted:
{'createdAt': -1}
For multiple fields, use an ordered list of pairs. The first pair has the
highest priority: this example sorts by descending priority, then ascending
createdAt when priorities match.
[['priority', -1], ['createdAt', 1]]
1 means ascending and -1 means descending. CEL maps are unordered, so a
compound map sort is rejected. Supply at most 32 fields, with no duplicate
field names; malformed pairs are rejected.
What later steps can use
The matching records are available at:
workflow.step(N).dataworkflow.step(N).data[0]
Tips
- Use sorting together with a low limit when you only need the first relevant match.
- Check whether
workflow.step(N).datais empty before you assume a result exists. - This is often the right first step before a later update or notification action.
- For partial-text / "contains" matching, use Search + Search fields rather than a
$regexfilter (which is rejected with a 400 error).