IMAP Save Attachment
IMAP Save Attachment
Section titled “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.
How it works
Section titled “How it works”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.
Required parameters
Section titled “Required parameters”| Parameter | Editor | Description |
|---|---|---|
host | text | Servidor IMAP. |
username | text | User. |
password | credencial | Password or App Password. Use = credential(...). |
mailId | text | Mail UID (of correo.Id). |
outputPath | text | Folder where to save the attachments. |
Optional parameters
Section titled “Optional parameters”| Parameter | Editor | Description |
|---|---|---|
port | number | Puerto IMAP. Por defecto 993. |
folder | text | Folder. By default INBOX. |
attachmentName | text | Nombre exacto del adjunto a guardar. Si se omite, guarda todos. |
security | list | Cifrado: auto · none · ssl (def.) · starttls. |
Example
Section titled “Example”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"Related activities
Section titled “Related activities”- IMAP Read — get the emails (and their
mailId). - Create Directory — ensure that
outputPathexists.