Updating ServiceNow from Amplify
This page demonstrates how to auto-update ServiceNow ticket logs using Webhooks, with remote actions or workflows executed from Amplify.
Based on the configuration, the auto-update can happen when:
A remote action or workflow is triggered.
A remote action or workflow is completed.
The code samples on this page can also apply to ServiceNow interactions by:
Replacing external_source== "SNOW-Incident"
with external_source== "SNOW-Interaction"
in the webhook NQL condition.
Replacing/table/incident/
with /table/interactions/
in the webhook Resource field.
Configuring a connector credential for ServiceNow
From the connector credential configuration page:
Choose the HTTPS option from the Protocol drop-down.
Paste the instance URL root
https://<instancename>.service-now.com/
into the URL address field.Refer to the connector credential documentation for more URL examples.
Choose the OAuth 2.0 - Client Credentials option from the Authorization drop-down
Fill in the Access token URL, Client ID, Client secret and Scope fields according to the connector credential documentation.
Save the credential.
Configuring a webhook
The following sections detail two scenarios for updating ServiceNow. The procedure for each scenario is quite similar, involving identical steps but differing in the NQL condition and payload specific to the remote actions and workflows, and also depends on the given scenario.
Update ServiceNow when a remote action or workflow is triggered
Configure a webhook in Nexthink that automatically updates incident ticket logs in ServiceNow when a remote action or workflow is triggered.
Remember to first set up a connector credential for the webhook.
From the webhook configuration page, insert the NQL condition below. Refer to the Configuring webhook NQL conditions documentation for more examples.
After filling in the NQL Condition, the system lists the allowed placeholders for the Payload.
NQL condition for remote action | |
NQL condition for workflow |
Select the connector credential you had previously set up for this webhook.
Select the PATCH option from the Method drop-down.
Insert the following API in the Resource field.
Resource API for remote action | |
Resource API for workflow |
The {{remote_action.execution.external_reference}}
and {{workflow.execution.external_reference}}
are placeholders automatically filled with the ServiceNow ticket reference when the remote action or workflow is triggered from the Amplify extension.
Refer to the F.A.Q section at the bottom of this page for more information.
Insert Payload, use the following message example:
Payload for remote action | |
Payload for workflow |
For first-time configurations, Save webhook without testing and refer to the Amplify documentation to run a remote action or workflow from Amplify in ServiceNow and check if the webhook works properly.
Send test does not successfully test the webhook until you trigger a remote action or workflow from Amplify in ServiceNow to create the incident reference value for the Resource placeholder
{{....}}
.Refer to the F.A.Q section to manually retrieve the incident
remote_action.execution.external_reference
orworkflow.execution.external_reference
value from ServiceNow and test the webhook configuration.
Refer to the Amplify installation and configuration guide to learn about configuring Amplify to integrate Nexthink instances with web applications, and deploying the configuration details via Registry.
Update ServiceNow when a remote action or workflow is completed
Configure in Nexthink a webhook that automatically updates incident ticket logs in ServiceNow with the result details of a completed remote action or workflow.
Remember to first set up a connector credential for the webhook.
From the webhook configuration page, insert the NQL condition below. Refer to the Configuring webhook NQL conditions documentation for more examples.
After filling in the NQL Condition, the system lists the allowed placeholders for the Payload.
NQL condition for remote action | |
NQL condition for workflow |
Select the connector credential you had previously set up for this webhook.
Select the PATCH option from the Method drop-down.
Insert the following API in the Resource field.
Resource API for remote action | |
Resource API for workflow |
The {{remote_action.execution.external_reference}}
and {{workflow.execution.external_reference}}
are placeholders automatically filled with the ServiceNow ticket reference when the remote action or workflow is triggered from the Amplify extension.
Refer to the F.A.Q section at the bottom of this page for more information.
Insert Payload, use the following message example:
Payload for remote action | |
Payload for workflow |
For first-time configurations, Save webhook without testing and refer to the Amplify documentation to run a remote action in Amplify from ServiceNow and check if the webhook works properly:
Send test does not successfully test the webhook until you trigger a remote action from Amplify in ServiceNow to create the incident reference value for the Resource placeholder
{{...}}
.Refer to the F.A.Q section to manually retrieve the incident
remote_action.execution.external_reference
orworkflow.execution.external_reference
value from ServiceNow and test the webhook configuration.
Refer to the Amplify installation and configuration guide to learn about configuring Amplify to integrate Nexthink instances with web applications, and deploying the configuration details via Registry.
F.A.Q
How do I check if Amplify updates the incident or interaction log in ServiceNow?
The Amplify documentation explains how to register remote actions and workflows in the ServiceNow log using the Amplify extension. That is, after following the webhook configuration described on this page.
What is the value of the {{remote_action.execution.external_reference}}
and {{workflow.execution.external_reference}}
placeholders in the Resource field?
{{remote_action.execution.external_reference}}
and {{workflow.execution.external_reference}}
placeholders in the Resource field?The process behind the Amplify webhook consists of Amplify obtaining the external_reference
value from the ServiceNow URL by reading a set of predefined ServiceNow URLs and matching to find the ticket sys_id
and type (incident or interaction).
Then, Amplify sends this external_reference
value along with the remote_action
or workflow
information to the Nexthink platform, and the webhook uses these values to replace the webhook Resource placeholder, e.g., {{remote_action.execution.external_reference}}
.
How do I manually retrieve the ServiceNow remote_action.execution.external_reference
value to test the webhook configuration?
remote_action.execution.external_reference
value to test the webhook configuration?After running a remote action in Amplify from the ServiceNow browser page:
Get the
external_reference
from the ServiceNow incident or interaction URL.
URL example in workspace view:
URL example in classic view:
From the Nexthink webhook configuration page:
Replace the Resource placeholder
{{remote_action.execution.external_reference}}
with the manually retrievedexternal_reference
from the ServiceNow URL. For example:
Send a test to check the webhook configuration. After confirming the test is successful, replace the Resource with the correct placeholder and Save webhook:
How do I see the ServiceNow incident or interaction sys_id
in the Nexthink platform?
sys_id
in the Nexthink platform?After following the webhook configuration described on this page and executing a remote action using the Amplify extension in ServiceNow, run the corresponding NQL query from the Investigations page in Nexthink to get the ticket sys_id.
Find the sys_id
under External reference and the ticket type under External source (external_source== "SNOW-Incident"
or external_source== "SNOW-Interaction"
).
RELATED TOPICS
Last updated