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

# Microsoft Sharepoint

> Microsoft SharePoint is a powerful file storage solution that enables seamless document management and collaboration.

## Supported syncing

| Type | Description | Supported Sync Modes |
| - | - | - |
| **Any data set** | Sync data from a source to SharePoint as JSON or CSV files | Insert, All, Diff |

For more information about sync modes, refer to the [sync modes](https://docs.hightouch.com/syncs/types-and-modes.md#sync-modes) docs.

> [!NOTE]
>
> The order of rows and columns in uploaded files may differ from how they appear in your model. This is expected behavior and applies to all sync modes. [Learn more about row and column ordering](https://docs.hightouch.com/models/creating-models.md#row-and-column-ordering).

## Connect to Microsoft Sharepoint

Go to the [**Destinations** overview page](https://app.hightouch.com/destinations?from=docs) and click the **Add destination** button. Select **Microsoft Sharepoint** and click **Continue**. You can then authenticate Hightouch to **Microsoft Sharepoint**.

For the **Authentication method**, select **Log in to Sharepoint** and log into your Microsoft Sharepoint account. Once successful, you will be redirected back to Hightouch to enter a descriptive name for your destination and complete setup.

## Sync configuration

Once you've set up your Microsoft Sharepoint destination and have a [model](https://docs.hightouch.com/getting-started/concepts.md#models) to pull data from, you can set up your sync configuration to begin syncing data. Go to the [**Syncs** overview page](https://app.hightouch.com/syncs?from=docs) and click the **Add sync** button to begin. Then, select the relevant model and the Microsoft Sharepoint destination you want to sync to.

### Select file format

Hightouch supports syncing JSON and CSV files to SharePoint.

### Select a Site and Drive

In order to sync to SharePoint, you must select a site and a drive available to your account.
You can specify a folder within the site/drive combination, or create a new folder to write the file to.

### Enter filename

The filename field lets you specify the parent directory and the name of the file you want to use for your results.
You can include timestamp variables in the filename, surrounding each with `{}`.
Hightouch supports these timestamp variables:

* `YYYY`: Represents the full year in four digits.
* `YY`: The last two digits of the year.
* `MM`: Two-digit month format (01-12).
* `DD`: Two-digit day format (01-31).
* `HH`: Two-digit hour format in 24-hour clock (00-23).
* `mm`: Two-digit minute format (00-59).
* `ss`: Two-digit second format (00-59).
* `ms`: Three-digit millisecond format.
* `X`: Unix timestamp in seconds.
* `x`: Unix timestamp in milliseconds.

All dates and times are UTC.

For example, you could enter `upload/{YYYY}-{MM}-{DD}-{HH}-{mm}-result.json` to dynamically include the year, month, date, hour, and minute in each uploaded file. Hightouch would insert each file in the `upload` directory, which would need to already exist in your bucket.

You can also use other [variable values](https://docs.hightouch.com/syncs/mapping-data.md#variable-values) to include sync metadata in the filename:

* `{model.id}`
* `{model.name}`
* `{sync.id}`
* `{sync.run.id}`

> [!NOTE]
>
> If a file already exists at the path you entered at the time of a sync, Hightouch will overwrite the file.

### Set filename offset

By default, Hightouch uses the UTC timestamp of the sync run to fill in timestamp variables. You can optionally include an offset in seconds. For example, if you want the filename's date to be 24 hours *before* the sync takes place, enter '-86400' (`24 hours * 60 minutes * 60 seconds`).

#### Record matching

You can match rows from your model to any data set in Microsoft Sharepoint on any column in your model and any field in Microsoft Sharepoint. Ensure the data types of the model column and Microsoft Sharepoint field you select match.
Refer to the [record matching docs](https://docs.hightouch.com/syncs/record-matching.md) for more information.

#### Field mapping

Hightouch lets you sync any data set fields via [field mapping](https://docs.hightouch.com/syncs/mapping-data.md).
You can map data from any of your model columns to the default any data set fields.
Ensure your model's columns have the same data types as the fields you want to sync to.

#### Empty file results

You can select how Hightouch should handle empty results files. Empty result files can occur if your model's query results haven't changed since the last sync for Insert and Diff modes.
You can select whether to **skip empty files**. If you skip empty files, it means Hightouch won't export any files if your model's query results haven't changed since your last sync.

## Tips and troubleshooting

To see the exact API requests and responses from each sync run, use the [live debugger](https://docs.hightouch.com/syncs/debugger.md). To get notified by Slack, PagerDuty, SMS, or email when a sync fails, set up [sync alerts](https://docs.hightouch.com/syncs/alerting.md). If you run into an issue this page doesn't cover, [contact support](#pylon-chat).
