Export a file from OneDrive or SharePoint to a different format.

yaml
type: "io.kestra.plugin.microsoft365.oneshare.Export"

Export file to PDF format

yaml
id: export_to_pdf
namespace: company.team

tasks:
  - id: export
    type: io.kestra.plugin.microsoft365.oneshare.Export
    tenantId: "{{ secret('TENANT_ID') }}"
    clientId: "{{ secret('CLIENT_ID') }}"
    clientSecret: "{{ secret('CLIENT_SECRET') }}"
    driveId: "b!abc123def456"
    itemId: "01ABC123DEF456GHI789"
    format: PDF

Export file to HTML format

yaml
id: export_to_html
namespace: company.team

tasks:
  - id: export_html
    type: io.kestra.plugin.microsoft365.oneshare.Export
    tenantId: "{{ secret('TENANT_ID') }}"
    clientId: "{{ secret('CLIENT_ID') }}"
    clientSecret: "{{ secret('CLIENT_SECRET') }}"
    driveId: "b!abc123def456"
    itemId: "01EXCEL123456789"
    format: HTML
Properties

The ID of the drive.

Possible Values
PDFHTML

The format to export the file to.

PDF format supports most file types (doc, docx, ppt, xlsx, etc.). HTML format supports loop, fluid, and wbtx files only.

The ID of the item (file) to export.

Client ID

Client ID of the Azure service principal. If you don't have a service principal, refer to create a service principal with Azure CLI.

Client Secret

Service principal client secret. Use this for Client Secret authentication. Provide clientId, tenantId, and clientSecret. Either clientSecret OR pemCertificate must be provided, not both.

PEM Certificate

text
Alternative authentication method using certificate-based authentication.
Use this for Client Certificate authentication. Provide clientId, tenantId, and pemCertificate.
Either clientSecret OR pemCertificate must be provided, not both.

Tenant ID

Format uri

The URI of the exported file in Kestra's internal storage.