ServiceNow Knowledge Base connector
The ServiceNow Knowledge Base connector provides a secure and configurable integration with ServiceNow Knowledge Base systems. It automatically ingests and synchronizes knowledge base content on a daily schedule, ensuring that the latest versions of articles are always available while removing outdated or duplicate entries. With out-of-the-box capabilities for seamless data integration, it enables consistent access to up-to-date knowledge while maintaining the source of truth within the customer’s ServiceNow environment.
The connector makes ServiceNow knowledge articles available to Spark, enabling it to access the latest approved knowledge and provide more accurate recommendations and responses. Refer to Managing Spark settings and data inputs documentation.
Setting up credentials in ServiceNow
To allow Nexthink to retrieve articles from your ServiceNow Knowledge Base, set up a dedicated integration account in ServiceNow with the right level of access.
Follow these steps to configure the credentials the Nexthink connector uses to fetch knowledge articles:
Create a dedicated read-only role with ACLs on the
kb_knowledgetable. Grant only read access on the article fieldsnumberandcontent. The connector cannot ingest articles without both. Nexthink usesnumberas the article ID and to build the external link back to ServiceNow.Create a dedicated active ServiceNow user account for the Nexthink integration in the ServiceNow Admin Console. Enable the account for API authentication.
Assign the read-only role you created in step 1 to the integration user. Do not assign administrative or write-access roles.
Create a customized User Criteria under Administration > User Criteria to define which articles the integration user can access. Roles alone cannot bypass the knowledge base Can Read access control, so you must create this criteria.
Map the integration user with the User Criteria you created in step 4.
Navigate to Service > Knowledge > Knowledge Bases, select the knowledge base, and verify the Active field is enabled.
For more information about connector credentials, refer to the Third-party credentials documentation.
Creating the connector in Nexthink
From the Nexthink web interface, create and configure the ServiceNow Knowledge Base connector:
Go to Administration > Inbound connectors.
Click the New connector button in the top-right corner of the page.
Select ServiceNow Knowledge Base.
Configure the connector by filling in the General and Parameters tabs.
General tab
Configure the basic connector settings:
Name: A meaningful name for the connector. This name appears on the administration page.
NQL ID: A unique identifier for the connector used when referencing the ServiceNow connector in NQL queries. You can initially modify the suggested NQL ID, but once you save the connector, you can no longer change it.
Description: A short description of the purpose and behavior of the connector.
Schedule:
Recurrence: Set the execution time and recurrence. Executions start at the scheduled time and distribute over the hour.
Connection:
Credentials: Select preconfigured credentials from the Connector credentials page. The connector supports OAuth 2.0 and Basic Auth authentication methods. The credentials must be of a dedicated integration user whose user-criteria assignments mirror a standard or technical employee. This ensures the API returns only the knowledge articles visible to the target group. The integration user must also have read access to the mandatory article fields
numberandcontent. Refer to the Third-party credentials documentation for more information.

Parameters tab
Configure how Nexthink retrieves and filters knowledge base articles:
Knowledge base title: Enter the title of the knowledge base as it appears in ServiceNow. This value is used to filter and retrieve articles from the specified knowledge base.
Query (optional): Query to filter ServiceNow Knowledge Base articles. Nexthink recommends including the
workflow_state=publishedfilter in the query. This ensures Spark uses only published articles and also prevents returning drafts or retired articles. The filter is not applied by default because ServiceNow workflow states can be customized, andpublishedmay not match every environment.External link: Enter a full, parameterized URL that links to individual knowledge articles in your ServiceNow knowledge system. The URL must include a placeholder for the article identifier so AI agents can generate direct links to the original content. Root-only hostnames are not supported.
Example:
https://<instance>.service-now.com/sp?id=kb_article&sysparm_article={number}The
/sppath in this example is the ServiceNow Service Portal. Organizations using Employee Center serve articles from/esc, and custom portals use a custom path. Verify the path your employees use before entering the value.
Target group: Select the target user group for filtering knowledge base articles. Employee group shows articles for general employees, while Technical Support group shows articles for support staff.
User criteria: Enter an NQL query that defines which employees see articles from this knowledge base. This query must match the ServiceNow User Criteria you created in step 4 of the ServiceNow setup. For more information, refer to Filtering knowledge base articles by audiencein this page.
Custom header: Use a custom header to include additional credential information in OAuth 2.0 authentication methods, such as Client Credentials and Authorization Code. This is useful when additional authorization methods are needed beyond the default OAuth 2.0 authorization mechanism. Select Add custom header to include additional information in either OAuth 2.0 - Client credentials or OAuth 2.0 - Authorization code authorizations.

Filtering knowledge base articles by audience
Organizations often maintain separate knowledge bases for different audiences, such as an IT-only knowledge base or one knowledge base per country. Define a User criteria query on each connector so that Spark searches only the knowledge bases intended for the employee asking the question. This reduces irrelevant results and keeps support content out of employee-facing answers.
How Spark evaluates user criteria
When an employee starts a conversation, Spark identifies the employee and evaluates the User criteria query of every connected knowledge base. Spark searches the knowledge bases whose query matches that employee and skips the others. A connector without a query stays available to every employee in its target group.
User criteria narrow the audience within the selected Target group. They do not replace it.
Writing the user criteria query
The User criteria editor accepts a subset of NQL scoped to user attributes:
Query the
userstable.Filter on standard user fields, such as
ad.country_codeorad.department. Refer to the NQL data model documentation for the full list ofusersfields.Filter on manually defined custom fields. Refer to the Custom fields management documentation for more information.
The editor does not accept time selection, the include and with clauses, or computed custom fields.
Most users fields derive from Microsoft Entra ID. Configure the connector for Microsoft Entra ID before you filter on these fields. Refer to the Microsoft Entra ID (Azure AD) connector documentation for more information.
The following query targets a knowledge base at the IT department in Spain. The ad.country_code field holds a two-character ISO-3166 country code:
The following query targets a knowledge base at employees in three countries:
Test results panel
Use the Test results panel on the right side to run the connector with real data on demand, and inspect responses and errors. The test panel helps with faster debugging and validation during setup, and also with more reliable mappings with less trial and error.
Select the Run test button to call the API, validate the credentials, and check connectivity to the targeted endpoint.

Besides basic information, such as the response status code and time, the panel also shows a sample record of the response at the bottom.

In the event of an error, the system displays the API response to aid in diagnosing the issue.

Verifying the number of articles
Verify the connector after the first run, or after any configuration change.
Run the following NQL query to check the latest execution status and the number of rows processed by the connector:
Use the query results to validate that the number_of_processed_rows_ matches the number of knowledge articles you expect to fetch from ServiceNow.
Last updated
Was this helpful?

