Skip to main content
Version: 4.5.0

action

Built-in action steps for use inside a Flow or Subflow via wfa.action().

import { action } from '@servicenow/sdk/automation'

action.core

KeyNameDescription
addWorknoteLinkToContextAdd Worknote Link to ContextAdds a Worknote link referencing to the execution context.
askForApprovalAsk For ApprovalCreate Approvals on any record in the ServiceNow system. You can configure a rule set for an approval, rejection, or cancellation. You can add additional rule sets to further define approval rule(s) and rejection rule(s). If a Due Date is added to an approval, it automatically approves, rejects, or cancels the approvals if the approvers have not responded.
associateRecordToEmailAssociate Record to EmailAssociate a record with an Email [sys_email] record so that you can track which record is affected by the email. This action updates the Target field on the email record.
copyAttachmentCopy AttachmentCopies an attachment to a target record. The source is an attachment record. You can dynamically add and configure fields for the record. Server-side validation rules are enforced (data policy, business rules, dictionary-defined mandatory fields), but UI policy does not apply.
createCatalogTaskCreate Catalog Task

Creates a Catalog Task on a Service Catalog Request Item [sc_req_item]. The task can be configured to be

createOrUpdateRecordCreate or Update RecordCreate or update a record in a ServiceNow table by determining if it already exists. Add records that do not exist, and update existing ones. Identify existing records by selecting unique fields. Set field values dynamically and enforce server-side validation rules (data policy, business rules, dictionary-defined mandatory fields). UI policy does not apply.
createRecordCreate RecordCreates a record on any ServiceNow table. You can dynamically add and configure fields for the record. Server-side validation rules are enforced (data policy, business rules, dictionary-defined mandatory fields), but UI policy does not apply.
createTaskCreate TaskCreates a task on any ServiceNow task table. After you choose the task table, you can dynamically select the fields to configure the action. A Parent field associates to a Parent record (Incident Task to Incident record). To block the flow until this task is completed, select 'Wait'.
deleteAttachmentDelete AttachmentDeletes one or more attachment(s) associated with the record. You could delete a single attachment by providing File Name input field .You could also delete all the attachments bound to the record by using Delete All Attachment checbox. Either File Name input field or Delete All Attachments checkbox should be used. If a record has multiple attachments with same name, all such matching attachments will be deleted.
deleteRecordDelete RecordDeletes a record on any ServiceNow table.
fireEventFire EventThis action can be used to fire a specific system event. This action typically passes four parameters that can be used within the event.
getAttachmentsOnRecordGet Attachments on RecordReturns a list and count of the attachments associated with the provided source record. Use flow logic or scripting to process individual attachments. Returns an error if server-side validation such as ACLs, business rules, or data policies prevent the look up.
getCatalogVariablesGet Catalog Variables

Surface Catalog Variables on the Flow and/or on a given record.

getEmailHeaderGet Email HeaderAccess an email header value as a data pill. If multiple headers have the same name, then the action gets the value of the first header that appears.
getLatestResponseTextFromEmailGet Latest Response Text From EmailThis action provides the latest response text from body text of the email thread
logLogLog a message
lookUpEmailAttachmentsLook Up Email AttachmentsRetrieve attachment records associated with a particular email record
lookUpRecordLook Up RecordLook up a singular record on any ServiceNow table. You can configure the conditions for the record lookup. If multiple records are found, only the first record returns.
lookUpRecordsLook Up RecordsLook up multiple records on any ServiceNow table. You can configure the conditions for the records found. The output includes a list of records and the number of records found. Note: The maximum number of records that can be returned is configured by a property and by default is 10K records. If more than 10K records are found, only the first 10K are returned.
lookupAttachmentLook Up Attachment

Looks up an attachment and returns the Sys ID of the attachment. If more than one attachment is present, it searches by the file name and returns the Sys ID and if there are duplicate file names then it returns the first Sys ID encountered. A JSON Object is also returned that has all the attachments returned with File name and File size properties. Server-side validation rules are enforced (data policy, business rules, dictionary-defined mandatory fields), but UI policy does not apply

moveAttachmentMove AttachmentMoves an attachment to a target record. The source is an attachment record. You can dynamically add and configure fields for the record. Server-side validation rules are enforced (data policy, business rules, dictionary-defined mandatory fields), but UI policy does not apply.
moveEmailAttachmentsToRecordMove Email Attachments to RecordMoves all email attachments to a record and updates the email attachments table. To prevent issues with large email messages, the system enforces configured limits on the maximum allowed email body size, total attachment file size, and number of attachments per email.
recordProducerRecord ProducerCreates a record on a table in the system.
sendEmailSend EmailSend rich text emails to a comma separated list of email addresses, user records, and group records. If user records do not have an email address configured, the email will not be sent to that user. Use pills to decorate the subject line and email body. Note: Commas are not required between pills, only static email addresses
sendNotificationSend NotificationSend a notification in one or more formats as specified by a notification record. The notification record you select determines the notification format and recipients.
sendSmsSend SMSSend SMS to user records and group records using email-based SMS. If user records do not have an SMS device configured, an SMS will not be sent to that user.
slaPercentageTimerSLA Percentage Timer
submitCatalogItemRequestSubmit Catalog Item Request

Creates a requested item [sc_req_item] on a Service Catalog Request [sc_req]. The request can be configured to be a blocking or non-blocking task.

updateMultipleRecordsUpdate Multiple Records

Update Multiple Records on a ServiceNow table. You can configure the conditions for the records to be updated. Server-side validation rules are enforced (data policy, business rules, dictionary-defined mandatory fields), but UI policy does not apply.

updateRecordUpdate RecordUpdate an existing record on a ServiceNow table. You can dynamically add and configure fields for the record. Server-side validation rules are enforced (data policy, business rules, dictionary-defined mandatory fields), but UI policy does not apply.
waitForConditionWait For ConditionWait for condition action causes the flow to wait until the record matches the specified condition. Use this activity to block the flow indefinitely until a particular condition is met. You must populate the condition field.
waitForEmailReplyWait For Email ReplyWait for email reply action causes the flow to wait until an email reply is recieved to the input email record. Use this activity to block the flow indefinitely until the inbound email is received. You must populate the record field with a sys_email record.
waitForMessageWait For MessagePause a flow until it receives a specific message from the flow API. Specify the string message that resumes running the flow, and optionally provide a time-out value to resume the flow if no message is received after a specific amount of time.