> ## Documentation Index
> Fetch the complete documentation index at: https://help.casaconect.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Google Drive, OneDrive and SharePoint

> Link a folder from your document provider to a vault and keep the two in sync, in both directions if you wish.

If your files already live in **Google Drive**, **Microsoft OneDrive** or **Microsoft SharePoint**, you do not need to move them. Link a folder to a Casa Conect vault and the two stay in step. Synced files are ordinary vault documents: searchable, readable by the agent, and versioned.

## How it works

1. **Each member connects their own account**, once.
2. **Link a folder** to a vault: your private vault, the organization vault or a project vault.
3. **Casa Conect keeps them in sync** in the mode you choose.

## Connect your account

<Steps>
  <Step title="Open Integrations">
    Go to **Settings → Integrations**. Under **Connected accounts** you see Google Drive, OneDrive and SharePoint, each marked *Connected*, *Needs reconnecting* or *Not connected*.
  </Step>

  <Step title="Choose Connect">
    You are taken to Google or Microsoft to sign in and approve access, then returned to Casa Conect.
  </Step>
</Steps>

<Note>
  **Your tokens are not stored by Casa Conect.** The connection is hosted by our identity provider, WorkOS, which runs the sign-in flow and holds the resulting tokens in its vault. Casa Conect asks for a short-lived token only at the moment it needs to talk to your provider. A connection belongs to you, within your current organization. Colleagues connect their own accounts.
</Note>

## Link a folder

Open a vault, choose **Sync with your document provider**, pick the account and then the drive or library and folder, and choose a mode.

| Mode                        | Behaviour                                                                      | Choose it when                                                         |
| :-------------------------- | :----------------------------------------------------------------------------- | :--------------------------------------------------------------------- |
| **Keep in sync**            | Two-way. Changes on either side are carried to the other.                      | The folder is a working area used from both sides                      |
| **Sync from provider only** | One-way. Changes in the provider flow into the vault. Nothing is written back. | The provider is your system of record and Casa Conect should follow it |
| **Import once**             | Copies the folder's contents now. Nothing is kept in sync afterwards.          | You are moving files in, or taking a snapshot                          |

<Tip>
  If in doubt, start with **Sync from provider only**. The agent can then read everything, and nothing it does can change your system of record. Move to **Keep in sync** once you trust the workflow.
</Tip>

## How changes are detected

| Watch mode   | Meaning                                                                                                      |
| :----------- | :----------------------------------------------------------------------------------------------------------- |
| **Live**     | The provider notifies Casa Conect instantly when something changes                                           |
| **Polling**  | Casa Conect checks every few minutes                                                                         |
| **Push off** | Push notifications are not configured for this link. Changes are picked up on the next check or manual sync. |

You can choose **Sync now** at any time, and **pause** and **resume** a link. Each sync continues from where the last one ended, so large folders are not rescanned.

## Status and problems

A link shows **Syncing**, **Paused**, **Reconnect needed**, **Error** or **Imported**. Each item has a state of its own:

| Item state   | Meaning                                                                                                                                                                                                                                                                                                         |
| :----------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Synced**   | Identical on both sides                                                                                                                                                                                                                                                                                         |
| **Conflict** | Changed on both sides since the last sync. **Nothing is lost.** When the provider's copy is pulled in, it becomes the current version and your Casa Conect content stays in the [version history](/documents/vault#versions). When a push would overwrite a newer provider copy, the push is held back instead. |
| **Skipped**  | Not synced, for example an unsupported type or a file over the size limit                                                                                                                                                                                                                                       |
| **Retrying** | A temporary problem. Casa Conect tries again by itself and shows when.                                                                                                                                                                                                                                          |
| **Failed**   | Could not be synced. Open **Issues** for the reason, and **Retry** the item.                                                                                                                                                                                                                                    |

After each run a summary shows how many items were pulled, pushed and failed.

**Reconnect needed** means that your provider connection expired or was revoked. Go to **Settings → Integrations** and choose **Reconnect**.

## Things to know

* **Google Docs, Sheets and Slides** are pulled in by *exporting* them to file formats. They are **never written back**, because a native Google document cannot be replaced by a file. For two-way work, keep the documents as `.docx` files.
* The usual [file types and size limit](/documents/vault#accepted-file-types) apply: 50 MB per file.
* A synced version appears in the document's history as **Synced from provider**.
* Casa Conect recognizes its own writes, so a change it pushed to your provider does not bounce back as a new change.
* The **agent's edits** to a synced Word file are tracked changes in a new version. In **Keep in sync** mode that new version is carried to your provider. Accept or reject the changes on whichever side you prefer.

## Unlink

Unlinking stops the sync and **keeps the files**: *"Folder unlinked — synced files stay in the vault."* Nothing is deleted on either side.

Organization admins can see every folder linked to the organization vault or a project vault under **Settings → Integrations → Synced folders**, including links set up by other members. **Unlinking there stops the sync for everyone.**

## Disconnect your account

Choose **Disconnect** under **Settings → Integrations**. Links that depend on the connection stop syncing until an account is reconnected.

## Security

* Casa Conect receives only what is in the folders **you link**, and nothing else from your drive.
* Notifications from providers are authenticated with a secret unique to each watched folder, and are rate-limited at our firewall.
* After you approve access, the return to Casa Conect is validated, so the flow cannot be redirected to another site.
* Synced files enter the same [pipeline](/sources/overview#one-pipeline-for-everything) as every other document: encrypted, scanned, versioned and indexed.
