# SharePoint

<!-- Generated by tools/catalogue/generate.py from flow.service.workflow 5.0.0-beta.39. Don't edit by hand. -->

# SharePoint

The SharePoint category has 3 tasks. Each entry shows the task's latest revision, the one the palette adds. See [Reading an entry](https://www.useboomerang.io/docs/flow/main/catalogue/overview#reading-an-entry).

## Download SharePoint File

Downloads a file from a SharePoint document library to the workspace through Microsoft Graph. The app registration needs the Sites.Read.All or Files.Read.All application permission, or Sites.Selected with a grant on the site.

- **Slug:** `download-sharepoint-file`
- **Type:** `template`
- **Revision:** 1
- **Image:** Default task image.

**Parameters**

| Label | Name | Type | Required | Default | Helper text |
| --- | --- | --- | --- | --- | --- |
| Tenant ID | `tenantId` | Text | Yes | `$(workspace.params.microsoft-tenant-id)` | Defaults to the tenant ID the workspace's Microsoft integration shares; or enter the Directory (tenant) ID of an Entra app registration |
| Client ID | `clientId` | Text | Yes | `$(workspace.params.microsoft-client-id)` | Defaults to the client ID the workspace's Microsoft integration shares; or enter the app registration's Application (client) ID |
| Client Secret | `clientSecret` | Secured | Yes | `$(workspace.params.microsoft-client-secret)` | Defaults to the client secret the workspace's Microsoft integration shares; or enter one of the app registration's. The task gets its own app-only Microsoft Graph token with it |
| Site | `site` | Text | Yes |  | The site's URL (any page under the site will do) or its Graph site ID |
| Document Library | `library` | Text | No |  | The library's name, e.g. Documents. Blank is the site's default library |
| File Path | `path` | Text | Yes |  | The file's path in the library, e.g. Releases/2026/notes.md |
| Destination | `destinationPath` | Text | Yes |  | A workspace file or directory, absolute or relative to /workspace. A directory (or a path ending in /) keeps the file's name |

**Results**

| Name | Description |
| --- | --- |
| `path` | The absolute path of the downloaded file |
| `size` | The file's size in bytes |

## List SharePoint Files

Lists the files and folders in one folder of a SharePoint document library through Microsoft Graph. The app registration needs the Sites.Read.All or Files.Read.All application permission, or Sites.Selected with a grant on the site.

- **Slug:** `list-sharepoint-files`
- **Type:** `template`
- **Revision:** 1
- **Image:** Default task image.

**Parameters**

| Label | Name | Type | Required | Default | Helper text |
| --- | --- | --- | --- | --- | --- |
| Tenant ID | `tenantId` | Text | Yes | `$(workspace.params.microsoft-tenant-id)` | Defaults to the tenant ID the workspace's Microsoft integration shares; or enter the Directory (tenant) ID of an Entra app registration |
| Client ID | `clientId` | Text | Yes | `$(workspace.params.microsoft-client-id)` | Defaults to the client ID the workspace's Microsoft integration shares; or enter the app registration's Application (client) ID |
| Client Secret | `clientSecret` | Secured | Yes | `$(workspace.params.microsoft-client-secret)` | Defaults to the client secret the workspace's Microsoft integration shares; or enter one of the app registration's. The task gets its own app-only Microsoft Graph token with it |
| Site | `site` | Text | Yes |  | The site's URL (any page under the site will do) or its Graph site ID |
| Document Library | `library` | Text | No |  | The library's name, e.g. Documents. Blank is the site's default library |
| Folder | `folder` | Text | No |  | The folder in the library. Blank is the library's root |
| Output File | `outputFile` | Text | No |  | A workspace path to write the listing to as JSON, absolute or relative to /workspace. Needed when the listing is over 3000 bytes |

**Results**

| Name | Description |
| --- | --- |
| `files` | A JSON array of {name, path, type, size, lastModified, webUrl}, when it fits in a result (3000 bytes); otherwise empty and the listing is in Output File |
| `count` | How many files and folders the folder holds |
| `outputPath` | The absolute path of Output File, when set |

## Upload SharePoint File

Uploads a workspace file to a SharePoint document library through Microsoft Graph; a file over 4 MB goes through a resumable upload session. The app registration needs the Sites.ReadWrite.All or Files.ReadWrite.All application permission, or Sites.Selected with a grant on the site.

- **Slug:** `upload-sharepoint-file`
- **Type:** `template`
- **Revision:** 1
- **Image:** Default task image.

**Parameters**

| Label | Name | Type | Required | Default | Helper text |
| --- | --- | --- | --- | --- | --- |
| Tenant ID | `tenantId` | Text | Yes | `$(workspace.params.microsoft-tenant-id)` | Defaults to the tenant ID the workspace's Microsoft integration shares; or enter the Directory (tenant) ID of an Entra app registration |
| Client ID | `clientId` | Text | Yes | `$(workspace.params.microsoft-client-id)` | Defaults to the client ID the workspace's Microsoft integration shares; or enter the app registration's Application (client) ID |
| Client Secret | `clientSecret` | Secured | Yes | `$(workspace.params.microsoft-client-secret)` | Defaults to the client secret the workspace's Microsoft integration shares; or enter one of the app registration's. The task gets its own app-only Microsoft Graph token with it |
| Site | `site` | Text | Yes |  | The site's URL (any page under the site will do) or its Graph site ID |
| Document Library | `library` | Text | No |  | The library's name, e.g. Documents. Blank is the site's default library |
| File | `filePath` | Text | Yes |  | The workspace file to upload, absolute or relative to /workspace |
| Folder | `folder` | Text | No |  | The folder in the library, e.g. Releases/2026. Created if missing. Blank is the library's root |
| File Name | `fileName` | Text | No |  | The name in SharePoint. Blank keeps the file's own name |
| If the File Exists | `conflictBehavior` | Select | No | `replace` |  |

**Results**

| Name | Description |
| --- | --- |
| `itemId` | The uploaded item's ID |
| `webUrl` | The file's SharePoint URL |
| `name` | The file's name in SharePoint, which differs from File Name after a rename |
