Outlook Reply
Outlook Reply
Section titled “Outlook Reply”Type: outlook-reply · Package: Outlook Activities v1.0.4
Replies to an existing email, keeping the conversation thread. It can reply only to the sender or to all recipients (reply all), and attach files.
How it works
Section titled “How it works”Given the EntryID of the email to answer (from Outlook Get Emails), it creates the reply as Outlook would (subject with the reply prefix and the original recipients) and sends it right away:
- The body is your
bodytext, a blank line and the quoted original message below. The reply is composed as plain text. - With
replyAll = true, it replies to all original recipients instead of only the sender. attachmentsthat do not exist on disk are skipped (the log says how many) and the reply is sent anyway.- The reply is kept in Sent Items, like any email sent from Outlook.
Required parameters
Section titled “Required parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
entryId | string | — | EntryID of the email to reply to (from email.Id). |
body | string | — | Reply text, placed before the quoted message. |
Optional parameters
Section titled “Optional parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
session | ZoanOutlookSession | — | Session from Outlook Connect. Inherited inside the Connect body; without a session the default account is used. |
replyAll | bool | false | Reply to all recipients of the original email. |
attachments | string | List | — | Path of a local file or list of paths to attach. Empty or missing paths are skipped. |
Output
Section titled “Output”This activity does not return a value.
Common errors
Section titled “Common errors”| Message | Cause and fix |
|---|---|
'entryId' is required. | The parameter is missing or the expression returned null. |
| Outlook error when opening the item | The EntryID no longer exists (the email was moved or deleted earlier). Reply before moving or deleting the email. |
| Outlook error when sending | Outlook could not send (offline, account without send permission, attachment blocked by size or type). Check Outlook on the robot’s machine. |
Example
Section titled “Example”Automatically acknowledge each email, with a receipt attached:
For Each items = emails itemVariable = email └─ activities: Outlook Reply entryId = email.Id body = "We received your message of " + email.SentAt.ToString("yyyy-MM-dd") + " and are processing it. Thank you." attachments = "C:/templates/receipt.pdf" Outlook Move Email entryId = email.Id targetFolder = "Inbox/Answered"Related activities
Section titled “Related activities”- Outlook Send Email — send a new email.
- Outlook Get Emails — get the email to reply to.