Skip to content

Outlook 365 — Reply

Type: outlook365-reply  ·  Package: Outlook 365 v1.0.4  ·  Output: —

Replies to an existing email within the same thread. It keeps the subject and the conversation; by default it replies to the sender only.

It works on the session created with Outlook 365 — Connect. Pass it in the session parameter, or place this activity inside the body of Outlook 365 — Connect to inherit it automatically.

Outlook builds the reply just as when you reply by hand: subject with RE:, your body text at the top and the original message quoted below. It is sent right away (it is not left as a draft) and saved in Sent Items. Turn on replyAll to include the sender and all the original recipients.

The text is sent as the reply’s comment: write it as text; there is no HTML or attachment option. If you need to attach files, use Send with the same subject.

ParameterTypeDefaultDescription
idstring—ID of the email to reply to.
bodystring—Reply text (added above the original).
ParameterTypeDefaultDescription
sessionZoanOutlookMailSession—Outlook 365 — Connect session (inherited inside body).
replyAllboolfalseIf true, replies to all recipients.

This activity does not return a value.

MessageCause and fix
'id' is required.id is empty or the expression returned null.
Graph error ErrorItemNotFoundNo email exists with that ID anymore (deleted or moved). Reply before moving, or use the id returned by Move.
Graph error ErrorAccessDeniedThe connection lacks the Mail.Send permission.
Outlook 365 — Connect credential = credential("m365-support")
└─ body:
Outlook 365 — Get emails folder = "inbox" unreadOnly = true → output: requests
For each email in requests
└─ Outlook 365 — Reply id = email["id"] body = "Hi " + str(email["fromName"]) + ", we received your request."
Outlook 365 — Mark read/unread id = email["id"]