Skip to content

IMAP Save Attachment

Type: imap-save-attachment  ·  Package: SMTP / IMAP Email Activities v1.0.0

Downloads and saves email attachments to a local folder, and returns the list of saved routes. Key in processes that receive documents by mail (invoices, forms) and then process them.

Starting at mailId of an email (the .Id that returns IMAP Read), it downloads its attachments to outputPath. If you enter attachmentName, save only that attachment; if you skip it, save all.

ParameterEditorDescription
hosttextServidor IMAP.
usernametextUser.
passwordcredencialPassword or App Password. Use = credential(...).
mailIdtextMail UID (of correo.Id).
outputPathtextFolder where to save the attachments.
ParameterEditorDescription
portnumberPuerto IMAP. Por defecto 993.
foldertextFolder. By default INBOX.
attachmentNametextNombre exacto del adjunto a guardar. Si se omite, guarda todos.
securitylistCifrado: auto · none · ssl (def.) · starttls.
For Each items = = correos itemVariable = correo
└─ activities:
IMAP Save Attachment
host = "imap.gmail.com" username = = credential("bot")["user"] password = = credential("bot").ToPlainText()
mailId = = correo.Id outputPath = "C:/facturas"