Knowledge Base Metadata
Filter when searching a Knowledge Base
Metadata is additional information attached to your Knowledge Base files that you can filter on when searching, similar to filtering columns in a spreadsheet.
Types of Metadata
Standard Metadata
Automatically inherited from the source (file name, source URL, upload date, etc.). Standard metadata is read-only. To update it, make changes at the source and re-sync.
Custom Metadata
Tag Knowledge Base files with your own key-value pairs to organize and filter content by dimensions like Region, Product, Audience, or Content Type.
Custom metadata lets you filter Knowledge Base files directly in Workflow steps, with no need to import into a Grid just to tag and filter content.
Adding Metadata
Custom Metadata (UI)
Click any file in your Knowledge Base to open its details
In the Custom Metadata section, click Add
Enter a Key (e.g., "country") and Value (e.g., "France")
Click Save Changes
CSV / Google Sheets
When uploading a CSV or Google Sheet, all columns are stored as metadata. You can choose which columns are searchable. The rest are still returned as metadata but can only be used for filtering.
Other Methods
API - Use the Knowledge Bases API "Update" endpoint
Workflow - Use the "Knowledge Base Write" Step
Filtering with Metadata
Use metadata filters in your Workflow Knowledge Base steps to scope your search results.
Example: If you have case studies tagged with a country key, add a filter in your Search Knowledge Base or Get Knowledge Base File step where country equals "Spain" to retrieve only Spanish case studies.
For detailed filtering examples, see the Knowledge Base Search Step documentation.
Filter Operators (Code Editor)
For complex filters, use MongoDB query operators:
$eq
Equal to
$ne
Not equal to
$gt / $gte
Greater than / Greater than or equal
$lt / $lte
Less than / Less than or equal
$in / $nin
In array / Not in array
Filtering via API
You can also filter using the Knowledge Bases API "Search" endpoint.
Best Practices
Use consistent keys - Standardize key names (always "country", not sometimes "region") and value formats (always "United States", not "US" or "USA")
Plan your strategy - Decide what dimensions you need to filter by before tagging content
Custom metadata vs. Grids - Use custom metadata for file-level tagging; use Grids for row-level tagging of structured data
Last updated
Was this helpful?