Skip to main content

Folder exists

Check whether a mail folder exists, by top-level display name or by a path such as Inbox/Invoices, and return its id.

Command in the Microsoft 365 toolkit · id ooa.microsoft365/mail_folder_exists · 4 inputs (1 required), 2 outputs

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.
NameStringYesFolder display name, e.g. Invoices, or a path such as Inbox/Invoices/2026 (/ or \ between levels).
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
existsBooleanTrue when the folder exists.
folder_idStringFolder id, empty when it does not exist.