> For the complete documentation index, see [llms.txt](https://docs.spara.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.spara.com/integrations/document-sync-integrations/sharepoint.md).

# Sharepoint

Spara syncs documents from your SharePoint Online sites and document libraries to train your AI agents. Synced documents are added to your [Knowledge](/build/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/settings/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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
