> For the complete documentation index, see [llms.txt](https://docs.stackai.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stackai.com/workflow-builder/apps/servicenow.md).

# ServiceNow

### Establishing a Connection&#x20;

#### 1. Connection Name

A user-friendly name for your connection. This helps you identify it among other connections in Stack AI.

#### 2. Instance URL

<figure><img src="/files/h7sMAqHQm9vOT3tVND0X" alt=""><figcaption></figcaption></figure>

Go to [developer.servicenow.com](https://developer.servicenow.com)

The URL in your browser’s address bar is your instance URL. It usually looks like: `https://<instance>.service-now.com`

#### 3. Username

In that same card, copy the username that is underneath the URL.

#### 4. Password

This is the password for the ServiceNow user account above. This is used together with the username for authentication.

Copy the password under "Current password."

#### 5. Client ID

In the video below, you will find how to generate a Client ID and Client Secret by creating an OAuth API endpoint. To follow the steps in the video guide, go to the homepage of your ServiceNow instance: `https://<instance>.service-now.com`

<figure><img src="/files/1Edksqaeanz7kotLzfKR" alt=""><figcaption></figcaption></figure>

#### 6. Client Secret

To get the client secret, click on the resource you've created and then click on the copy button to the right, next to Client Secret.


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.stackai.com/workflow-builder/apps/servicenow.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
