Skip to main content

Save attachments

Save an email's file attachments to a folder, optionally only names matching a pattern such as *.pdf.

Command in the Microsoft 365 toolkit · id ooa.microsoft365/save_mail_attachments · 8 inputs (2 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.
IDStringYesEmail id.
Target folderFileYesFolder to save into.
Name patternStringNo*Only names matching this pattern.
OverwriteBooleanNofalseReplace files of the same name instead of adding a number such as (2).
Include inlineBooleanNotrueAlso save images embedded in the body, such as signature logos.
MailboxStringNomeMailbox: me, or a user's email address (needs application permission).
Endpoint addressStringNohttps://graph.microsoft.com/v1.0Graph endpoint; change only for national clouds or testing.

Outputs​

OutputTypeWhat it is
filesListSaved file paths.