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:| Part | Description |
|---|---|
| Action | What to do when the rule matches: INCLUDE (anchor the file) or EXCLUDE (skip the file). |
| Operator | How to combine multiple conditions within the rule: AND (all conditions must match) or OR (any condition must match). |
| Conditions | One or more conditions that the file must satisfy. |
Conditions
Each condition targets one field of the file and applies an operator to a value.| Field | Available Operators | Example Value | Description |
|---|---|---|---|
extension | equals | pdf | File extension, without the leading dot. Case-insensitive. |
prefix | starts_with, equals | documents/reports/ | The file path or key prefix (useful for S3 prefixes or folder paths). |
suffix | ends_with, equals | _final | A suffix in the filename (excluding extension). |
size | less_than, greater_than | 1048576 | File size in bytes. |
filename_contains | contains | invoice | A substring present anywhere in the filename (excluding path). |
How Rules Are Evaluated
- When a new file is detected, all rules on the connector are evaluated in order.
- The first matching rule determines the outcome (
INCLUDEorEXCLUDE). - 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
EXCLUDE rule for all other files.
To strictly anchor only PDFs, add:
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:- Open the connector.
- Go to the Rules tab.
- Click Add Rule to create a new rule.
- Set the action, operator, and add one or more conditions.
- 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

