Delete Outlook Email
Description
The Delete Outlook Email activity deletes an email from a Microsoft 365 (Outlook) mailbox using a configured Outlook connection.
Common settings
Use Process Data to bind supported inputs to workflow values or upstream outputs. See Common Activity Features for shared execution, error-handling, and output-persistence settings. Availability depends on the activity.
Design-Time Configuration
Display Text
Specifies the activity's display name as shown on the workflow canvas.
Connection Name
Specifies the Outlook (Microsoft 365) connection to use for deleting the email.
Mail Folder
Specifies the mail folder that contains the email.
- Examples:
INBOX,Sent,Drafts - Default value:
INBOX
Message Identifier
Specifies the provider-specific message identifier (Microsoft Graph message ID) of the email to delete.
Use the MessageId value returned by the Read Outlook Email activity.
Execution Control (Wait All Incoming)
Controls how the activity behaves when multiple incoming execution paths converge.
For detailed behavior and usage guidelines, see Execution Control – Wait All Incoming.
Error Handling (On Error)
Defines how the workflow proceeds if the activity encounters an error.
Supported strategies include Fault, Continue, Suspend, and Retry.
For details, see On Error Handler.
Output
Deleted Email
Returns the deleted email (if found), serialized as JSON.
The output includes the following properties:
- From – Sender email address
- To – Recipient email addresses
- Subject – Email subject
- TextBody – Plain text body
- HtmlBody – HTML body
- ReceivedAt – Date and time the email was received
- MessageId – Microsoft Graph message identifier
- InternalId – Internet Message-ID header value
- Attachments – List of attachment metadata
Example: Use a read result
Read messages with Read Outlook Email and iterate over Emails. Bind the current email's MessageId to Message Identifier. Use the same connection that produced the message.
Delete only after the business processing that requires the message has completed.
Do not bind InternalId: it contains the Internet Message-ID header rather than the mailbox lookup key. See Message identifiers. A message that cannot be found can return an empty email output; handle activity errors separately from a missing result.