Send Email action

  • Release version: Xanadu
  • Updated August 1, 2024
  • 3 minutes to read
  • Summarize
    Summarized using AI
    This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.

    Summary of Send Email action

    The Send Email action in ServiceNow allows you to send emails to specified users or groups as part of a flow within Workflow Studio. It is available to users with theflowdesigneroradminroles. This action is designed to associate emails with specific records and manage replies effectively by updating the target record with any email responses.

    Show full answer Show less

    Inputs

    • Target Record: The record (Document ID) that the email relates to, enabling reply tracking.
    • Table: Name of the table containing the target record.
    • To: List of main recipient email addresses (users or groups). You can drag data pills with email addresses, such as user or group records. To send emails to groups, either use the group email address or ensure the group includes members for individual delivery.
    • CC and BCC: Additional recipients copied or blind copied on the email. Supports static email addresses or dynamic data pills.
    • Subject: Email subject, which can include static text or dynamic data pills.
    • Body: Email message content with text or dynamic data pills. Inline styling can be added, but there is no default stylesheet. Partial reuse of Email Template content is possible but requires manual editing to replace variables with data pills.

    Important Considerations

    • The number of recipients must not exceed the limit set by the glide.email.smtp.maxrecipients system property.
    • Email templates with variables (e.g., ${number}) are not directly supported; replace variables with data pills.
    • ACL restrictions apply; ensure the user running the flow has email access.

    Outputs

    The action outputs an Email record which appears in the Data panel and can be used as input for other actions or flows.

    Testing and Configuration

    • Verify email generation by checking the Email [sysemail] table and reviewing the Headers field to confirm successful email creation.
    • Impersonate typical users to test access control and permissions for sending emails.
    • For configuring email sending and receiving on your instance, use the Email Administration settings.

    Practical Example

    An example use case is sending an email automatically when an incident is created with specific conditions (e.g., Assigned to field is not empty and category is inquiry/help). The email is sent to the assigned user, with the subject and body referencing the incident number dynamically.

    Send an email to specified users or groups as an action in a flow.

    Roles and availability

    Available as a Workflow Studio ServiceNow core action. Users with the flow_designer or admin role can add an action to a flow and define configuration details.

    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 Minimize SMTP Recipient Quantity [Updated in Security Center 1.3] 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.

    Outputs

    These outputs appear in the Data panel. You can use them as inputs elsewhere in your action or flow.

    Email
    Data type: Record

    Email record created.

    Configuring instance Email

    For information about configuring your instance to send and receive email messages, see Configure email administration.

    Testing the email action

    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:Email header generated by the Send Email action 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.

    Send email when incident created

    Flow that sends an email message to the assigned to user of an incident record

    In this example, the system sends an email whenever an incident record is created where the Assigned to filed is not empty and when the incident category is inquiry/help. The incident trigger record provides the values used by the send email action. For example, the email is sent to the email address of the assigned to user, and the email subject and email body both refer to the incident number.