ServiceNow

Support OAuth, or username and password

Read and update ServiceNow incidents, requests and any table record from any Windmill script, flow or app.

Set up in 2 steps

1

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.

2

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.

Resource type

servicenow — the shape of the credential every script on this page expects.

View raw schema →
FieldTypeRequiredWhat it is
instance_urlstringYesInstance base URL, e.g. https://dev12345.service-now.com (no trailing slash). Every REST call is made against this host.
usernamestringNoBasic auth username. Leave blank when using an OAuth bearer token.
passwordstringNoBasic auth password. Leave blank when using an OAuth bearer token.
tokenstringNoOAuth 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.