ServiceNow
Support OAuth, or username and passwordRead and update ServiceNow incidents, requests and any table record from any Windmill script, flow or app.
Set up in 2 steps
Connect from the Resources page
Open Resources, click Add a resource/API and find ServiceNow. Enter your instance name, and the client id and secret from your instance's Application Registry.
Run your first script
Fork any script below and read before writing anything.
Scripts
Building blocks, if none of the projects above fit. Fork one, run it, or call it as a step inside your own flow.
Get Table Records
Update Table Record
Create Table Record
Get Table Record By SysId
New or Updated Record
Upload Attachment
Update Record
List Tables
List Records
List Attachments
Insert Into Import Set
Get Record
Get Import Set Result
Get Current User
Download Attachment
Delete Record
Delete Attachment
Create Record
Aggregate Records
Service Now Case APIs
Obtain and cache a ServiceNow OAuth2 access token
Fetch a single record from any ServiceNow table by its sys_id.
Resource type
servicenow — the shape of the credential every script on this page expects.
| Field | Type | Required | What it is |
|---|---|---|---|
| instance_url | string | Yes | Instance base URL, e.g. https://dev12345.service-now.com (no trailing slash). Every REST call is made against this host. |
| username | string | No | Basic auth username. Leave blank when using an OAuth bearer token. |
| password | string | No | Basic auth password. Leave blank when using an OAuth bearer token. |
| token | string | No | OAuth 2.0 access token (Bearer). Populated automatically when you connect via Windmill's ServiceNow OAuth flow (admin configures the instance + client id/secret in instance settings), or paste one manually. Provide this instead of username/password to authenticate with OAuth. |
Questions
Token or username and password?
Either. The scripts build the header from whichever the resource carries, so instance_url plus a token, or instance_url plus a username and password, both work.
A record is not visible
ServiceNow filters every table by the caller's roles. A missing record is usually an ACL rather than a wrong id.
Are my credentials stored on the hub?
Never. They live only in your own Windmill workspace, encrypted at rest.