Skip to content

Outlook Activities

Version: 1.0.5  ·  ID: zoan-packages-outlook  ·  Author: Zoan Software

The Outlook package automates Microsoft Outlook desktop: sending emails, reading the inbox, downloading attachments, moving messages between folders, replying and deleting. It is ideal for mail-based processes: reading orders that arrive by email, downloading attached invoices, sending notifications, classifying messages. Because it works with the accounts Outlook already has configured, you need no servers, ports or passwords in the playbook.

Most activities work directly, with no previous steps: they use Outlook’s default account. For example, an Outlook Get Emails on its own reads your Inbox. In that mode, each activity opens and releases its own connection to Outlook.

If you need a specific account (not the default one) or will run several operations in a row efficiently, open a session with Outlook Connect:

Outlook Connect account = "support@company.com"
└─ body:
Outlook Get Emails folder = "Inbox" → output: emails
... process ...

Inside the body, activities inherit the session (and its account) automatically, and it closes by itself at the end. Without body, Outlook Connect returns the session as a variable and you close it with Outlook Close.

The folder and targetFolder parameters accept a path with / for subfolders ("Inbox/Processed"). The first segment can be:

  • An English alias of a well-known folder: inbox, sent, drafts, deleted, junk, outbox (case-insensitive).
  • The name Outlook shows in your language: "Bandeja de entrada/Procesados" in a Spanish Outlook, "Sent Items".
  • Any other name: it is looked up as a subfolder of the Inbox ("Customers" = Inbox/Customers).

Names are compared case-insensitively. If a segment does not exist, the error says at which level of the path it failed and how many subfolders the parent folder has.

The central pattern of this package: Outlook Get Emails returns a list of emails (ZoanMail). Each email has a unique identifier, its EntryID, available as .Id. The other activities (save attachments, move, mark, delete, reply) receive that entryId to know which email to act on.

Outlook Get Emails folder = "Inbox" unreadOnly = true → output: emails
For Each items = emails itemVariable = email
└─ activities:
Outlook Get Attachments entryId = email.Id outputDir = "C:/attachments" → output: files
Outlook Mark Read entryId = email.Id
Outlook Move Email entryId = email.Id targetFolder = "Inbox/Processed"
PropertyTypeValue in Outlook
.IdstringThe message EntryID.
.SubjectstringSubject ("" if empty).
.FromstringSender address. For internal Exchange senders, Outlook may return the internal address instead of the SMTP one.
.To / .Ccstring[]Recipients as Outlook shows them (names or addresses), split into a list.
.Bccstring[]Always empty.
.BodystringPlain-text body.
.IsHtmlboolAlways false (the body is delivered as plain text).
.SentAtDateTimeDate and time the message was received.
.IsReadbooltrue if read.
.AttachmentsZoanAttachment[]Always empty: to get attachments use Outlook Get Attachments.

The full type is in Data types › ZoanMail.

ActivityTypeOutputWhat it does
Outlook Connectoutlook-connectZoanOutlookSessionOpens a session (specific account / several operations)
Outlook Closeoutlook-close—Closes an open session
ActivityTypeOutputWhat it does
Outlook Send Emailoutlook-send—Sends an email
Outlook Replyoutlook-reply—Replies to an email
ActivityTypeOutputWhat it does
Outlook Get Emailsoutlook-get-emailsList<ZoanMail>Reads emails from a folder
Outlook Get Attachmentsoutlook-get-attachmentsList<string>Saves the attachments of an email
ActivityTypeOutputWhat it does
Outlook Mark Readoutlook-mark-read—Marks an email as read/unread
Outlook Move Emailoutlook-move-email—Moves an email to another folder
Outlook Delete Emailoutlook-delete-email—Sends an email to Deleted Items