> ## Documentation Index
> Fetch the complete documentation index at: https://clearskies.cc/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Find & filter records

> Pull the accounts, contacts, deals, and more that a workflow should act on, and gate a run so it only continues when your conditions are met.

A workflow starts with one thing — the meeting, the record, the schedule that triggered it. Two steps shape what happens next: **Find Records** pulls in the related data a step needs, and a **Filter** decides whether the run should continue at all.

## Find Records

The **Find Records** step reads CRM data mid-run and hands it to the steps that follow — the account a contact belongs to, the open deals on it, the people on the buying committee. It's read-only: it gathers data but doesn't take an action on its own.

You can search any of seven object types: **Account**, **Contact**, **Employee**, **Deal**, **Event**, **Meeting**, or **Email**.

### Two ways to say what you want

| Option    | Best for                                                                             |
| :-------- | :----------------------------------------------------------------------------------- |
| **AI**    | Records that are easier to describe than to define, or fuzzy / intent-based criteria |
| **Logic** | Exact, predictable conditions — a field equals a value, or a direct lookup by ID     |

With the **AI** option you describe the records you want in plain language; with the **Logic** option you build precise field conditions. Reference variables from earlier steps so the same step resolves to live values each run:

```text theme={null}
open opportunities on {{meeting.accounts.name}} over $50k
closing this quarter with no activity in the last 14 days
```

### Build it

1. Add a **Find Records** step anywhere after the trigger.
2. Choose the **object type** to search.
3. Pick **AI** and describe the records, or **Logic** and set the conditions.
4. Set how many records to return — between **1 and 100**.

### Using the results

The step makes its matches available to every step after it. Downstream steps can use:

* the **first matched record** — what the next step reads by default,
* **all matched records**, up to your limit — feed these into a [loop](/docs/workflows/loops) to act on each, and
* whether **any record was found** at all.

Because you can pass one find's results into another, you can follow a relationship — find a contact, then find that contact's account, or find target accounts, then find the open deals on them. If nothing matches, the step reports no record found and the workflow keeps running; it doesn't error.

## Filter

A **Filter** gates a run: if its condition passes, the workflow continues; if it fails, the run stops. Use it to keep a workflow to the events you actually care about.

There are two ways to write the condition — set one, not both:

* **AI filter** — a plain-English condition evaluated at run time, with no field names to look up (for example, "Only proceed if this is an external customer call"). This is the reliable default.
* **Structured filter** — a precise, deterministic condition on a field, operator, and value. Confirm a structured filter with a test run before publishing.

A filter is optional in most workflows — but a [meeting trigger](/docs/workflows/triggers) **requires** a filter as its first step, since every calendar event counts as a meeting.

## In practice

On a weekly schedule, **Find Records** pulls every open deal with no activity in two weeks, and a **loop** sends each owner a nudge. On a post-call workflow, a **Filter** keeps the run to external customer calls before an agent writes the recap.

## Related

* [Triggers](/docs/workflows/triggers) — meeting triggers require a filter as the first step
* [Loops](/docs/workflows/loops) — act on every record a find step returned
* [Run an agent](/docs/workflows/actions/run-an-agent) — reason over the records you found

Questions? We're here to help at [support@clearskies.cc](mailto:support@clearskies.cc)
