Email category

reference brazil Updated Sep 10, 2026 7 min read test-steps-email-category.md
Raw file servicenow.com

Use Automated Test Framework (ATF) to test email notifications, outbound email flows, and inbound email responses.

Validate Outbound Email

Verify that a certain outbound email exists by searching for it in the Email [sys_email] table.

Use this step to test any email-generating script that isn't captured in the Validate Outbound Email Generated by Flow or Validate Outbound Email Generated by Notification test steps.

Field

Description

Execution order

Integer specifying the order in which the test executes this step.As you create steps, the system automatically assigns each step an incremental value. This value causes the test to execute steps in the order that you created them. You can change this default order by editing the Execution order values.

Application

Application scope in which the system runs this step.

Active

Option to activate this test step for use.

Test

Name of the test that you're adding the step to.

Step config

Name of the step.

Notes

Notes about the test step.

Conditions

Conditions used to filter outbound emails. For example, to find an email that was sent to user@example.com, set the condition to [Recipients] [is] [user@example.com].

Table

Table to be queried. By default, this step queries only the Email [sys_email] table.

**Note:** During testing, this step may take longer than expected to execute. The step times out after two minutes by default.

Validate Outbound Email Generated by Flow

Verify that a certain outbound email exists by searching for it in the Email [sys_email] table. Use this step to test that a flow is triggered as expected.

Note: This step searches only for emails that are created by a flow Send Email action. To find an email that was sent after a notification was triggered in a flow, use the Validate Outbound Email Generated by Notification step instead. To find an email that was created in any other flow action, such as a custom scripted action, use the Validate Outbound Email step instead.

Field

Description

Execution order

Integer specifying the order in which the test executes this step.As you create steps, the system automatically assigns each step an incremental value. This value causes the test to execute steps in the order that you created them. You can change this default order by editing the Execution order values.

Application

Application scope in which the system runs this step.

Active

Option to activate this test step for use.

Test

Name of the test that you're adding the step to.

Step config

Name of the step.

Notes

Notes about the test step.

Source Flow

Flow that the outbound email was created from.

Conditions

Conditions used to filter outbound emails. For example, to find an email that was sent to user@example.com, set the condition to [Recipients] [is] [user@example.com].

Table

Table to be queried. By default, this step queries only the Email [sys_email] table.

**Note:** During testing, this step may take longer than expected to execute. The step times out after two minutes by default.

Validate Outbound Email Generated by Notification

Verify that a certain outbound email exists by searching for it in the Email [sys_email] table. Use this step to test that an email notification is triggered as expected.

Field

Description

Execution order

Integer specifying the order in which the test executes this step.As you create steps, the system automatically assigns each step an incremental value. This value causes the test to execute steps in the order that you created them. You can change this default order by editing the Execution order values.

Application

Application scope in which the system runs this step.

Active

Option to activate this test step for use.

Test

Name of the test that you're adding the step to.

Step config

Name of the step.

Notes

Notes about the test step.

Source Notification

Notification that the outbound email was created from. This field references the Notification [sysevent_email_action] table.

Conditions

Conditions used to filter outbound emails. For example, to find an email that was sent to user@example.com, set the condition to [Recipients] [is] [user@example.com].

Table

Table to be queried. By default, this step queries only the Email [sys_email] table.

**Note:** During testing, this step may take longer than expected to execute. The step times out after two minutes by default.

Generate Inbound Email

Create an incoming email record to test an inbound email flow or an inbound email action.

Field

Description

Execution order

Integer specifying the order in which the test executes this step.As you create steps, the system automatically assigns each step an incremental value. This value causes the test to execute steps in the order that you created them. You can change this default order by editing the Execution order values.

Application

Application scope in which the system runs this step.

Active

Option to activate this test step for use.

Test

Name of the test that you're adding the step to.

Step config

Name of the step.

Notes

Notes about the test step.

From

Address of the email sender. You can manually enter an email address or reference an email address from a user record. If you manually enter an email address, the system matches the address to an existing user record during testing.

To

Address of the email recipient. You can manually enter an email address or reference an email address from a user record. If you manually enter an email address, the system matches the address to an existing user record during testing.

Subject

Subject of the email. You can enter text or reference a string output from a previous test step.

Body

Content of the message body. You can enter text or reference a string output from a previous test step.

Field

Description

output_email_record

Record in the Email [sys_email] table.

The Receive type is New and the Type is send - ready. For more information on what these fields mean, see System email log and mailboxes.

## Generate Inbound Reply email

Create a reply email record to test how the system handles a user response to an email notification.

Field

Description

Execution order

Integer specifying the order in which the test executes this step.As you create steps, the system automatically assigns each step an incremental value. This value causes the test to execute steps in the order that you created them. You can change this default order by editing the Execution order values.

Application

Application scope in which the system runs this step.

Active

Option to activate this test step for use.

Test

Name of the test that you're adding the step to.

Step config

Name of the step.

Notes

Notes about the test step.

Target Table

Table of the target record.

Target Record

Record that the reply email updates. Selecting a target record also applies a watermark to the reply email.

From

Address of the email sender. You can manually enter an email address or reference an email address from a user record. If you manually enter an email address, the system matches the address to an existing user record during testing.

To

Address of the email recipient. You can manually enter an email address or reference an email address from a user record. If you manually enter an email address, the system matches the address to an existing user record during testing.

Subject

Subject of the email. You can enter text or reference a string output from a previous test step.

Body

Content of the message body. You can enter text or reference a string output from a previous test step.

Field

Description

output_reply_email_record

Record in the Email [sys_email] table.

The Receive type is Reply and the Type is send - ready. For more information on what these fields mean, see System email log and mailboxes.

## Generate Random String

Generate a string of random alphanumeric characters that you can use as test data for another step.

Field

Description

Execution order

Integer specifying the order in which the test executes this step.As you create steps, the system automatically assigns each step an incremental value. This value causes the test to execute steps in the order that you created them. You can change this default order by editing the Execution order values.

Application

Application scope in which the system runs this step.

Active

Option to activate this test step for use.

Test

Name of the test that you're adding the step to.

Step config

Name of the step.

Notes

Notes about the test step.

Length

Number of characters in the generated string. The maximum length is 10,000 characters. If you leave the field blank, the string length is 10 characters by default.

|Field|Description| |-----|-----------| |random\_string|String of random alphanumeric characters.|
Search documentation
Search document titles and file paths on the brazil branch