Skip to main content

What are Filtering Rules?

Filtering rules let you define precisely which files a connector should anchor. Without rules, a connector anchors every new file detected in the storage. Rules allow you to restrict anchoring to relevant files only — for example, only PDFs, or everything except temporary files. Rules are configured per connector and evaluated each time a new file is detected.

Default Behavior

If no filtering rules are configured on a connector, all files are anchored without restriction.

Rule Structure

Each rule has three parts:

Conditions

Each condition targets one field of the file and applies an operator to a value.

How Rules Are Evaluated

  1. When a new file is detected, all rules on the connector are evaluated in order.
  2. The first matching rule determines the outcome (INCLUDE or EXCLUDE).
  3. If no rule matches, the file is anchored by default (same as if no rules were configured).
Rules are evaluated top to bottom. Order matters when you have overlapping conditions. Place more specific rules before more general ones.

Examples

Anchor only PDFs

Any file that is not a PDF will not be anchored, because no rule matches it and the default action applies — unless you add an explicit EXCLUDE rule for all other files. To strictly anchor only PDFs, add:
Alternatively, structure it as a single INCLUDE rule and rely on the default-pass-through not applying since no INCLUDE rule matches other file types.

Exclude temporary files

Exclude files whose name contains common temporary indicators:

Include only files above 1 MB

Anchor invoices from a specific folder (S3)

Exclude large video files


Configuring Rules in the Dashboard

Rules are managed on the connector detail page in app.rootkey.ai:
  1. Open the connector.
  2. Go to the Rules tab.
  3. Click Add Rule to create a new rule.
  4. Set the action, operator, and add one or more conditions.
  5. Save. Rules take effect immediately for new files.
Changes to rules do not retroactively affect files that were already processed. Only new files detected after the rule change are evaluated against the updated rule set.

→ Back to Connectors Overview