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 Example Activity Definition: Send email
This document provides a detailed example of configuring a "Send email" activity definition in the ServiceNow Zurich release.It guides ServiceNow customers through defining the activity's core properties, associating backend automation, configuring the user experience, and managing runtime data and status tracking.This activity enables automated email sending as part of broader workflows or playbooks.
Show full answerShow less
Key Features
Basic Details: Define the activity's name, application scope, description, and accessible tables. These initial settings establish where and how the activity is available.
Automation Plan: Link the activity to a backend action or subflow built with Flow Designer. The example uses the “Send Email - ESCM Activity” subflow, which contains the logic and input/output fields for sending emails. Input fields can be configured for different visibility levels (admin only, standard modal, or configuration panel) to control who can modify them during setup or runtime.
Activity Experience: Configure how the activity card appears at runtime by selecting an experience type, such as Record. This controls which fields display and how users interact with the activity within the playbook.
Associated Record and Runtime Data: The activity uses the Flow Data table to store runtime data (e.g., To, CC, Subject, Body) and the status of the email activity card. Customers can define custom flow data definitions to tailor data capture for their use cases.
Status Mapping: Activity card status is linked to the state field of the associated record (commonly the Flow Data table). Customers can map status bi-directionally between the activity card and other records like response tasks to synchronize state changes.
Display Configuration: Set titles, descriptions, and pending state messaging dynamically using dot-walking to reference activity instance fields. Select which record fields appear on the card and control attachment display and edit permissions.
Features: Enable or disable SLA timers, checklists, and automation indicators on the activity card to enhance user context and tracking.
Playbook Actions: Define actions such as “Skip” and “Send Email” that appear on the activity card, allowing users to interact with the activity during playbook execution. New actions can be added via the Playbook Actions related list.
Practical Application for ServiceNow Customers
This activity definition example empowers customers to embed email notifications seamlessly into automated workflows or playbooks. By configuring input fields, runtime data capture, and user experience settings, customers ensure precise control over email content and delivery status. The ability to map status between activity cards and backend records facilitates accurate tracking and reporting.
ServiceNow users can leverage this example as a template to create customized automated email activities, improving communication efficiency within ITSM or other business processes. The detailed guidance on form views, attachment handling, and experience configuration supports tailored implementations that meet organizational needs.
The following is an example of Send email activity definition.
Basic
The basic details capture the name (label), application, description, table, and from
all the applications it’s accessible from.
Add the Automation plan, Activity experience and submit. After submitting, edit the
document to add more details against each tab.
Automation Plan
The Automation Plan associates the backend action or subflows built using the flow
designer. This example uses: Send Email - ESCM Activity
subflow.
This subflow enables sending an email. It has the core logic to send an email. It has
all the input fields and output fields defined.
All the input fields are shown within the automation plan section. Each input field
can be enabled to be visible only for the admin, in the standard modal, in the
standard modal and the configuration panel:
Admin visibility only: when set to admin, only admin can
view it.
Include in standard model: when set to view in the
standard modal, it appears only in the properties modal.
Include in standard model and configuration panel: when
set to view in the standard modal and the configuration panel, it appears in the
PAD configuration panel as well as in the properties modal. For more
information, see Activity
definitions
You can define the input fields at the time of activity definition itself, provided
you don't have any need to change these values at the time of configuration. This
helps the business process owner save time while configuring an activity within a
process.
Activity Experience
The activity experience tab defines how the activity card is rendered at run time.
The base system provides the following experience types:
Approval
Catalog Item
Create Record
Instructional
Knowledge
List
Notification
Record
Based on the type of experience you select, the further fields are populated. For
more information, refer the ServiceNow AI Platform documentation.
In this example, Record type is selected.
Note:
For example, if
you want to render a table, you can choose list as the experience
type.
Associated Record
Use this record to store the associated data pertaining to the current activity. This
would capture the run time data, as well the status of the experience.
Associated table: Flow Data
Associated Record: VL
Experience status table: Flow Data
Experience Status record: VL
In this example, Flow data table is used to capture the run time data. The run time
data can vary based on the use case. In this example, the run time data are fields
like To, cc, Subject, and body. For each use case, a flow data definition needs to
be created to define the type of the run time data.
Navigate to the left pane and enter
sys_flow_data_definition.list. It displays the
list of definitions created for the flow data table.Figure 1. Associate record
Open Email - SCM Def to view the definition related
to this example.Figure 2. Email - SCM DefThis flow data definition must be used by the subflow or the action
that is associated with this activity definition (Refer automation plan) to
capture the run time data.Figure 3. Activity Definitions
In this example, open the subflow: Send Email - ESCM
Activity. Under Create Flow Data
step, the flow data definition you created is mapped against the
Definition field. This flow data record is used
across the subflow. In this example, the activity card status (experience
status) is captured in the flow data table.Figure 4. Send Email - ESCM Activity
Note:
If you want to capture the runtime data in a different table record other
than flow data table, say for example in a response task. You can select the
associated table as Response task table. The associated record should be set to
response task record created by the subflow.
Similarly, experience status table captures the status of the activity card. In the
base system, the state field of the flow data table is mapped to the activity card
status. So, when flow data table is used to capture the experience status, it
automatically updates the activity card status. You could also use a different table
other than flow data table to capture the experience status.
For example, if you would want to map the response task status to the activity card
status then that is possible. To do so:
Navigate to All > Playbook Experiences.Figure 5. Playbook experiences
Open SIR Playbook experience.
Open Status Mapping related list.Figure 6. Playbook experience
Enter the Response Task against Experience Status
Table field.
Enter the State against Experience Status field.Figure 7. Experience Status
Click Submit. The record is created.Figure 8. Playbook Experience Status Mapping
Under Experience Status to Activity State, map the states of response task
to activity card status.
The left side shows the states of the Response Task, and the right side shows the activity card status.Figure 9. Playbook Experience Status Mapping
The mapping can be bi-directional. Under Activity State to Experience
related list as well, map the statuses correctly. This step is the reverse
of the previous step. In this case, the left side shows the activity card
status, and the right side shows the response task status.Figure 10. Playbook Experience Status Mapping
Details
Tag Line: Send Email
Icon: Envelope outline (not shown in the user interface)
Title: Activity > Activity Instance > Label. Here we have selected the activity instance’s label. This
dot-walking will replace the label value as the title dynamically at run
time.
Description: Activity > Activity Instance > Description. Here we have selected the activity instance’s description. This
dot-walking will replace the label value as the title dynamically at run time.
Pending State Title: Send an email notification. This is the title when the
activity is in Pending status.
Pending State Description: Prompts for confirmation of email subject and body
before sending. This is the description of the activity card when the status is
pending Record Fields: There are record fields selected in this
example.
Record Fields are comma-separated list of field names to display
for the associated record in a name-value pair list. Data is pre-fetched on
the server, dot-walking is supported and
canRead() permissions are evaluated on each
field.
Footer: There’s no footer defined for this example.
Footer is a text in a gray
area of the card footer. You can add any meaningful information to
shown.
Figure 11. Activity Definition - Send Email
Form
Form View: collect_data
Form Fields:
This example uses collect_data view to show the fields that must be presented
to the user to enter inputs. Collect_data view is a platform provided view
corresponding to flow data table. Alternatively, you could leave Form View as empty,
and select Vars from the list of values available against Form Fields. (click the
lock icon to open the list of available values).
Figure 12. Form view
Attachments
In this example:
Attachment Source is empty.
Attachment Read only not selected.
Attachment Source - Drop down. What attachments to show on the card: Those
attached to the Parent Record, the Associated Record, or none.
Attachment Read only - True or False. Prevent the user from renaming or
deleting the existing attachments.
Figure 13. Activity Definition - Send Email
Features
In this example,
Show SLA - Cleared
Show Checklist - Cleared
Is Automated - Cleared
Show SLA: True / False. Renders an SLA timer in the header of the card for the
Associated Record. The SLA is chosen according to the SLA Configuration record
specified in the Playbook configuration.
Show Checklist - True or False. Renders any checklist that is attached to
the Associated Record. The checklist is editable and changes are saved
without requiring a Declarative Action.
Is Automated - True or False. If true, then the
tagline and icon will
be overridden with the text Automated Task and an
automated icon.
Figure 14. Activity Definition - Send Email Form
Playbook Actions in Activity Definition
This
section has the actions that will be rendered on the activity card. This example has
Skip, and Send Email as actions.
To add a new action to the activity card, you must create a record in the
Playbook Actions related list present at the bottom of
the page.Figure 15. Playbook Actions
Select New.
Select existing activity action against Action Assignment field.
Select SIR Playbook Experience against Playbook
Experience field.