# Cloud file sync

Firms can connect cloud storage and sync folders into cases so files flow in automatically.

### Connecting a source (admin, in Firm settings → Integrations)

The **"Connect a cloud file source"** dialog lists providers:
- **OneDrive** — sign in with a Microsoft account.
- **SharePoint** — connect the firm's Microsoft 365 tenant (admin consent required).
- **Google Drive** — sign in with Google (My Drive or a shared drive).
- **Dropbox** — sign in with Dropbox.

Clicking a provider sends the user to that provider to approve access, then returns to Albatross
with the connection **Active**.

### Adding a cloud folder to a case (Case files toolbar)

Use **"Add cloud folder"**:
1. If multiple sources are connected, pick one.
2. Browse the provider's folders using the breadcrumb + folder list; select the folder to sync.
3. Choose a sync direction:
   - **Import only** (default) — one-way, cloud → Albatross; the folder is read-only in the case.
   - **Two-way** — edits in Albatross are pushed back to the cloud source.
4. Click **"Sync '[folder]'"**. A toast confirms importing has begun.

### The sync status pill

When folders are synced, a status pill sits in the Case files toolbar:
- **"Synced"** (green) — all healthy.
- **"Importing"** (spinner) — actively pulling files.
- **"Sync issue"** (red) — one or more folders have an error.

Click it for a per-folder breakdown (name, provider, status, item count) with a **refresh**
button to re-run a folder's sync, plus **"Add cloud folder"** and **"Manage sources"** (which
goes to Firm settings → Integrations).

**Conflicts:** if a file is changed both in Albatross and in the cloud, its state shows
"Conflict — needs review." **Auth expiry / errors:** the folder shows a sync error; re-connect
or re-authorize the source from Firm settings → Integrations.
