StyloDocs
Workflow blocks

ServiceNow

Create, read, update, and delete ServiceNow records

View as Markdown

servicenow/record — Create, read, update, and delete ServiceNow records.

Where it appears

The ServiceNow block lives in the Integrations group of the Workflow Builder. Connect the Servicenow integration before adding it.

Fields

FieldTypeRequiredDefaultDescription
operationselectYesWhich CRUD action to perform against the ServiceNow table. The remaining fields shown depend on this choice. Options: servicenow_create_record, servicenow_read_record, servicenow_update_record, servicenow_delete_record.
tableNametext (supports references)YesServiceNow table to operate on, given by its API name (e.g. incident, change_request, sys_user). Accepts literal text or <StepName.field>.
createFieldscodeNoJSON object of field names to values for the new record, matching the columns of the chosen table (e.g. short_description, priority).
readSysIdtext (supports references)NoOptional sys_id of a single record to read. Leave empty to read multiple records matched by the Query. Accepts literal text or <StepName.field>.
querytext (supports references)NoOptional ServiceNow encoded query to filter records (e.g. active=true^priority=1). Accepts literal text or <StepName.field>.
updateSysIdtext (supports references)Yessys_id of the record to update. Use a literal sys_id or <StepName.field> from a previous step.
updateFieldscodeNoJSON object of field names to new values to apply to the record. Only the keys you include are changed.
deleteSysIdtext (supports references)Yessys_id of the record to delete. Use a literal sys_id or <StepName.field> from a previous step.

Inputs and outputs

Inputs are the configurable fields above. The block produces these outputs:

Outputs

Reference an output downstream with <ServiceNow.field>.

NameTypeDescription
successbooleanOperation success status
recordjsonSingle ServiceNow record
recordsjsonArray of ServiceNow records
metadatajsonOperation metadata
errorstringError message if failed

Example

A minimal configuration for this block:

{
  "type": "servicenow/record",
  "config": {
    "operation": "servicenow_create_record",
    "tableName": "<PreviousStep.field>",
    "updateSysId": "<PreviousStep.field>",
    "deleteSysId": "<PreviousStep.field>"
  }
}

Limits and failure modes

  • Requires a connected Servicenow integration. Calls fail if that integration is disconnected or its authorization has expired.
  • Required fields (operation, tableName, updateSysId, deleteSysId) must be set, or the block fails validation before it runs.
  • On failure the error output is populated; downstream blocks that reference other outputs may not receive values.

On this page