Skip to main content
Folder sync gives your users granular control over which folders from their connected cloud storage are synced, skipped, or sent to a review queue. This works with Google Drive, Dropbox, and Box integrations.

Sync Modes

Each folder can be assigned one of three sync modes:

Folder Discovery

Before setting policies, your UI needs to show the user’s folder tree. The folder discovery endpoint returns one level at a time (lazy loading):
To drill into a subfolder, pass parent_id:
Each folder in the response includes its current policy (if one is set):
A null policy means the folder inherits its sync mode from its nearest ancestor with a policy, or defaults to sync.

Setting Folder Policies

Create or update a folder policy on a connection:
string
required
The folder ID from the source provider (e.g., Google Drive folder ID).
string
Display name of the folder. Updated on each request to stay current.
string
Display path of the folder. Updated on each request to stay current.
string
The parent folder’s provider ID. Used for policy inheritance resolution.
string
required
One of sync, skip, or manual.
If a policy already exists for the same folder and connection, it will be updated (upsert behavior).

Listing policies

Deleting a policy

Deleting a policy causes the folder to inherit from its parent (or default to sync).

Policy Inheritance

Policies resolve hierarchically — the most specific folder wins:
  1. Check the folder itself for a policy
  2. Walk up the parent chain checking each ancestor
  3. If no policy is found, default to sync
For example, if /Engineering is set to sync and /Engineering/Drafts is set to skip, files in /Engineering will sync but files in /Engineering/Drafts will not.

Manual Review Workflow

When a folder is set to manual, new documents from that folder land in pending_review status instead of being indexed immediately. Your app can then present a review UI.

List pending resources

Use the existing /memories/list endpoint with a status filter:

Approve a resource

Approving moves the resource to pending status, which queues it for indexing:
Returns:

Reject a resource

Rejecting moves the resource to skipped status — it will not be indexed:
Returns:

Webhook Notifications

When folder sync events occur, Hyperspell fires webhook notifications (if you have a webhook URL configured in your app settings): These use the same webhook payload format and signature verification as other Hyperspell webhooks. See Webhooks for details.

Policy Change Side-Effects

Changing a folder’s sync mode has retroactive effects on existing resources: