Blog
Read the latest blogs
Find tutorials, guides and use case examples in the
Learning center
The Send Email block is used to send an email from within an automation case as it executes. This can be useful for office automation, monitoring flows, or debugging purposes.
See the HTTP Request lesson for an example of how to use the Send E-mail block in a flow.
When fully expanded, the following is an example of the Send Email block with sample data:
The left blue input connector in the header is used to dynamically inject data into the email fields from other blocks.
The right blue output connector in the header is triggered when the email is sent and can pass data from the email fields to other blocks.
The block title Send Email can be changed by double-clicking on it and entering a new title.
The To field specifies the recipient’s email address. This can be manually entered or injected dynamically from another block via the left blue input connector.
Once set, this field can also send its value to other blocks via the right blue output connector.
The Subject field defines the email subject line. This can be manually entered or injected dynamically from another block via the left blue input connector.
This field can also be connected to other blocks via the right blue output connector.
The Body field contains the main content of the email. This can be typed directly or injected dynamically from another block via the left blue input connector.
This field can also send its value to other blocks using the right blue output connector.
Clicking the Add Fields button adds a dynamic field that can be referenced in the To, Subject, and Body fields or used in other blocks.
To insert the value of a dynamic field, right-click the Body or Subject field and select Insert token, then enter the field’s name. Dynamic fields can be renamed by double-clicking on them, and any connected tokens will update automatically.
Note: This feature is available starting from Release 2025.1.
Clicking the Add Attachment button allows the inclusion of files in the email. The attachment input appears directly below the button and can receive files dynamically via the left blue input connector.
To remove an attachment, click the X icon on the right side of the file.
The right green output connector is triggered if the email fails to send due to issues such as an invalid recipient address, network failure, or authentication errors.
This connector can be used to branch the execution flow depending on whether the email was successfully sent or encountered an issue.
It should be noted that “scheduled actions” in the Scheduler can also send e-mail when an automation case is completed. This is typically more useful for reporting failures. Take the Schedule and reports lesson to learn how to configure e-mail as part of a schedule.
Updated 17.03.25
©2024, Leapwork. All rights reserved.