Outlook Get Emails
Outlook Get Emails
Section titled “Outlook Get Emails”Type: outlook-get-emails · Package: Outlook Activities v1.0.0 · Output: List
Reads emails from an Outlook folder and returns a list of messages (ZoanMail). It is the starting point of almost every email-based process: reading what arrived, scrolling through it, and acting on each message.
How it works
Section titled “How it works”Read the emails from the indicated folder (by default Inbox), ordered from most recent to oldest, up to maxCount. You can limit to unread (unreadOnly) or apply an Outlook DASL filter. Each mail in the list has properties like .Id (its EntryID), .Subject, .From, .Body, .Attachments — see ZoanMail.
Required parameters
Section titled “Required parameters”Ninguno.
Optional parameters
Section titled “Optional parameters”| Parameter | Editor | Description |
|---|---|---|
session | session | Outlook Connect session. If omitted, use the default account. |
folder | expression | Folder name. By default Inbox. Use / for subfolders: "Inbox/Clientes". |
maxCount | expression | Maximum number of emails to return. By default 50. |
unreadOnly | boolean | Return only unread ones. By default false. |
filter | expression | Filtro DASL de Outlook. Ej: "[Subject] = 'Factura'". |
Output
Section titled “Output”Returns a List of emails (ZoanMail). Go through it with For Each.
Example
Section titled “Example”Read unread emails with “Invoice” in the subject and process them:
Outlook Get Emails folder = "Inbox" unreadOnly = true filter = "[Subject] = 'Factura'" → output: correos
For Each items = = correos itemVariable = correo └─ activities: Log message = = "De: " + correo.From + " — " + correo.Subject Outlook Get Attachments entryId = = correo.Id outputDir = "C:/facturas" → output: archivos Outlook Mark Read entryId = = correo.IdRelated activities
Section titled “Related activities”- Outlook Get Attachments — save email attachments.
- Outlook Reply / Outlook Move Email — act on an email.
- Data types › ZoanMail — properties of each mail.