> ## Documentation Index
> Fetch the complete documentation index at: https://docs.engini.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# ServiceNow

The ServiceNow integration lets you read, search, create, update and delete records in your ServiceNow instance, and start workflows when records change.

## Getting Started with ServiceNow

### Prerequisites

* A ServiceNow instance. You can create an account at [ServiceNow](https://www.servicenow.com/).
* Your instance URL, for example `https://mycompany.service-now.com`.
* A ServiceNow user name and password for Engini to sign in with. We recommend a dedicated user marked *Web Service Access Only* (*All > User Administration > Users*), so it can sign in through API connections only. Engini can read and change only what this user is allowed to access in ServiceNow.
* The role `snc_basic_auth_api_access` for that user. Your instance only accepts user name and password sign-in from API users that have this role, so without it every call fails with "User is not authenticated". On a personal developer instance, even the admin user needs it. To add it, go to *All > User Administration > Users*, open the user, then *Roles > Edit* and add the role.

## Connecting Engini to ServiceNow

1. Enter your Engini account at [https://app.engini.io](https://app.engini.io/).

2. Navigate to the Connections page by clicking on Connections in the left sidebar or by clicking [here](https://app.engini.io/connections).

   ![Engini - Connections page](https://mintcdn.com/engini/0QU_bOryQ1jDQ4Ey/help/assets/apps/servicenow/connections-page.png?fit=max\&auto=format\&n=0QU_bOryQ1jDQ4Ey\&q=85\&s=8b2665de4cc1ff8710dd3749064dc546)

3. Click on the "New Integration" option located at the top bar.

   ![Engini - New Integration button](https://mintcdn.com/engini/0QU_bOryQ1jDQ4Ey/help/assets/apps/servicenow/new-integration-button.png?fit=max\&auto=format\&n=0QU_bOryQ1jDQ4Ey\&q=85\&s=b971b2d9ca9deb3d4517d70a9d390cca)

4. Choose the ServiceNow option from the available applications.

   ![ServiceNow - Choose Application](https://mintcdn.com/engini/0QU_bOryQ1jDQ4Ey/help/assets/apps/servicenow/servicenow-choose-application.png?fit=max\&auto=format\&n=0QU_bOryQ1jDQ4Ey\&q=85\&s=77db1c74175749a9dcd7dfe3ee02f656)

5. Enter the following details in the "New Integration" form and press Save:

   ![ServiceNow - New Integration form](https://mintcdn.com/engini/0QU_bOryQ1jDQ4Ey/help/assets/apps/servicenow/servicenow-new-integration.png?fit=max\&auto=format\&n=0QU_bOryQ1jDQ4Ey\&q=85\&s=ce540642ba3e90367c20f2f00d57694b)

   1\. *Connection Name -* Enter a name that helps identify the ServiceNow connection.

   2\. *Instance URL -* Enter the address of your ServiceNow instance: your instance name followed by `.service-now.com`, for example `https://dev12345.service-now.com`. Don't add a path after it.

   3\. *Username -* Enter the user name of the ServiceNow user Engini will sign in as.

   4\. *Password -* Enter the password of that ServiceNow user.

   5\. *Save -* Click Save to create the connection.

## Triggers

All of the triggers below check ServiceNow on a schedule. Each check looks for changes since the workflow's last run, and all the records found in one check arrive together in a single workflow run, as lists.

**Note:** Each check also looks back one minute before the previous run, so that nothing is missed between two checks. As a result, a record that changes close to a check can be delivered by two consecutive checks, so it can reach your workflow twice. If that matters for your workflow, compare the record's Sys Id against records you already handled.

### Check for New or Updated Records

Starts the workflow when records in the selected table are created or updated. To watch incidents, choose the Object Type *incident*.

![ServiceNow - Check for New or Updated Records trigger](https://mintcdn.com/engini/0QU_bOryQ1jDQ4Ey/help/assets/apps/servicenow/servicenow-trigger-check-for-new-or-updated-records.png?fit=max\&auto=format\&n=0QU_bOryQ1jDQ4Ey\&q=85\&s=2beccbf6dbbd45967884770845ab5a52)

1. *Object Type -* Select the object type (the ServiceNow table) to watch, for example *incident*. It only selects which table the trigger checks; the rest of the trigger is set with the schedule and the conditions below.
2. *Starting (UTC) -* Select the start date and time for the scheduled trigger.
3. *Recur every -* Choose the time interval for triggering and checking records. The minimum time interval is 15 minutes.
4. *Add time frame -* You can specify a time frame during which the trigger will operate.
5. *Add Conditions -* Click Add Conditions to define conditions that narrow down the data list and return only the relevant items. To learn more about using filters, [click here](https://docs.engini.ai/help/workflows/workflow-editor.md#add-conditions).

### Check for New Records

Starts the workflow when new records are created in the selected table.

![ServiceNow - Check for New Records trigger](https://mintcdn.com/engini/0QU_bOryQ1jDQ4Ey/help/assets/apps/servicenow/servicenow-trigger-check-for-new-records.png?fit=max\&auto=format\&n=0QU_bOryQ1jDQ4Ey\&q=85\&s=abd249f17e9c5d58e4cbb2a52d691779)

1. *Object Type -* Select the object type (the ServiceNow table) to watch, for example *incident*. It only selects which table the trigger checks; the rest of the trigger is set with the schedule and the conditions below.
2. *Starting (UTC) -* Select the start date and time for the scheduled trigger.
3. *Recur every -* Choose the time interval for triggering and checking records. The minimum time interval is 15 minutes.
4. *Add time frame -* You can specify a time frame during which the trigger will operate.
5. *Add Conditions -* Click Add Conditions to define conditions that narrow down the data list and return only the relevant items. To learn more about using filters, [click here](https://docs.engini.ai/help/workflows/workflow-editor.md#add-conditions).

### Check for New Comments and Work Notes

Starts the workflow when new comments or work notes are added to ServiceNow records.

![ServiceNow - Check for New Comments and Work Notes trigger](https://mintcdn.com/engini/0QU_bOryQ1jDQ4Ey/help/assets/apps/servicenow/servicenow-trigger-check-for-new-comments-and-work-notes.png?fit=max\&auto=format\&n=0QU_bOryQ1jDQ4Ey\&q=85\&s=6fc3ba9e189e21aac262906f5b14a1d2)

1. *Starting (UTC) -* Select the start date and time for the scheduled trigger.
2. *Recur every -* Choose the time interval for triggering and checking comments and work notes. The minimum time interval is 15 minutes.
3. *Add time frame -* You can specify a time frame during which the trigger will operate.
4. *Add Conditions -* Click Add Conditions to define conditions that narrow down the data list and return only the relevant items. To learn more about using filters, [click here](https://docs.engini.ai/help/workflows/workflow-editor.md#add-conditions).

## Actions

### Create Record

Creates a new record in a ServiceNow table.

![ServiceNow - Create Record action](https://mintcdn.com/engini/0QU_bOryQ1jDQ4Ey/help/assets/apps/servicenow/servicenow-create-record.png?fit=max\&auto=format\&n=0QU_bOryQ1jDQ4Ey\&q=85\&s=47dd3554ea9fd88b3d44739d743dba91)

1. *Object Type -* Select the object type (the ServiceNow table) to create the record in, for example *incident*. Choose it first: the fields of the selected object are then available behind Add Field.
2. *Add Field -* Click Add Field to add and populate additional fields for the selected activity. To learn more about managing activity data, [click here](https://docs.engini.ai/help/workflows/workflow-editor.md#add-fields).

### Delete a Record

Deletes a record from a ServiceNow table.

![ServiceNow - Delete a Record action](https://mintcdn.com/engini/0QU_bOryQ1jDQ4Ey/help/assets/apps/servicenow/servicenow-delete-a-record.png?fit=max\&auto=format\&n=0QU_bOryQ1jDQ4Ey\&q=85\&s=b8b56c0b3396a8fb2cf86ef769597e73)

1. *Object Type -* Select the object type (the ServiceNow table) the record belongs to, for example *incident*. It only selects the object the action works on.
2. *Record Id -* Enter the unique id (Sys Id) of the record to delete, pick it from the suggestions for the selected table, or map the Sys Id from a previous step. The box shows the hint *The record's unique id*.

**Note:** Deleting a record is permanent and can't be undone from Engini.

### Get Record

Retrieves a single record from a ServiceNow table.

![ServiceNow - Get Record action](https://mintcdn.com/engini/0QU_bOryQ1jDQ4Ey/help/assets/apps/servicenow/servicenow-get-record.png?fit=max\&auto=format\&n=0QU_bOryQ1jDQ4Ey\&q=85\&s=62cf486221516231e7b24684c3ac2419)

1. *Object Type -* Select the object type (the ServiceNow table) the record belongs to, for example *incident*. It only selects the object the action works on; the *Record Id* field below it appears once you have chosen one.
2. *Record Id -* Enter the record's unique id (its Sys Id), pick the record from the suggestions, or map the Sys Id from a previous step. The box shows the hint *The record's unique id*.
3. *Add Filter -* Click Add Filter to define conditions that narrow down the data list and return only the relevant items. To learn more about using filters, [click here](https://docs.engini.ai/help/workflows/workflow-editor.md#add-filters).

The filter available for this action is *Sysparm Display Value*. Enter `true`, `false` or `all`: `true` returns display values (for example a user's name) instead of internal values, `false` returns the internal values, and `all` returns both.

### Get Records

Retrieves records from a ServiceNow table. This is the action Engini suggests when you start with Getting Started: it lists the latest records of the *incident* table, five records, newest first. Start with it to see what ServiceNow returns, then build on its results in the next steps.

![ServiceNow - Get Records action](https://mintcdn.com/engini/0QU_bOryQ1jDQ4Ey/help/assets/apps/servicenow/servicenow-get-records.png?fit=max\&auto=format\&n=0QU_bOryQ1jDQ4Ey\&q=85\&s=60e583afbf56beecc6178d97480d6c6a)

1. *Object Type -* Select the object type (the ServiceNow table) to read from, for example *incident*. It only selects the object the action works on.
2. *Add Filter -* Click Add Filter to define conditions that narrow down the data list and return only the relevant items. To learn more about using filters, [click here](https://docs.engini.ai/help/workflows/workflow-editor.md#add-filters).
3. *Top N -* You can set the maximum number of records Engini will return for the object you chose (default = all records).
4. *Offset -* The offset parameter allows you to skip a certain number of records from the beginning of the result set (default = 0 records).

The filters available for this action are:

* *Query -* A ServiceNow encoded query that selects the records to return, for example `active=true^priority=1`. The box shows the example *e.g. active=true*.
* *Sysparm Display Value -* Enter `true`, `false` or `all`. `true` returns display values (for example a user's name) instead of internal values, `false` returns the internal values, and `all` returns both.
* *Sysparm Exclude Reference Link -* Enter `true` to leave the links to referenced records out of the results.
* *Sysparm Fields -* Type the names of the columns to return for each record, separated by commas, for example `number,short_description`. The box shows the hint *Comma separated field names*, and it also suggests the columns of the table. Leave it out to return all columns.

### Search Records

Finds the records in a ServiceNow table whose text fields contain a word or phrase.

![ServiceNow - Search Records action](https://mintcdn.com/engini/0QU_bOryQ1jDQ4Ey/help/assets/apps/servicenow/servicenow-search-records.png?fit=max\&auto=format\&n=0QU_bOryQ1jDQ4Ey\&q=85\&s=0dd42f9a824f9fef8b1fa8c5af314088)

1. *Object Type -* Select the object type (the ServiceNow table) to search in, for example *incident*. It only selects the object the action works on.
2. *Search Text -* Enter the word or phrase to look for, for example `printer not working`. The box shows the example *e.g. printer not working*. Engini returns the records whose text fields contain it.
3. *Add Filter -* Click Add Filter to define conditions that narrow down the data list and return only the relevant items. To learn more about using filters, [click here](https://docs.engini.ai/help/workflows/workflow-editor.md#add-filters).
4. *Top N -* You can set the maximum number of records Engini will return (default = all records).
5. *Offset -* The offset parameter allows you to skip a certain number of records from the beginning of the result set (default = 0 records).

The filter available for this action is *Fields To Return*. Type the names of the columns to return for each record, separated by commas, for example `number,short_description`. The box shows the example *e.g. number,short\_description*. Leave it out to return all columns.

ServiceNow searches the table's text index, so a record created a few seconds ago can take a few minutes to appear in the results. A table that has no text index returns no records.

### Update a Record

Updates fields of an existing ServiceNow record.

![ServiceNow - Update a Record action](https://mintcdn.com/engini/0QU_bOryQ1jDQ4Ey/help/assets/apps/servicenow/servicenow-update-a-record.png?fit=max\&auto=format\&n=0QU_bOryQ1jDQ4Ey\&q=85\&s=8718c7e5cbe0e91ceb74c2a04b22798b)

1. *Object Type -* Select the object type (the ServiceNow table) the record belongs to, for example *incident*. Choose it first: the fields of the selected object are then available behind Add Field.
2. *Record Id -* Enter the unique id (Sys Id) of the record to update, pick it from the suggestions for the selected table, or map the Sys Id from a previous step. The box shows the hint *The record's unique id*.
3. *Add Field -* Click Add Field to add and populate additional fields for the selected activity. To learn more about managing activity data, [click here](https://docs.engini.ai/help/workflows/workflow-editor.md#add-fields).

### Send API Request

This activity allows you to send a custom API request directly to ServiceNow's API.

![ServiceNow - Send API Request action](https://mintcdn.com/engini/0QU_bOryQ1jDQ4Ey/help/assets/apps/servicenow/servicenow-send-api-request.png?fit=max\&auto=format\&n=0QU_bOryQ1jDQ4Ey\&q=85\&s=472c4e41e0042790824f83fab33596cf)

1. *Base Url -* The root URL of the ServiceNow API. It is filled in from your ServiceNow connection and can't be edited here.
2. *Relative url -* You can specify additional path segments or parameters that need to be added to the end of the Base Url. This allows you to customize the specific request you want to perform.
3. *Method -* Select the HTTP method (e.g., Get, Post, Put, Delete, Patch). The default is POST.
4. *Body Type -* Defines the format of the data in the body of your request. The default, application/json, means the body contains a JSON-formatted payload.
   * *application/json* – Sends the request body in JSON format. Commonly used by REST APIs.
   * *custom* – Allows you to define a custom body format by manually setting the Content-Type header. Add a `Content-Type` row in *Add Headers* with the media type you need (for example `application/xml`). With any other Body Type, a Content-Type you type in *Add Headers* is not sent; Engini sets it from the Body Type, and the run history shows it under `headersnotsent`.
   * *application/x-www-form-urlencoded* – Sends the body as URL-encoded key-value pairs, commonly used in form submissions.
   * *file* – Sends a file as the request body.
   * *multipart/form-data* – Sends form data that may include both text fields and files.
   * *text/html* – Sends the request body as HTML content.
   * *text/plain* – Sends the request body as plain text.
   * *text/xml* – Sends the request body in XML format.
5. *Body -* Contains any data that is being sent to the server.
6. *Add Headers -* Additional metadata about the request, such as the type of data Engini can accept, the length of the request body, and authentication information.
7. *Add Queries -* The query refers to the parameters or data that are included in the URL of an HTTP request to provide additional information or instructions to the server.

For the full list of endpoints, see the [ServiceNow Table API reference](https://developer.servicenow.com/dev.do#!/reference/api/latest/rest/c_TableAPI).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.