Overview
SharePoint Online – SharePoint document libraries: list folders, download & upload files (attended or unattended)
Available operations
14 operations available. Click any row to jump to its detail.
| Operation | Category | What it does |
|---|---|---|
| Create Folder | General | Create a folder in a library by parent path |
| Delete Item | General | Delete a file or folder by its drive-item ID |
| Download File | General | Download a single file to the client machine (by item_id or by path) |
| Download Folder | General | Download every file in a folder to a local directory |
| Get Item | General | Get a file/folder by its drive-item ID |
| Get Root Site | General | Get the tenant's root SharePoint site |
| Get Site | General | Get a SharePoint site by its Graph site ID |
| Get Site by Path | General | Resolve a site by hostname + path (host=acme.sharepoint.com, site_path=sites/Finance) |
| List Folder Children (by item ID) | General | List items inside a folder identified by its drive-item ID |
| List Document Libraries | General | List the document libraries (drives) on a site |
| List Folder | General | List items in a folder by its library-relative path (empty path = library root) |
| Resolve Site URL | General | Resolve a full SharePoint site URL to its Graph site object |
| Search Sites | General | Search SharePoint sites by keyword (pass 'search') |
| Upload File | General | Upload a local file into a folder (handles large files via upload session) |
Operations
Create Folder
Create a folder in a library by parent path
| Parameter | Required | Type | Description |
|---|---|---|---|
Site URL site_url | No | text | SharePoint site URL, resolved to a site automatically – provide this OR Site ID. e.g. https://acme.sharepoint.com/sites/Finance |
Site ID site_id | No | text | Graph site id (e.g. from a resolve-site-url step). Optional when Site URL is given. |
Folder Name name | Yes | text | Name of the new folder. |
Parent Folder parent_path | No | text | Parent folder path. Blank = library root. |
On Conflict conflict_behavior | No | text | rename | replace | fail (default rename). |
Document Library ID drive_id | No | text | Specific document library, if the site has more than one. Optional – defaults to the site's default. |
Delete Item
Delete a file or folder by its drive-item ID
| Parameter | Required | Type | Description |
|---|---|---|---|
Site Id site_id | Yes | text | |
Item Id item_id | Yes | text |
Download File
Download a single file to the client machine (by item_id or by path)
| Parameter | Required | Type | Description |
|---|---|---|---|
Site URL site_url | No | text | SharePoint site URL, resolved to a site automatically – provide this OR Site ID. e.g. https://acme.sharepoint.com/sites/Finance |
Site ID site_id | No | text | Graph site id (e.g. from a resolve-site-url step). Optional when Site URL is given. |
File Path path | No | text | Library-relative file path, e.g. Documents/Report.xlsx (or use Item ID). |
Item ID item_id | No | text | Drive-item id of the file (alternative to File Path). |
Save Path save_path | Yes | text | Local destination path on the client machine. |
Document Library ID drive_id | No | text | Specific document library, if the site has more than one. Optional – defaults to the site's default. |
Share Link URL share_url | No | text | A SharePoint/OneDrive sharing link (the URL from Share → Copy link). When given, the item is resolved straight from the link and Site URL/ID + Folder/File Path are ignored – use this for a shared file/folder (incl. personal OneDrive) where no site is known. |
Download Folder
Download every file in a folder to a local directory
| Parameter | Required | Type | Description |
|---|---|---|---|
Site URL site_url | No | text | SharePoint site URL, resolved to a site automatically – provide this OR Site ID. e.g. https://acme.sharepoint.com/sites/Finance |
Site ID site_id | No | text | Graph site id (e.g. from a resolve-site-url step). Optional when Site URL is given. |
Folder Path folder_path | No | text | Library-relative folder path. Blank = library root. |
Save Directory save_dir | Yes | text | Local directory to download the files into. |
Include Subfolders recursive | No | boolean | Descend into subfolders. Off by default. |
Document Library ID drive_id | No | text | Specific document library, if the site has more than one. Optional – defaults to the site's default. |
Share Link URL share_url | No | text | A SharePoint/OneDrive sharing link (the URL from Share → Copy link). When given, the item is resolved straight from the link and Site URL/ID + Folder/File Path are ignored – use this for a shared file/folder (incl. personal OneDrive) where no site is known. |
Get Item
Get a file/folder by its drive-item ID
| Parameter | Required | Type | Description |
|---|---|---|---|
Site Id site_id | Yes | text | |
Item Id item_id | Yes | text |
Get Root Site
Get the tenant's root SharePoint site
No input parameters.
Get Site
Get a SharePoint site by its Graph site ID
| Parameter | Required | Type | Description |
|---|---|---|---|
Site Id site_id | Yes | text |
Get Site by Path
Resolve a site by hostname + path (host=acme.sharepoint.com, site_path=sites/Finance)
| Parameter | Required | Type | Description |
|---|---|---|---|
Hostname hostname | Yes | text | |
Site Path site_path | Yes | text |
List Folder Children (by item ID)
List items inside a folder identified by its drive-item ID
| Parameter | Required | Type | Description |
|---|---|---|---|
Site Id site_id | Yes | text | |
Item Id item_id | Yes | text |
List Document Libraries
List the document libraries (drives) on a site
| Parameter | Required | Type | Description |
|---|---|---|---|
Site Id site_id | Yes | text |
List Folder
List items in a folder by its library-relative path (empty path = library root)
| Parameter | Required | Type | Description |
|---|---|---|---|
Site URL site_url | No | text | SharePoint site URL, resolved to a site automatically – provide this OR Site ID. e.g. https://acme.sharepoint.com/sites/Finance |
Site ID site_id | No | text | Graph site id (e.g. from a resolve-site-url step). Optional when Site URL is given. |
Folder Path folder_path | No | text | Library-relative folder path, e.g. Documents/Invoices. Blank lists the library root. |
Document Library ID drive_id | No | text | Specific document library, if the site has more than one. Optional – defaults to the site's default. |
Share Link URL share_url | No | text | A SharePoint/OneDrive sharing link (the URL from Share → Copy link). When given, the item is resolved straight from the link and Site URL/ID + Folder/File Path are ignored – use this for a shared file/folder (incl. personal OneDrive) where no site is known. |
Resolve Site URL
Resolve a full SharePoint site URL to its Graph site object
| Parameter | Required | Type | Description |
|---|---|---|---|
Site URL url | Yes | text | Full SharePoint site URL, e.g. https://acme.sharepoint.com/sites/Finance |
Search Sites
Search SharePoint sites by keyword (pass 'search')
No input parameters.
Upload File
Upload a local file into a folder (handles large files via upload session)
| Parameter | Required | Type | Description |
|---|---|---|---|
Site URL site_url | No | text | SharePoint site URL, resolved to a site automatically – provide this OR Site ID. e.g. https://acme.sharepoint.com/sites/Finance |
Site ID site_id | No | text | Graph site id (e.g. from a resolve-site-url step). Optional when Site URL is given. |
Local File local_path | Yes | text | Path to the local file to upload. |
Destination Folder folder_path | No | text | Destination folder in the library. Blank = library root. |
Destination Name dest_name | No | text | Override the uploaded file name (defaults to the local file name). |
On Conflict conflict_behavior | No | text | rename | replace | fail (default replace). |
Document Library ID drive_id | No | text | Specific document library, if the site has more than one. Optional – defaults to the site's default. |