
Microsoft 365 Export
CertifiedExport SharePoint file to PDF or HTML
Microsoft 365 Export
Export SharePoint file to PDF or HTML
Converts a single SharePoint file to PDF or HTML via Microsoft Graph content?format= and stores the converted copy in Kestra internal storage. Only Office document types are supported by Graph; other files may fail. Requires Microsoft Graph permissions Files.Read.All and Sites.Read.All.
type: io.kestra.plugin.microsoft365.sharepoint.ExportExamples
Export a Word document to PDF
id: microsoft365_sharepoint_export_file
namespace: company.team
tasks:
- id: export
type: io.kestra.plugin.microsoft365.sharepoint.Export
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!Xyz123..."
itemId: "01ABCDEF123456789"
format: "pdf"
Export an Excel file to PDF
id: microsoft365_sharepoint_export_excel
namespace: company.team
tasks:
- id: export
type: io.kestra.plugin.microsoft365.sharepoint.Export
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"
itemPath: "/Documents/report.xlsx"
format: "pdf"
Properties
clientId *Requiredstring
Azure client ID
Application (client) ID of the registered Entra ID app
clientSecret *Requiredstring
Azure client secret
Client secret for the app registration; required for client-credentials flow
format *Requiredstring
HTMLPDFOutput format
Conversion target; supported values are PDF or HTML
siteId *Requiredstring
SharePoint site ID
Site identifier in Graph format hostname,siteId,webId
tenantId *Requiredstring
Azure tenant ID
Azure AD (Entra ID) tenant GUID used for Graph authentication
driveId string
Drive ID
Document library ID; if omitted the first drive returned for the site is used
itemId string
Item ID
ID of the file to export; either itemId or itemPath is required
itemPath string
Item path
Path relative to the drive root (e.g., '/Documents/file.docx'); either itemPath or itemId is required
pluginDefaultsRef Non-dynamicstring
Reference (ref) of the pluginDefaults to apply to this task.
Outputs
format string
Format the file was converted to
itemId string
ID of the file
name string
Name of the exported file with new extension
originalName string
Original name of the file in SharePoint
originalSize integer
Size of the original file in bytes (before conversion)
uri string
URI of the file in Kestra internal storage
webUrl string
Web URL of the file in SharePoint