Skip to main content

Save all attachments

Save the attachments of every email in one or more folders that matches the filters, optionally marking those emails as read.

Command in the Email toolkit · id ooa.email/save_all_attachments · 12 inputs (1 required), 2 outputs

Inputs​

InputTypeRequiredDefaultWhat it is
Target folderFileYesFolder to save into.
Name patternStringNo*Only names matching this pattern, e.g. *.pdf.
FolderStringNoINBOXMail folder; several separated by ; and * for any text, e.g. INBOX; Invoices/*.
Unread onlyBooleanNofalseOlder steps: only unread emails. New steps choose the status instead.
From containsStringNoSender contains this text; separate several with ; to match any of them.
Subject containsStringNoSubject contains this text; in double quotes ("Invoice 7") the whole subject must be exactly that; separate several with ; to match any of them.
SinceDateTimeNoReceived on or after this date.
BeforeDateTimeNoReceived before this date.
OverwriteBooleanNofalseReplace files of the same name instead of adding a number such as (2).
Mark readBooleanNofalseMark each matching email as read afterwards (IMAP only); otherwise read status stays as it was.
SessionStringNomailSession name of the open mailbox.
StatusStringNoanyWhich emails: any, only unread or only read.

Outputs​

OutputTypeWhat it is
filesListSaved file paths.
email_countNumberNumber of emails that matched.