Skip to main content

Export to PDF

Convert a Word, Excel, PowerPoint or other supported file in the drive to PDF and save it locally.

Command in the Microsoft 365 toolkit · id ooa.microsoft365/export_to_pdf · 6 inputs (1 required), 1 output

Inputs​

InputTypeRequiredDefaultWhat it is
Access tokenCredentialNoMicrosoft Graph access token from the vault; or leave it empty and choose a connection that signs in, which gets and renews the token.
ItemStringYesPath in the drive (e.g. Reports/q4.xlsx), or id:{item-id}.
Local pathFileNoWhere to save the PDF: a file or a folder; the run's temporary folder when empty (G3).
DriveStringNome/driveWhose files: me/drive (your OneDrive), a person (ann@acme.com), a SharePoint site (contoso.sharepoint.com:/sites/Finance), a library of a site by name (contoso.sharepoint.com:/sites/Finance:/Invoices), or sites/{site-id}/drive or drives/{drive-id}. With an app sign-in, name a person or site.
Endpoint addressStringNohttps://graph.microsoft.com/v1.0Graph endpoint; change only for national clouds or testing.
OverwriteBooleanNotrueReplace an existing local file; when false a number such as (2) is added to the name.

Outputs​

OutputTypeWhat it is
pathFileSaved PDF path.