The ServiceNow connector is an API connector for ServiceNow ITSM. It fetches incidents and change requests via the Table API and produces structural claims for state, priority, assignee, and category. Text extraction runs on descriptions and close notes.
/api/now/table/{table}) with basic auth or OAuthincident and change_requeststate=1^priority=1)sysparm_offset| Subject | Predicate | Object |
|---|---|---|
(INC number, incident) | assigned_to | (name, person) |
(INC number, incident) | has_state | (state, status) |
(INC number, incident) | has_priority | (priority, level) |
(INC number, incident) | categorized_as | (category, category) |
(INC number, incident) | opened_by | (name, person) |
You need a ServiceNow instance URL (e.g. mycompany.service-now.com) and either
basic auth credentials (username + password) or an OAuth token with read access to
the tables you want to query.
$ pip install requests
conn = db.connect("servicenow", instance="mycompany.service-now.com", username=os.environ["SNOW_USER"], password=os.environ["SNOW_PASS"], ) result = conn.run(db)
| Parameter | Required | Default | Description |
|---|---|---|---|
instance |
Yes | — | ServiceNow instance hostname (e.g. mycompany.service-now.com) |
username |
No* | — | Username for basic auth (*required if token not provided) |
password |
No* | — | Password for basic auth (*required if token not provided) |
token |
No* | — | OAuth Bearer token (*alternative to username/password) |
tables |
No | ["incident", "change_request"] |
List of ServiceNow tables to query |
query |
No | None | Encoded query string for server-side filtering |
max_items |
No | 500 |
Maximum number of records to fetch per table |
extraction |
No | heuristic |
Text extraction mode for descriptions: heuristic or llm |
save |
No | False |
Encrypt and persist credentials |
conn = db.connect("servicenow", instance="mycompany.service-now.com", username=os.environ["SNOW_USER"], password=os.environ["SNOW_PASS"], ) result = conn.run(db) print(f"Ingested {result.claims_ingested} claims")
conn = db.connect("servicenow", instance="mycompany.service-now.com", username=os.environ["SNOW_USER"], password=os.environ["SNOW_PASS"], tables=["incident"], query="state=1^priority=1", max_items=100, ) result = conn.run(db)
conn = db.connect("servicenow", instance="mycompany.service-now.com", token=os.environ["SNOW_OAUTH_TOKEN"], extraction="llm", save=True, ) result = conn.run(db)