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.
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
Trigger flows from ServiceNow
ServiceNow is not only a destination. These inbound paths are supported today.
New or updated record (scheduled poll)
The New or Updated Record trigger script polls one table and returns the records created or updated since its last run, optionally narrowed by a query. To run it, open a flow, add a trigger and choose Scheduled Poll, then pick the trigger script and an interval. Windmill puts the script first in the flow with a loop after it, so the steps you add run once per new item. The cursor is saved per flow: two flows polling the same source each get every item, and test runs keep a cursor of their own.
Resource type
The shape of the credential every script on this page expects.
servicenow
View raw schema →| 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.