ServiceNow Get

ServiceNow Get

Certified

Fetch records from a ServiceNow table

Reads rows from the specified table using Basic Auth or the OAuth password grant and returns the raw ServiceNow payload plus the count.

yaml
type: io.kestra.plugin.servicenow.Get

Get incidents using BasicAuth.

yaml
id: servicenow_get
namespace: company.team

tasks:
  - id: get
    type: io.kestra.plugin.servicenow.Get
    domain: "snow_domain"
    username: "snow_username"
    password: "{{ secret('SNOW_PASSWORD') }}"
    table: incident

Get incidents using OAuth.

yaml
id: servicenow_get
namespace: company.team

tasks:
  - id: get
    type: io.kestra.plugin.servicenow.Get
    domain: "snow_domain"
    username: "snow_username"
    password: "{{ secret('SNOW_PASSWORD') }}"
    clientId: "{{ secret('SNOW_CLIENT_ID') }}"
    clientSecret: "{{ secret('SNOW_CLIENT_SECRET') }}"
    table: incident

Get high-priority active incidents with pagination.

yaml
id: servicenow_get_filtered
namespace: company.team

tasks:
  - id: get
    type: io.kestra.plugin.servicenow.Get
    domain: "{{ secret('SNOW_DOMAIN') }}"
    username: "{{ secret('SNOW_USERNAME') }}"
    password: "{{ secret('SNOW_PASSWORD') }}"
    table: incident
    query: "active=true^priority=1"
    fields:
      - number
      - short_description
      - priority
      - state
    limit: 100
    offset: 0

Stream incidents to internal storage as ION.

yaml
id: servicenow_get_store
namespace: company.team

tasks:
  - id: get
    type: io.kestra.plugin.servicenow.Get
    domain: "{{ secret('SNOW_DOMAIN') }}"
    username: "{{ secret('SNOW_USERNAME') }}"
    password: "{{ secret('SNOW_PASSWORD') }}"
    table: incident
    fetchType: STORE
Properties

ServiceNow domain

Subdomain used to build https://<domain>.service-now.com/; do not include protocol

ServiceNow password

Account password used with 'username' for Basic Auth or OAuth password grant

ServiceNow table

API name of the table to query (for example incident).

ServiceNow username

Used with 'password' for Basic Auth or with client credentials for the OAuth password grant

ServiceNow OAuth client ID

Required with 'clientSecret' plus 'username' and 'password' to switch requests to OAuth bearer tokens

ServiceNow OAuth client secret

Paired with 'clientId' when using the OAuth password grant

DefaultFETCH
Possible Values
STOREFETCHFETCH_ONENONE

Fetch type

Controls how results are returned: FETCH (default) returns all records in memory, FETCH_ONE returns only the first record, STORE writes all records as ION to internal storage and returns a URI.

SubTypestring

Fields to return

Comma-joined list of field names sent as sysparm_fields. When absent, all fields are returned.

Additional request headers

Optional key/value headers rendered per execution and sent with every call

Maximum records to return

Appended as sysparm_limit. When absent, ServiceNow applies its own default limit.

Starting record index

Appended as sysparm_offset. Use together with limit for page-by-page retrieval.

HTTP client configuration

Advanced HTTP settings such as timeouts, proxies, and TLS; defaults to Kestra HTTP client values

Definitions
allowFailedbooleanstring
Defaultfalse

If true, allow a failed response code (response code >= 400)

allowedResponseCodesarray
SubTypeinteger

List of response code allowed for this request

auth

The authentication to use.

type*Requiredobject
passwordstring

The password for HTTP basic authentication.

usernamestring

The username for HTTP basic authentication.

type*Requiredobject
tokenstring

The token for bearer token authentication.

type*Requiredobject
passwordstring

The password for HTTP Digest authentication.

usernamestring

The username for HTTP Digest authentication.

basicAuthPasswordDeprecatedstring

The password for HTTP basic authentication. Deprecated, use auth property with a BasicAuthConfiguration instance instead.

basicAuthUserDeprecatedstring

The username for HTTP basic authentication. Deprecated, use auth property with a BasicAuthConfiguration instance instead.

connectTimeoutDeprecatedstring
Formatduration

The time allowed to establish a connection to the server before failing.

connectionPoolIdleTimeoutDeprecatedstring
Formatduration

The time an idle connection can remain in the client's connection pool before being closed.

defaultCharsetstring
DefaultUTF-8

The default charset for the request.

enabledTcpExtendedKeepAlivebooleanstring
Defaulttrue

Whether to enable TCP Keep-Alive extended socket options (TCP_KEEPIDLE, TCP_KEEPINTERVAL, TCP_KEEPCOUNT).

Set to false when running on Windows workers, as these extended socket options are not supported by the Windows JDK and will cause connection failures.

followRedirectsbooleanstring
Defaulttrue

Whether redirects should be followed automatically.

logLevelDeprecatedstring
Possible Values
ALLTRACEDEBUGINFOWARNERROROFFNOT_SPECIFIED

The log level for the HTTP client.

logsarray
SubTypestring
Possible Values
REQUEST_HEADERSREQUEST_BODYRESPONSE_HEADERSRESPONSE_BODY

The enabled log.

maxContentLengthDeprecatedinteger

The maximum content length of the response.

proxy

The proxy configuration.

addressstring

The address of the proxy server.

passwordstring

The password for proxy authentication.

portintegerstring

The port of the proxy server.

typestring
DefaultDIRECT
Possible Values
DIRECTHTTPSOCKS

The type of proxy to use.

usernamestring

The username for proxy authentication.

proxyAddressDeprecatedstring

The address of the proxy server.

proxyPasswordDeprecatedstring

The password for proxy authentication.

proxyPortDeprecatedinteger

The port of the proxy server.

proxyTypeDeprecatedstring
Possible Values
DIRECTHTTPSOCKS

The type of proxy to use.

proxyUsernameDeprecatedstring

The username for proxy authentication.

readIdleTimeoutDeprecatedstring
Formatduration

The time allowed for a read connection to remain idle before closing it.

readTimeoutDeprecatedstring
Formatduration

The maximum time allowed for reading data from the server before failing.

ssl

The SSL request options

insecureTrustAllCertificatesbooleanstring

Whether to disable checking of the remote SSL certificate.

Only applies if no trust store is configured. Note: This makes the SSL connection insecure and should only be used for testing. If you are using a self-signed certificate, set up a trust store instead.

timeout

The timeout configuration.

connectTimeoutstring

The time allowed to establish a connection to the server before failing.

readIdleTimeoutstring
DefaultPT5M

The time allowed for a read connection to remain idle before closing it.

Reference (ref) of the pluginDefaults to apply to this task.

Encoded query filter

ServiceNow encoded query string appended as sysparm_query (for example active=true^priority=1).

Offset used in the request

Value of sysparm_offset sent with this request. Null when no offset was specified. Add size to this value to get the offset for the next page.

SubTypeobject

Result records

List of rows exactly as returned by ServiceNow. Null when fetchType is STORE.

Result size

Number of records returned or written.

Formaturi

Storage URI

URI of the ION file in internal storage. Set only when fetchType is STORE.