Skip to main content
Version: 0.24.0

Email Actions

The Email group reads, sends and files e-mail. It was rebuilt from scratch since 0.14.2.

Migrating from 0.14.2

There is no Create Client action any more. Every action in this group takes an Email Account entry from the Secure Vault instead of receiving a client object built inside the scenario.

The old actions still appear in saved scenarios as Create Client (deprecated), Read Emails (deprecated), Send Email (deprecated), Move Email (deprecated) and Delete Email (deprecated). They keep working, but they are no longer offered in the actions menu. Rebuild those steps with the actions below.

Before you start

Create an Email Account entry in the Vault — see Email Account entries. An entry can hold an IMAP half, an SMTP half, or both:

ActionNeeds
Read Emails, Move Email, Copy Email, Delete Email, Mark Email Seen / UnseenIMAP
Send Email, Forward EmailSMTP

Every action then has an Email Account parameter where you pick the Vault entry by its key.

Any e-mail action's form with the Email Account dropdown open, listing the Email Account entries available from the Vault


Read Emails

Fetches messages and exposes them as a list you can loop over.

The Read Emails form with Filter by seen status open, plus the

ParameterDescription
Email AccountVault entry with an IMAP half.
FolderMailbox folder to read. Default INBOX.
LimitMaximum number of messages to fetch. Default 10. Optional.
Filter by seen statusunset (default) fetches regardless of read state, seen only already-read messages, unseen only unread ones.
Save Emails To VariableVariable that receives the list. Default emails.
tip

Combine Filter by seen status: unseen with Mark Email Seen / Unseen at the end of the loop body. The scenario then processes each message exactly once, even if it runs every five minutes.

Send Email

The Send Email form with Send as HTML visible

ParameterDescription
Email AccountVault entry with an SMTP half.
RecipientsAddresses separated by semicolons.
SubjectMessage subject. Optional.
MessageBody text. Accepts variables.
Send as HTMLSends the body as HTML instead of plain text. Default off.
Save as DraftComposes the message — recipients, subject, body, attachments — and saves it into the mailbox's Drafts folder instead of sending it. Default off.
Drafts FolderAppears only when Save as Draft is on. Name of the drafts folder, for servers that call it something else than Drafts (e.g. INBOX.Drafts).

Letting a person review the message first

Save as Draft is for anything that needs a human eye before it leaves the company — invoices, customer replies, anything with a number in it. The robot writes the message, a person opens their mail client, checks or edits it, and hits Send themselves.

warning

Saving a draft writes into the mailbox, so it needs IMAP — not just SMTP. An account using Basic (SMTP) authentication must also have its Receiving (IMAP) section filled in on the Vault entry, or Save as Draft fails. See Email Account entries.

Forward Email

Forwards a message from a Read Emails result to other recipients.

The Forward Email form inside a loop, with Email Message bound to the loop's current item

ParameterDescription
Email AccountVault entry with an SMTP half.
Email MessageThe message to forward — normally the current item of a loop over Read Emails.
RecipientsAddresses separated by semicolons.
SubjectOverrides the forwarded subject. Optional.
Additional MessageText prepended above the forwarded content. Optional.

Move Email / Copy Email

Files a message into another folder. Move removes it from the source folder; Copy leaves it in place.

The Move Email form

ParameterDescription
Email AccountVault entry with an IMAP half.
Email MessageThe message to file.
Destination FolderTarget folder. Default Archive.

Delete Email

The Delete Email form

ParameterDescription
Email AccountVault entry with an IMAP half.
Email MessageThe message to delete.
warning

Whether this moves the message to Trash or removes it permanently depends on the mail server. Prefer Move Email into an archive folder when the message might be needed again.

Mark Email Seen / Unseen

The Mark Email Seen / Unseen form showing the Mark as seen toggle

ParameterDescription
Email AccountVault entry with an IMAP half.
Email MessageThe message to flag.
Mark as seenOn (default) marks it read; off marks it unread.

Typical mailbox-processing scenario

StepActionNotes
1Read EmailsINBOX, Filter by seen status: unseen, into emails
2ConditionExit early if emails is empty
3Repeat for each item inover emails, current item email
4… processing …inside the loop — save attachments, read data, enter it into the target system
5Mark Email Seen / Unseeninside the loop, so the message is not picked up again
6Move Emailinside the loop, into Processed
7Send As Emailafter the loop — the run report, see Notification