Send Email step
Summarize
Summary of Send Email step
The Send Email step in Workflow Studio enables you to send emails to specified users or groups as part of an automated flow in ServiceNow. This action is designed for users with theactiondesignerrole who want to create custom actions involving email notifications tied to specific records.
Show less
Inputs
- Target Record: The record associated with the email, allowing replies to update this record.
- Table: The table containing the target record.
- To: Email addresses of primary recipients, entered as comma- or space-separated strings or as data pills from User or Group records. When emailing groups, ensure the group has an email address or that the "Include members" option is enabled to send to members.
- CC and BCC: Additional recipients copied or blind copied, also accepting comma- or space-separated email addresses or data pills.
- Subject and Body: The email’s subject and content, supporting text input or data pills. Note that body formatting uses inline styles, and email template variables must be replaced with data pills as the action does not process template variables.
- Action error evaluation: Configure whether the flow continues or evaluates errors if the email step fails, supporting custom error handling.
Outputs
The action produces an Email record output representing the email created, which can be used as input in subsequent flow steps.
Testing and Considerations
- Verify email generation by reviewing the email record in the Email [sysemail] table; the Headers field shows success status.
- Access controls apply; if flows run as the initiating user, ensure that user has email permissions.
- To test access, impersonate typical email senders and trigger the flow manually.
- The maximum recipient count is limited by the glide.email.smtp.maxrecipients system property, which can be adjusted as needed.
Send an email to specified users or groups as an action in a flow.
Roles and availability
Available as an Workflow Studio action step. Users with the action_designer role can create a custom action with one or more action steps.
Inputs
Provide a value for each input that your flow needs. To add dynamic values, you can also drag and drop pills from the Data panel or select them from the pill picker.
- Target Record
- Data type: Document ID
Record that the email is associated to. When a user sends a reply to your email, the target record is updated with the reply email content.
- Table
- Data type: Table Name
Table containing the target record.
- To
- Data type: String
The main recipients of the email. Enter a list of user email addresses separated by commas or white spaces. You can also drag data pills that contain email addresses into the field, such as a User or Group record. For example, if you want to send an email to the group assigned to the incident, drag the [Assignment group] data pill from the data panel.
To send email to a group, you must provide a Group email address. To send email to group members, the group must have the Include members option enabled.
Note:The number of email recipients must be equal to or less than the maximum number set by the glide.email.smtp.max_recipients system property. See for information about setting this value. - CC
- Data type: String
Additional recipients copied on this email. Enter a list of user email addresses separated by commas or white spaces. You can also drag data pills that contain email addresses into the field.
- BCC
- Data type: String
Additional recipients of this email, who are visible only to the sender (blind copied). Enter a list of user email addresses separated by commas or white spaces. You can also drag data pills that contain email addresses into the field.
- Subject
- Data type: String
Subject of the email. You can enter text or drag data pills into the field.
- Body
-
The content of the message body. You can enter text or drag data pills into the field. The editor formatting options add inline styles. There is no style sheet associated with an email body. You can add your own inline style sheet to this HTML input.Note:You can partially reuse content from the Email Template [sysevent_email_template] table with some manual editing. The Send Email action can't process Email template variables, which are strings that start with the dollar sign character and include content in curly braces. You must replace email variables with references to data pills. For example, replace the string ${number} with a data pill reference to an incident record number.
Action error evaluation
- If this step fails
- Data type: Choice
Option to continue running the next step or go to error evaluation. To use the step status code or message for a custom action error condition, see Action error evaluation.
Outputs
These outputs appear in the Data panel. You can use them as inputs elsewhere in your action or flow.
- Data type: Record
Email record created.
Testing the email step
To verify that the email was generated when testing the action, review the email record in the Email [sys_email] table. The Headers field indicates whether the email was successfully
generated. For example: ACL restrictions apply to the Send Email action. If you configured your flow to run as the user who initiates the session, ensure that the user can access email. To test access controls for a Send Email action,
impersonate a typical email sender and manually trigger the flow.