> For the complete documentation index, see [llms.txt](https://docs.fastn.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fastn.ai/connectors/catalog/it-service/servicenow.md). Agents can also search and read this documentation through its [MCP server](https://docs.fastn.ai/~gitbook/mcp).

# ServiceNow

ServiceNow is an IT service management platform. Create and manage incidents, change requests, assets, events and business rules.

![ServiceNow logo](https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fgit-blob-13873f6bdd37f1ecd5413f30a17a1e8008448f4a%2Fservicenow.png?alt=media)

|                    |                                                                                     |
| ------------------ | ----------------------------------------------------------------------------------- |
| **Category**       | [IT and service management](https://docs.fastn.ai/connectors/catalog/it-service.md) |
| **Website**        | [servicenow.com](https://servicenow.com)                                            |
| **Authentication** | Instance URL, username and password                                                 |
| **Slug**           | `servicenow`                                                                        |
| **On fastn.ai**    | [Embed ServiceNow in your product](https://fastn.ai/integrations/servicenow)        |

## Setup guide

This guide explains which ServiceNow values Fastn asks for when you connect, and where to find each one in your ServiceNow instance.

For ServiceNow's own setup steps, see [Table API](https://www.servicenow.com/docs/r/zurich/api-reference/rest-apis/c_TableAPI.html) in the ServiceNow documentation.

### Before you start

* You need the Owner, Admin or Developer role in Fastn.
* You need a ServiceNow instance and a user account on it that signs in with a ServiceNow user name and password. A free personal developer instance works for testing.
* The account needs roles that give it access to the tables your workflows read and write, such as incidents, problems and change requests. Ask your ServiceNow administrator if you are not sure which roles your account has.

### Get your ServiceNow credentials

1. Sign in to your ServiceNow instance in a browser and look at the address bar. The address has the form `https://<instance>.service-now.com`.
2. Copy the part before `.service-now.com`. This is the **instance** value. For example, for `https://dev313269.service-now.com` the instance is `dev313269`.
3. Note the **username** of the ServiceNow account you want Fastn to act as. This is the user name stored on the account's user record in ServiceNow, not an email address used by a single sign-on provider.
4. Note the **password** for that same ServiceNow account. If your company signs in to ServiceNow through single sign-on, the account needs its own local ServiceNow password; ask your ServiceNow administrator to set one or to create a dedicated integration user for Fastn.

### Connect in Fastn

Your customers connect ServiceNow from your widget. To connect an account yourself:

1. Go to **Build → Integrations → Connectors** and search for **ServiceNow**.
2. Select **Connect** on the ServiceNow card.

   <figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fgit-blob-586dd03cdc0c6904263f58928d7a531eae2f85df%2Fconnect-search.png?alt=media" alt="The Connectors page in Fastn with ServiceNow typed in the search box and the ServiceNow card showing a Connect button"><figcaption><p>Search for the connector, then select Connect on its card. ServiceNow is shown here.</p></figcaption></figure>
3. Fill in the fields the form asks for, using the values from the setup steps above. Then select **Connect**.

   <figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fgit-blob-51fb88ef328c525b5b11f8d7094bab11efc333b8%2Fconnect-credentials.png?alt=media" alt="The Connect ServiceNow dialog with an optional account name and the Instance, Username and Password fields, and Cancel and Connect buttons"><figcaption><p>A connect form that asks for credentials. Each connector asks for its own fields.</p></figcaption></figure>
4. Check that the connection appears under **Operate → Connections** with the status `Active`. Your workflows can now use ServiceNow's actions.

For more detail, see [Connect an app](https://docs.fastn.ai/build/integrations/connectors/connect-an-app.md).

### Events

Fastn can start a workflow when ServiceNow records change, for example when an incident is created, updated or resolved, or when a knowledge article is published. To use one of these events, add an App event trigger under Build → Integrations → Triggers → Add trigger → App events and pick the ServiceNow event. See [App events](https://docs.fastn.ai/build/integrations/triggers/app-events.md). Contact Fastn support to set up events for ServiceNow.

## Actions

<table><thead><tr><th width="240">Action</th><th width="260">Slug</th><th>What it does</th></tr></thead><tbody><tr><td>Add Custom Field</td><td><code>addCustomField</code></td><td>Add a custom column/field to a table by creating a sys_dictionary entry. Returns the created dictionary record.</td></tr><tr><td>Create Asset</td><td><code>createAsset</code></td><td>Create an asset record in the Asset table (alm_asset). Supply the model as a sys_id from the product model tables. Returns the created asset including its sys_id.</td></tr><tr><td>Create Business Rule</td><td><code>createBusinessRule</code></td><td>Create a Business Rule (sys_script) on a table. Used to register outbound webhooks: an after-insert/update/delete rule whose script posts a payload to an external URL via sn_ws.RESTMessageV2. Returns the created rule including sys_id.</td></tr><tr><td>Create Change Request</td><td><code>createChangeRequest</code></td><td>Create a new change request in the change_request table. Returns the created record including sys_id and number (CHGxxxxxxx).</td></tr><tr><td>Create Event</td><td><code>createEvent</code></td><td>Create an Event Management event (em_event) so ServiceNow can correlate it into an alert. Requires the Event Management plugin to be active on the instance.</td></tr><tr><td>Create Hardware Asset</td><td><code>createHardware</code></td><td>Create a hardware asset record in the Hardware table (alm_hardware). Supply the model as a sys_id from the hardware product model table. Returns the created record including its sys_id.</td></tr><tr><td>Create Hardware Model</td><td><code>createModel</code></td><td>Create a hardware product model (cmdb_hardware_product_model) that assets and hardware records can reference. Returns the created model including its sys_id.</td></tr><tr><td>Create Incident</td><td><code>createIncident</code></td><td>Create a new incident record in the ServiceNow incident table. Returns the created record including its sys_id and auto-generated number (INCxxxxxxx).</td></tr><tr><td>Create Problem</td><td><code>createProblem</code></td><td>Create a new problem record in the problem table. Returns the created record including sys_id and number (PRBxxxxxxx).</td></tr><tr><td>Create Service Request</td><td><code>createServiceRequest</code></td><td>Create a new service request (REQ) record in the sc_request table. Returns the created record including sys_id and number (REQxxxxxxx).</td></tr></tbody></table>

<details>

<summary>View 65 more actions</summary>

<table><thead><tr><th width="240">Action</th><th width="260">Slug</th><th>What it does</th></tr></thead><tbody><tr><td>Create System Property</td><td><code>createSystemProperty</code></td><td>Create a new system property (sys_properties) on the instance. System properties change how the instance behaves, so only create properties owned by your own integration and use a clearly namespaced name.</td></tr><tr><td>Create Table Record</td><td><code>createTableRecord</code></td><td>Create a record in ANY ServiceNow table. Pass the field name/value pairs as the 'fields' object. Generic Table API insert.</td></tr><tr><td>Create Task</td><td><code>createTask</code></td><td>Create a generic task record in the task table. Returns the created record including sys_id and number (TASKxxxxxxx).</td></tr><tr><td>Create User</td><td><code>createUser</code></td><td>Create a new user record in the sys_user table. Returns the created record including sys_id.</td></tr><tr><td>Delete Asset</td><td><code>deleteAsset</code></td><td>Delete an asset record from the Asset table (alm_asset) by sys_id.</td></tr><tr><td>Delete Attachment</td><td><code>deleteAttachment</code></td><td>Delete an attachment by its sys_id via the Attachment API.</td></tr><tr><td>Delete Business Rule</td><td><code>deleteBusinessRule</code></td><td>Delete a Business Rule (sys_script) by sys_id. Used to unregister a webhook.</td></tr><tr><td>Delete Change Request</td><td><code>deleteChangeRequest</code></td><td>Delete a change request by sys_id.</td></tr><tr><td>Delete Event</td><td><code>deleteEvent</code></td><td>Delete an Event Management event (em_event) by sys_id. Requires the Event Management plugin to be active on the instance.</td></tr><tr><td>Delete Hardware Asset</td><td><code>deleteHardware</code></td><td>Delete a hardware asset from the Hardware table (alm_hardware) by sys_id.</td></tr><tr><td>Delete Hardware Model</td><td><code>deleteModel</code></td><td>Delete a hardware product model (cmdb_hardware_product_model) by sys_id. Models referenced by existing assets should not be removed.</td></tr><tr><td>Delete Incident</td><td><code>deleteIncident</code></td><td>Delete an incident by sys_id.</td></tr><tr><td>Delete Problem</td><td><code>deleteProblem</code></td><td>Delete a problem by sys_id.</td></tr><tr><td>Delete Service Request</td><td><code>deleteServiceRequest</code></td><td>Delete a service request by sys_id.</td></tr><tr><td>Delete System Property</td><td><code>deleteSystemProperty</code></td><td>Remove a system property (sys_properties) from the instance by sys_id. Removing a property that other code reads can change instance behaviour, so only remove properties your integration created.</td></tr><tr><td>Delete Table Record</td><td><code>deleteTableRecord</code></td><td>Delete a record by sys_id from ANY ServiceNow table.</td></tr><tr><td>Delete Task</td><td><code>deleteTask</code></td><td>Delete a task by sys_id.</td></tr><tr><td>Delete User</td><td><code>deleteUser</code></td><td>Delete a user by sys_id from the sys_user table.</td></tr><tr><td>Get Aggregate Stats</td><td><code>getAggregateStats</code></td><td>Run aggregate computations (count, sum, avg, min, max, group by) over any table using the Aggregate API at /api/now/stats. Useful for dashboards and reporting.</td></tr><tr><td>Get Asset</td><td><code>getAsset</code></td><td>Retrieve a single asset record from the Asset table (alm_asset) by its sys_id.</td></tr><tr><td>Get Attachment</td><td><code>getAttachment</code></td><td>Get the metadata for a single attachment by its sys_id via the Attachment API.</td></tr><tr><td>Get Business Rule</td><td><code>getBusinessRule</code></td><td>Retrieve a single Business Rule (sys_script) by sys_id.</td></tr><tr><td>Get Change Request</td><td><code>getChangeRequest</code></td><td>Retrieve a single change request by sys_id.</td></tr><tr><td>Get Event</td><td><code>getEvent</code></td><td>Retrieve a single Event Management event (em_event) by its sys_id. Requires the Event Management plugin to be active on the instance.</td></tr><tr><td>Get Hardware Asset</td><td><code>getHardware</code></td><td>Retrieve a single hardware asset from the Hardware table (alm_hardware) by its sys_id.</td></tr><tr><td>Get Hardware Model</td><td><code>getModel</code></td><td>Retrieve a single hardware product model (cmdb_hardware_product_model) by its sys_id.</td></tr><tr><td>Get Incident</td><td><code>getIncident</code></td><td>Retrieve a single incident by its sys_id from the incident table.</td></tr><tr><td>Get KB Article</td><td><code>getKBArticle</code></td><td>Retrieve a single Knowledge Base article (kb_knowledge) by sys_id. Defaults sysparm_display_value=all so reference fields (knowledge base, category, author) are returned with resolved display names as well as sys_ids.</td></tr><tr><td>Get KB Article Feedback</td><td><code>getKBArticleFeedback</code></td><td>Retrieve user feedback (kb_feedback) for a knowledge article by its sys_id - ratings, helpful flag and comments. Useful for surfacing the most helpful articles. Returns an array of feedback rows (empty if the article has no feedback). Note: aggregate view/helpful counts also live directly on the article (sys_view_count, helpful_count, use_count, rating) via getKBArticle.</td></tr><tr><td>Get Problem</td><td><code>getProblem</code></td><td>Retrieve a single problem by sys_id from the problem table.</td></tr><tr><td>Get Service Request</td><td><code>getServiceRequest</code></td><td>Retrieve a single service request by sys_id from the sc_request table.</td></tr><tr><td>Get System Property</td><td><code>getSystemProperty</code></td><td>Retrieve a single ServiceNow system property (sys_properties) by its sys_id, including its current value and description.</td></tr><tr><td>Get Table Field Definitions</td><td><code>getTableFieldDefinitions</code></td><td>List the column/field definitions of a table by querying sys_dictionary. Returns element name, label, type, mandatory flag, max length and reference table for each field.</td></tr><tr><td>Get Table Record</td><td><code>getTableRecord</code></td><td>Retrieve a single record by sys_id from ANY ServiceNow table (cmdb_ci, kb_knowledge, sys_user_group, etc.). Generic Table API getter.</td></tr><tr><td>Get Task</td><td><code>getTask</code></td><td>Retrieve a single task by sys_id from the task table.</td></tr><tr><td>Get User</td><td><code>getUser</code></td><td>Retrieve a single user by sys_id from the sys_user table.</td></tr><tr><td>List Assets</td><td><code>listAssets</code></td><td>List asset records from the ServiceNow Asset table (alm_asset) with an optional encoded query, field selection and pagination.</td></tr><tr><td>List Attachments</td><td><code>listAttachments</code></td><td>List attachment metadata records via the Attachment API. Filter by table_name/table_sys_id using an encoded query.</td></tr><tr><td>List Business Rules</td><td><code>listBusinessRules</code></td><td>Query Business Rules (sys_script) with an encoded query, field selection and pagination. Use to find webhook registration rules.</td></tr><tr><td>List Change Requests</td><td><code>listChangeRequests</code></td><td>Query change_request records with optional encoded query, field selection, and pagination.</td></tr><tr><td>List Events</td><td><code>listEvents</code></td><td>List Event Management events (em_event) with an optional encoded query, field selection and pagination. Requires the Event Management plugin to be active on the instance.</td></tr><tr><td>List Hardware Assets</td><td><code>listHardwares</code></td><td>List hardware asset records from the Hardware table (alm_hardware) with an optional encoded query, field selection and pagination.</td></tr><tr><td>List Hardware Models</td><td><code>listModels</code></td><td>List hardware product models (cmdb_hardware_product_model) with an optional encoded query, field selection and pagination. Models are the catalogue entries that assets and hardware records reference.</td></tr><tr><td>List Incidents</td><td><code>listIncidents</code></td><td>Query incident records with optional encoded query, field selection, pagination and display-value options. Returns an array of incidents.</td></tr><tr><td>List KB Categories</td><td><code>listKBCategories</code></td><td>List categories (kb_category) for browsing/filtering. Pass parent_id (a knowledge base sys_id) to list the categories within that base. Supports pagination.</td></tr><tr><td>List Knowledge Bases</td><td><code>listKnowledgeBases</code></td><td>List all Knowledge Base containers (kb_knowledge_base). Needed to discover which bases exist before searching or browsing articles. Supports optional filtering and pagination.</td></tr><tr><td>List Problems</td><td><code>listProblems</code></td><td>Query problem records with optional encoded query, field selection, and pagination.</td></tr><tr><td>List Service Requests</td><td><code>listServiceRequests</code></td><td>Query sc_request records with optional encoded query, field selection, and pagination.</td></tr><tr><td>List System Properties</td><td><code>listSystemProperties</code></td><td>List ServiceNow system properties (sys_properties) with an optional encoded query, field selection and pagination. System properties control instance behaviour, so treat the results as configuration data.</td></tr><tr><td>List Table Records</td><td><code>listTableRecords</code></td><td>Query records from ANY ServiceNow table with an encoded query, field selection, and pagination. Generic Table API list.</td></tr><tr><td>List Tasks</td><td><code>listTasks</code></td><td>Query task records with optional encoded query, field selection, and pagination.</td></tr><tr><td>List Users</td><td><code>listUsers</code></td><td>Query sys_user records with optional encoded query, field selection, and pagination.</td></tr><tr><td>Search KB Articles</td><td><code>searchKBArticles</code></td><td>Keyword search across Knowledge Base articles (kb_knowledge) using ServiceNow full-text search, with optional filters for knowledge base, category, workflow state and active flag. Cleaner than building a raw sysparm_query. Returns an array of matching articles.</td></tr><tr><td>Update Business Rule</td><td><code>updateBusinessRule</code></td><td>Partially update a Business Rule (sys_script) by sys_id. Pass only the columns you want to change in the 'fields' JSON-object string; all other fields on the record are left untouched (PATCH). Used to enable/disable or re-point a webhook registration rule. Returns the full updated rule.</td></tr><tr><td>Update Change Request</td><td><code>updateChangeRequest</code></td><td>Partially update an existing change request by sys_id. Pass only the columns you want to change in the 'fields' JSON-object string; all other fields on the record are left untouched (PATCH). Returns the full updated change request.</td></tr><tr><td>Update Event</td><td><code>updateEvent</code></td><td>Partially update an Event Management event (em_event) by sys_id. Only the fields you supply are changed. Requires the Event Management plugin to be active on the instance.</td></tr><tr><td>Update Incident</td><td><code>updateIncident</code></td><td>Partially update an existing incident by sys_id. Pass only the columns you want to change in the 'fields' JSON-object string; all other fields on the record are left untouched (PATCH). Returns the full updated incident.</td></tr><tr><td>Update Incident (Typed)</td><td><code>updateIncidentTyped</code></td><td>Partially update an incident by sys_id with typed fields Only the fields provided are sent; all others are left unchanged. Returns the full updated incident under result.</td></tr><tr><td>Update Problem</td><td><code>updateProblem</code></td><td>Partially update an existing problem by sys_id. Pass only the columns you want to change in the 'fields' JSON-object string; all other fields on the record are left untouched (PATCH). Returns the full updated problem.</td></tr><tr><td>Update Service Request</td><td><code>updateServiceRequest</code></td><td>Partially update an existing service request (sc_request) by sys_id. Pass only the columns you want to change in the 'fields' JSON-object string; all other fields on the record are left untouched (PATCH). Returns the full updated service request.</td></tr><tr><td>Update System Property</td><td><code>updateSystemProperty</code></td><td>Partially update a system property (sys_properties) by sys_id. Only the fields you supply are changed. Changing a property alters instance behaviour, so update only properties your integration owns.</td></tr><tr><td>Update Table Record</td><td><code>updateTableRecord</code></td><td>Update a record in ANY ServiceNow table by sys_id. Pass changed field name/value pairs as the 'fields' object. Generic Table API PATCH (partial update).</td></tr><tr><td>Update Task</td><td><code>updateTask</code></td><td>Partially update an existing task by sys_id. Pass only the columns you want to change in the 'fields' JSON-object string; all other fields on the record are left untouched (PATCH). Returns the full updated task.</td></tr><tr><td>Update User</td><td><code>updateUser</code></td><td>Partially update an existing user (sys_user) by sys_id. Pass only the columns you want to change in the 'fields' JSON-object string; all other fields on the record are left untouched (PATCH). Returns the full updated user.</td></tr><tr><td>Upload Attachment</td><td><code>uploadAttachment</code></td><td>Attach a file to a record on any table via the Attachment API (/api/now/attachment/file). The raw file content goes in the request body; table name, target record sys_id and file name are query params. Returns attachment metadata.</td></tr></tbody></table>

</details>

## Events

Start a workflow when one of these happens, with an [app event trigger](https://docs.fastn.ai/build/integrations/triggers.md).

<table><thead><tr><th width="240">Event</th><th width="260">Id</th><th>When it fires</th></tr></thead><tbody><tr><td>Change Request Created</td><td><code>change_request.created</code></td><td>Fires when a new change request is inserted.</td></tr><tr><td>Change Request Updated</td><td><code>change_request.updated</code></td><td>Fires when a change request is updated.</td></tr><tr><td>Incident Created</td><td><code>incident.created</code></td><td>Fires when a new incident is inserted.</td></tr><tr><td>Incident Deleted</td><td><code>incident.deleted</code></td><td>Fires when an incident is deleted.</td></tr><tr><td>Incident Resolved</td><td><code>incident.resolved</code></td><td>Fires when an incident transitions to a resolved state (state=6).</td></tr><tr><td>Incident Updated</td><td><code>incident.updated</code></td><td>Fires when an incident is updated.</td></tr><tr><td>Knowledge Article Created</td><td><code>kb_knowledge.created</code></td><td>Fires when a new knowledge article (kb_knowledge) is inserted.</td></tr><tr><td>Knowledge Article Deleted</td><td><code>kb_knowledge.deleted</code></td><td>Fires when a knowledge article is deleted.</td></tr><tr><td>Knowledge Article Published</td><td><code>kb_knowledge.published</code></td><td>Fires when a knowledge article transitions to workflow_state=published.</td></tr><tr><td>Knowledge Article Updated</td><td><code>kb_knowledge.updated</code></td><td>Fires when a knowledge article is updated.</td></tr></tbody></table>

<details>

<summary>View 7 more events</summary>

<table><thead><tr><th width="240">Event</th><th width="260">Id</th><th>When it fires</th></tr></thead><tbody><tr><td>Problem Created</td><td><code>problem.created</code></td><td>Fires when a new problem is inserted.</td></tr><tr><td>Problem Updated</td><td><code>problem.updated</code></td><td>Fires when a problem is updated.</td></tr><tr><td>Service Request Created</td><td><code>sc_request.created</code></td><td>Fires when a new service request (REQ) is inserted.</td></tr><tr><td>Service Request Updated</td><td><code>sc_request.updated</code></td><td>Fires when a service request is updated.</td></tr><tr><td>Task Created</td><td><code>task.created</code></td><td>Fires when a new task is inserted.</td></tr><tr><td>Task Updated</td><td><code>task.updated</code></td><td>Fires when a task is updated.</td></tr><tr><td>User Created</td><td><code>sys_user.created</code></td><td>Fires when a new user is created.</td></tr></tbody></table>

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.fastn.ai/connectors/catalog/it-service/servicenow.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
