Download
Download a file from SharePoint
Download a file by id or path from a SharePoint document library and stores it in Kestra's internal storage.
type: "io.kestra.plugin.microsoft365.sharepoint.Download"Examples
Download a file from SharePoint
id: microsoft365_sharepoint_download
namespace: company.team
tasks:
- id: download
type: io.kestra.plugin.microsoft365.sharepoint.Download
tenantId: "{{ secret('AZURE_TENANT_ID') }}"
clientId: "{{ secret('AZURE_CLIENT_ID') }}"
clientSecret: "{{ secret('AZURE_CLIENT_SECRET') }}"
siteId: "contoso.sharepoint.com,2C712604-1370-44E7-A1F5-426573FDA80A,2D2244C3-251A-49EA-93A8-39E1C3A060FE"
driveId: "b!BCTBCKSP50iysCOFPU"
itemId: "01BYE5RZ6QN3ZWBTURF3F43DSUNZYRZD5Q"
Download a file by path
id: microsoft365_sharepoint_download_by_path
namespace: company.team
tasks:
- id: download
type: io.kestra.plugin.microsoft365.sharepoint.Download
tenantId: "{{ secret('AZURE_TENANT_ID') }}"
clientId: "{{ secret('AZURE_CLIENT_ID') }}"
clientSecret: "{{ secret('AZURE_CLIENT_SECRET') }}"
siteId: "contoso.sharepoint.com,2C712604-1370-44E7-A1F5-426573FDA80A,2D2244C3-251A-49EA-93A8-39E1C3A060FE"
driveId: "b!BCTBCKSP50iysCOFPU"
itemPath: "/Documents/report.pdf"
Properties
clientId *Requiredstring
Azure Client ID
The client ID registered in Azure
clientSecret *Requiredstring
Azure Client Secret
The client secret for the registered application
siteId *Requiredstring
Sharepoint Site ID
The id of the
tenantId *Requiredstring
Azure Tenant ID
The Azure Active Directory tenant ID
driveId string
Drive ID
The id of the document library within the SharePoint site. If not provided, the default document library will be used.
itemId string
Item ID
The ID of the file to download. Either itemId or itemPath must be provided.
itemPath string
Item path
The path to the file relative to the drive root (e.g., '/Documents/file.txt'). Either itemId or itemPath must be provided.
Outputs
itemId string
The ID of the downloaded item
name string
The name of the downloaded file
size integer
The size of the downloaded file in bytes
uri string
The URI of the file in Kestra's internal storage
webUrl string
The web URL of the file in SharePoint