Sync Filters Configuration Guide
Learn how to configure sync filters to control which data gets synchronized from your source systems into your Onna collections.
Overview
Sync Filters are the mechanism used to control which data gets synchronized from your source systems into your Onna collections. They allow you to specify exactly what content to include or exclude during the collection process, enabling you to:
- Select specific users, folders, channels, or other entities
- Exclude unwanted content from synchronization
- Configure automatic inclusion of future content
- Fine-tune data collection based on your organization's needs
Common Sync Filter Fields
Most sync filters use these common fields:
Core Fields
| Field | Type | Description |
|---|---|---|
all_selected | Boolean | If true, includes all available items. When false, uses selected/excluded arrays |
selected | Array | List of specific items to include (when all_selected is false) |
excluded | Array | List of specific items to exclude (when all_selected is true) |
Optional Fields
| Field | Type | Description |
|---|---|---|
sync_future | Boolean | Whether to automatically include future items |
filter_type | String | Categorizes the type of filter (for example, "user_folders") |
filter_name | String | Human-readable name for the filter |
Box Enterprise
Box Enterprise sync filters control which folders and files are synchronized for each user account.
Configuration Structure
{
"user_id": {
"all_selected": boolean,
"selected": [{"id": "folder_id", "recursive": boolean}],
"excluded": [{"id": "folder_id"}],
"filter_type": "user_folders",
"filter_name": "User folders",
"include_trash": boolean
}
}
Field Details
| Field | Type | Required | Description |
|---|---|---|---|
all_selected | Boolean | Yes | If true, syncs all folders for the user |
selected | Array | Conditional | Specific folders to sync (required when all_selected is false) |
excluded | Array | No | Folders to exclude from sync |
filter_type | String | Yes | Must be "user_folders" |
filter_name | String | Yes | Must be "User folders" |
include_trash | Boolean | No | Whether to include deleted files in sync |
Folder Object Structure
For both selected and excluded arrays:
{
"id": "folder_id",
"recursive": true
}
| Field | Description |
|---|---|
id | Box folder ID or "0" for root folder |
recursive | Whether to include sub-folders |
Box Enterprise Examples
Sync All Folders for a User
{
"sync_filters": {
"12345": {
"all_selected": true,
"selected": [],
"excluded": [],
"filter_type": "user_folders",
"filter_name": "User folders",
"include_trash": false
}
}
}
Sync Specific Folders Only
{
"sync_filters": {
"12345": {
"all_selected": false,
"selected": [
{"id": "67890", "recursive": true},
{"id": "11111", "recursive": false}
],
"excluded": [],
"filter_type": "user_folders",
"filter_name": "User folders",
"include_trash": true
}
}
}
Sync All Except Specific Folders
{
"sync_filters": {
"12345": {
"all_selected": true,
"selected": [],
"excluded": [
{"id": "99999"},
{"id": "88888"}
],
"filter_type": "user_folders",
"filter_name": "User folders"
}
}
}
Slack Enterprise
Slack Enterprise sync filters control which teams, channels, users (custodians), and conversation types are synchronized.
Configuration Structure
Slack filters use a multi-level structure with different configuration blocks:
{
"types": {
"selected": [{"id": "channels"}, {"id": "chats"}]
},
"teams": {
"all_selected": boolean,
"sync_future": boolean,
"selected": [{"id": "team_id"}],
"excluded": [{"id": "team_id"}]
},
"custodians": {
"all_selected": boolean,
"sync_future": boolean,
"selected": [
{
"id": "user_id",
"conversations": {
"all_selected": boolean,
"sync_future": boolean,
"selected": [{"id": "channel_id", "team_id": "team_id"}],
"excluded": [{"id": "channel_id", "team_id": "team_id"}]
}
}
]
}
}
Field Details
Types Configuration
| Field | Type | Required | Description |
|---|---|---|---|
selected | Array | Yes | Content types to sync: "channels", "chats", or both |
Teams Configuration
| Field | Type | Required | Description |
|---|---|---|---|
all_selected | Boolean | Yes | If true, syncs all teams |
sync_future | Boolean | No | Whether to include future teams |
selected | Array | Conditional | Specific teams to sync (when all_selected is false) |
excluded | Array | No | Teams to exclude from sync |
Custodians (Users) Configuration
| Field | Type | Required | Description |
|---|---|---|---|
all_selected | Boolean | Yes | If true, syncs all users |
sync_future | Boolean | No | Whether to include future users |
selected | Array | Conditional | Specific users to sync with their conversation settings |
Slack Enterprise Examples
Sync All Content
{
"sync_filters": {
"types": {
"selected": [{"id": "channels"}, {"id": "chats"}]
},
"teams": {
"all_selected": true,
"sync_future": true,
"selected": [],
"excluded": []
},
"custodians": {
"all_selected": true,
"sync_future": true,
"selected": []
}
}
}
Sync Specific Teams and Users
{
"sync_filters": {
"types": {
"selected": [{"id": "channels"}]
},
"teams": {
"all_selected": false,
"sync_future": false,
"selected": [{"id": "T1234567890"}, {"id": "T0987654321"}],
"excluded": []
},
"custodians": {
"all_selected": false,
"sync_future": false,
"selected": [
{
"id": "U1234567890",
"conversations": {
"all_selected": true,
"sync_future": false,
"selected": [],
"excluded": []
}
}
]
}
}
}
Exclude Specific Channels for a User
{
"sync_filters": {
"types": {
"selected": [{"id": "channels"}]
},
"custodians": {
"all_selected": false,
"selected": [
{
"id": "U1234567890",
"conversations": {
"all_selected": true,
"excluded": [
{"id": "C9876543210", "team_id": "T1234567890"},
{"id": "C1111111111", "team_id": "T1234567890"}
]
}
}
]
}
}
}
Office 365 (Outlook Enterprise)
Office 365 sync filters control which users' email data is synchronized and can include specific folder or marker configurations.
Configuration Structure
{
"users": {
"all_selected": boolean,
"selected": [{"id": "user_id"}],
"excluded": [{"id": "user_id"}]
},
"user_id": {
"markers": {
"all_selected": boolean,
"excluded": [{"id": "folder_name"}]
}
}
}
Field Details
| Field | Type | Required | Description |
|---|---|---|---|
users | Object | Yes | User selection configuration |
markers | Object | No | Email folder/marker filtering (per user) |
Office 365 Examples
Sync All Users
{
"sync_filters": {
"users": {
"all_selected": true,
"selected": [],
"excluded": []
}
}
}
Sync Specific Users, Exclude Spam/Trash
{
"sync_filters": {
"users": {
"all_selected": false,
"selected": [{"id": "user1@company.com"}, {"id": "user2@company.com"}],
"excluded": []
},
"user1@company.com": {
"markers": {
"all_selected": true,
"excluded": [{"id": "JunkEmail"}, {"id": "DeletedItems"}]
}
},
"user2@company.com": {
"markers": {
"all_selected": true,
"excluded": [{"id": "JunkEmail"}, {"id": "DeletedItems"}]
}
}
}
}
OneDrive Enterprise
OneDrive Enterprise sync filters control which sites and locations are synchronized.
Configuration Structure
{
"sites": {
"all_selected": boolean,
"selected": [{"id": "site_id", "path": "folder_path"}],
"excluded": [{"id": "site_id", "path": "folder_path"}]
}
}
OneDrive Enterprise Examples
Sync All Sites
{
"sync_filters": {
"sites": {
"all_selected": true,
"selected": [],
"excluded": []
}
}
}
Sync Specific Sites and Paths
{
"sync_filters": {
"sites": {
"all_selected": false,
"selected": [
{"id": "site1", "path": "/Documents"},
{"id": "site2", "path": "/Shared"}
],
"excluded": []
}
}
}
MS Teams Enterprise
MS Teams Enterprise sync filters control which types of content, users, teams, and channels are synchronized.
Configuration Structure
{
"types": {
"selected": [{"id": "channels"}, {"id": "chats"}]
},
"users": {
"all_selected": boolean,
"selected": [{"id": "user_id"}],
"excluded": [{"id": "user_id"}]
},
"user_id": {
"all_selected": boolean,
"selected": [{"id": "team_id"}],
"excluded": [{"id": "team_id"}]
},
"team_id": {
"all_selected": boolean,
"selected": [{"id": "channel_id"}],
"excluded": [{"id": "channel_id"}]
}
}
Field Details
| Field | Type | Required | Description |
|---|---|---|---|
types | Object | Yes | Content types to sync (channels, chats) |
users | Object | Yes | User selection configuration |
| Per-user config | Object | No | Team selection for each user |
| Per-team config | Object | No | Channel selection for each team |
MS Teams Enterprise Examples
Sync All Teams Content
{
"sync_filters": {
"types": {
"selected": [{"id": "channels"}, {"id": "chats"}]
},
"users": {
"all_selected": true,
"selected": [],
"excluded": []
}
}
}
Sync Specific Users and Channels
{
"sync_filters": {
"types": {
"selected": [{"id": "channels"}]
},
"users": {
"all_selected": false,
"selected": [{"id": "user1@company.com"}],
"excluded": []
},
"user1@company.com": {
"all_selected": false,
"selected": [{"id": "team-123"}],
"excluded": []
},
"team-123": {
"all_selected": false,
"selected": [{"id": "channel-456"}, {"id": "channel-789"}],
"excluded": []
}
}
}
{
"sync_filters": {
"spaces": {
"all_selected": false,
"selected": [
{"id": "SPACE123", "name": "Engineering Space"},
{"id": "SPACE456", "name": "Marketing Space"}
],
"excluded": [],
"filter_type": "spaces",
"filter_name": "Confluence Spaces"
}
}
}
Pattern 3: Sync Everything Except Specific Items
Use this pattern when you want to synchronize most content but exclude specific items.
{
"sync_filters": {
"channels": {
"all_selected": true,
"selected": [],
"excluded": [
{"id": "C123456789", "name": "private-channel"},
{"id": "C987654321", "name": "archived-channel"}
],
"filter_type": "channels",
"filter_name": "Slack Channels"
}
}
}
Pattern 4: Mixed Configuration (Multiple Filter Types)
Many connectors support multiple filter types that can be configured independently.
{
"sync_filters": {
"users": {
"all_selected": false,
"selected": [
{"id": "user123@company.com"},
{"id": "user456@company.com"}
],
"excluded": [],
"filter_type": "users",
"filter_name": "Users"
},
"folders": {
"all_selected": true,
"selected": [],
"excluded": [
{"id": "/archived", "name": "Archived Folder"}
],
"filter_type": "folders",
"filter_name": "Folders"
}
}
}
Connector-Specific Examples
The following sections provide detailed examples for each supported connector type.
Box Enterprise
Box collections support user-based folder filtering. Each user can have their own folder selection configuration.
{
"sync_filters": {
"2262844940": {
"all_selected": false,
"selected": [
{"id": "0", "name": "Root Folder"},
{"id": "35567496586", "name": "Shared Documents"}
],
"excluded": [],
"filter_type": "user_folders",
"filter_name": "User folders"
},
"8877441122": {
"all_selected": true,
"selected": [],
"excluded": [
{"id": "12345678", "name": "Personal Files"}
],
"filter_type": "user_folders",
"filter_name": "User folders"
}
}
}
Key Points:
- Filter keys are Box user IDs
- Each user can have different folder selections
- Use
filter_type: "user_folders"for all Box user filters - ID "0" represents the root folder
Dropbox Enterprise
Dropbox supports both individual user accounts and team folder configurations.
{
"sync_filters": {
"dbid:user123": {
"all_selected": false,
"selected": [
{"id": "/Marketing", "name": "Marketing"},
{"id": "/Projects/Active", "name": "Active Projects"}
],
"excluded": [],
"filter_type": "user_folders",
"filter_name": "User folders"
},
"team_folders": {
"all_selected": true,
"selected": [],
"excluded": [
{"id": "/Archived", "name": "Archived Team Folder"}
],
"filter_type": "team_folders",
"filter_name": "Team folders"
}
}
}
Key Points:
- User accounts use dropbox database IDs (dbid:...)
- Team folders have a special "team_folders" key
- Paths should include leading slash
- Supports both Paper documents and file folders
Slack Enterprise
Slack has a complex filter structure supporting multiple entity types and sharing controls.
Enterprise Grid Slack Example
{
"sync_filters": {
"types": {
"selected": [
{"id": "public"},
{"id": "private"},
{"id": "mpim"},
{"id": "im"}
]
},
"teams": {
"all_selected": false,
"sync_future": false,
"selected": [
{"id": "T123ABCDEF"}
]
},
"conversations": {
"all_selected": false,
"sync_future": true,
"check_sharing": true,
"selected": [
{"id": "C1234567890", "team_id": "T123ABCDEF"},
{"id": "C0987654321", "team_id": "T123ABCDEF"}
],
"excluded": [
{"id": "C5555555555", "team_id": "T123ABCDEF"}
]
}
}
}
Regular Slack with User Email Domain Filter
{
"sync_filters": {
"types": {
"selected": [
{"id": "public"},
{"id": "private"}
]
},
"teams": {
"all_selected": true,
"sync_future": true
},
"user-email-domain": {
"all_selected": false,
"selected": [
{"id": "company.com"},
{"id": "subsidiary.com"}
]
}
}
}
Key Points:
types: Controls which conversation types to sync (public, private, mpim, im)teams: Controls which Slack teams to includeconversations: Fine-grained conversation selectioncheck_sharing: Validates sharing permissionsuser-email-domain: Filter users by email domainsync_future: Whether to include future items when not syncing all
Gmail
Gmail supports filtering by folders, categories, and message markers.
{
"sync_filters": {
"mail_folders": {
"all_selected": false,
"selected": [
{"id": "INBOX"},
{"id": "SENT"},
{"id": "Important"}
],
"excluded": [
{"id": "SPAM"},
{"id": "TRASH"}
],
"filter_type": "mail_folders",
"filter_name": "Mail Folders"
},
"custom_folders": {
"all_selected": true,
"selected": [],
"excluded": [],
"filter_type": "custom_folders",
"filter_name": "Custom Folders"
},
"categories": {
"all_selected": false,
"selected": [
{"id": "CATEGORY_PERSONAL"},
{"id": "CATEGORY_SOCIAL"}
],
"excluded": [],
"filter_type": "categories",
"filter_name": "Categories"
},
"markers": {
"all_selected": false,
"selected": [
{"id": "starred"},
{"id": "important"}
],
"excluded": [
{"id": "no_markers"}
],
"filter_type": "markers",
"filter_name": "Markers"
}
}
}
Key Points:
mail_folders: Standard Gmail labels/folderscustom_folders: User-created labelscategories: Gmail's automatic categorizationmarkers: Star, importance, and other markers- Use Gmail's standard label names (INBOX, SENT, etc.)
Confluence
Confluence primarily filters by spaces and pages within those spaces.
{
"sync_filters": {
"spaces": {
"all_selected": false,
"selected": [
{"id": "ENG", "name": "Engineering Space", "key": "ENG"},
{"id": "MARKETING", "name": "Marketing Space", "key": "MARKETING"}
],
"excluded": [],
"filter_type": "spaces",
"filter_name": "Confluence spaces"
}
}
}
Key Points:
- Primary filter type is "spaces"
- Space objects include both ID and key
- Page-level filtering happens within space selection
- Space keys are usually uppercase abbreviations
Jira
Jira filters by projects and optionally by issue types within projects.
{
"sync_filters": {
"projects": {
"all_selected": false,
"selected": [
{"id": "10001", "name": "Software Development", "key": "SD"},
{"id": "10002", "name": "Marketing Campaign", "key": "MC"}
],
"excluded": [],
"filter_type": "projects",
"filter_name": "Projects"
}
}
}
Key Points:
- Primary filter type is "projects"
- Project objects include ID, name, and key
- Issue type filtering is typically handled within project scope
- Project keys are unique identifiers (for example, "PROJ", "TEAM")
Zendesk
Zendesk supports filtering by ticket types, user groups, and organizations.
{
"sync_filters": {
"tickets": {
"all_selected": true,
"selected": [],
"excluded": [
{"id": "spam_tickets"}
],
"filter_type": "tickets",
"filter_name": "Tickets"
},
"users": {
"all_selected": false,
"selected": [
{"id": "123456789", "name": "Support Team"},
{"id": "987654321", "name": "Sales Team"}
],
"excluded": [],
"filter_type": "user_groups",
"filter_name": "User Groups"
}
}
}
Microsoft Teams
Teams supports filtering by teams, channels, and users with temporal controls.
{
"sync_filters": {
"teams": {
"all_selected": false,
"sync_future": true,
"selected": [
{"id": "team123", "name": "Engineering Team"}
],
"excluded": []
},
"users": {
"all_selected": true,
"selected": [],
"excluded": [
{"id": "external_user@partner.com"}
]
}
}
}
OneDrive
OneDrive supports user-based folder filtering similar to other file storage systems.
{
"sync_filters": {
"user123@company.com": {
"all_selected": false,
"selected": [
{"id": "root:/Documents", "path": "/Documents"},
{"id": "root:/Projects", "path": "/Projects"}
],
"excluded": [
{"id": "root:/Personal", "path": "/Personal"}
],
"filter_type": "user_folders",
"filter_name": "User folders"
}
}
}
Common Patterns by Use Case
Legal Hold / eDiscovery
{
"sync_filters": {
"users": {
"all_selected": false,
"selected": [
{"id": "custodian1@company.com"},
{"id": "custodian2@company.com"}
],
"excluded": [],
"filter_type": "users",
"filter_name": "Custodians"
},
"date_range": {
"start": "2023-01-01",
"end": "2023-12-31"
}
}
}
API Integration
Basic API Usage
Use the PATCH /collections/{onna_id} endpoint to configure sync filters:
curl --request PATCH 'https://api.onna.com/v1/collections/{onna_id}' \
--header 'Authorization: Bearer <ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"sync_status": "pending",
"sync_filters": {
"user_id": {
"all_selected": false,
"selected": [{"id": "folder_id"}],
"excluded": [],
"filter_type": "user_folders",
"filter_name": "User folders"
}
}
}'
Python Example
import requests
# Configuration
base_url = "https://api.onna.com/v1"
access_token = "your_access_token"
collection_id = "your_collection_id"
headers = {
"Authorization": f"Bearer {access_token}",
"Content-Type": "application/json"
}
# Box sync filters configuration
sync_filters_config = {
"sync_status": "pending",
"sync_filters": {
"2262844940": { # Box user ID
"all_selected": False,
"selected": [
{"id": "0"}, # Root folder
{"id": "35567496586"} # Specific folder
],
"excluded": [],
"filter_type": "user_folders",
"filter_name": "User folders"
}
}
}
response = requests.patch(
f"{base_url}/collections/{collection_id}",
headers=headers,
json=sync_filters_config
)
if response.status_code == 200:
print("Sync filters configured successfully")
else:
print(f"Error: {response.status_code} - {response.text}")
Quick Reference
Common Patterns
| Pattern | all_selected | selected | excluded | Use Case |
|---|---|---|---|---|
| Sync All | true | [] | [] | Full sync including future content |
| Specific Items | false | [items] | [] | Only selected items |
| All Except | true | [] | [items] | Everything except excluded |
Connector Summary
| Connector | Filter Key | Filter Type | Item ID Format |
|---|---|---|---|
| Box Enterprise | Box user ID | "user_folders" | Folder ID ("0" = root) |
| Slack Enterprise | "types", "teams", "custodians" | Various | Channel/team/user IDs |
| Office 365 | "users", user email | Various | User email addresses |
| OneDrive Enterprise | "sites" | "sites" | Site ID with path |
| MS Teams Enterprise | "types", "users", user/team IDs | Various | User/team/channel IDs |