# Sharepoint

Spara syncs documents from your SharePoint Online sites and document libraries to train your AI agents. Synced documents are added to your [Knowledge](/platform/knowledge.md) base, giving agents the context they need to answer questions about your products, policies, and processes.

## Setup

{% stepper %}
{% step %}

#### Connect SharePoint

Navigate to [**Settings > Integrations**](https://app.spara.co/organization/integrations) and click **Connect** next to SharePoint. Complete the Microsoft OAuth flow to authorize Spara to access your SharePoint tenant.
{% endstep %}

{% step %}

#### Select documents

After connecting, use the file picker to browse your SharePoint sites, document libraries, and folders. Select the files and folders you want to sync. You can select entire folders to sync all supported files within them, including subfolders.
{% endstep %}

{% step %}

#### Documents sync automatically

Spara periodically syncs your selected documents and folders, picking up new files and changes automatically. Documents are processed and added to your Knowledge base.
{% endstep %}
{% endstepper %}

## Supported file types

| File type                        | Supported |
| -------------------------------- | --------- |
| Word documents (`.docx`, `.doc`) | Yes       |
| PDFs (`.pdf`)                    | Yes       |
| Text files (`.txt`)              | Yes       |
| Excel (`.xlsx`, `.xls`)          | No        |
| PowerPoint (`.pptx`, `.ppt`)     | No        |
| Images, videos, audio            | No        |

{% hint style="info" %}
When you select a folder, Spara syncs all supported file types within it and its subfolders. Unsupported file types (like images or Excel files) are skipped automatically.
{% endhint %}

## How syncing works

* **Periodic sync** — Spara re-scans your selected folders on a regular interval to detect new, modified, and deleted files
* **Folder hierarchy** — The folder structure from SharePoint is preserved in the Spara Knowledge UI for easy navigation
* **Deleted files** — If a file is removed from SharePoint, it is automatically removed from your Knowledge base on the next sync

## FAQ

### Can I sync from multiple SharePoint sites?

Yes. The file picker shows all sites in your SharePoint tenant. You can select documents from any combination of sites and libraries.

### How quickly do changes appear?

Document changes are picked up during the next periodic sync cycle. For immediate updates, you can trigger a manual sync from the Knowledge page.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.spara.com/integrations/document-sync-integrations/sharepoint.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
