ServiceNow
Use the integration to streamline your incidents and respond to them automatically.
Overview
The ServiceNow integration is intended for users who have ServiceNow set up as an IT Service Management/Ticket Management system.
A lot of IT teams or cloud teams use ServiceNow as a single pane of glass for their Incident Management.
With this integration, we have covered most of the incident-related functionalities.
Use Cases
The integration between Fylamynt and ServiceNow lets you:
Trigger a workflow in Fylamynt, Ingest incidents as a trigger to Fylamynt workflows. (Fetch ServiceNow incidents into Fylamynt)
ServiceNow Create Incident - Create a new ServiceNow Incident
ServiceNow Delete Incident - Delete a specific ServiceNow Incident
ServiceNow Search Incidents - Get the incident list according to the supplied query
ServiceNow Update Incident - Update a specific ServiceNow Incident
Configure ServiceNow in Fylamynt
Navigate to Settings > Integrations > ServiceNow
Configure a new integration instance
Details needed to set up ServiceNow instance in Fylamynt:
Parameter
Description
Required
ServiceNow Instance URL
ServiceNow instance URL
True
ServiceNow User Password
Password for authorized user on ServiceNow instance
True
ServiceNow Username
Username for authorized user on ServiceNow instance
True
Webhook API Key Name
The Fylamynt API key to use for incoming ServiceNow webhooks.
False
ServiceNow Webhook URL
Fylamynt Webhook URL to be used by ServiceNow
True
Setting up ServiceNow integration
In order to integrate Fylamynt with ServiceNow, you first need to set up a role user on your ServiceNow instance.
Log in to your ServiceNow instance with an admin account.
Go to the users table and click "New".
Fill out the User ID, Email, First Name, Last Name, and Password fields.
Make sure "Active" is checked. Optionally, you can also check the "Web services access only" box.
Make sure "Password needs reset" and "Locked out" are unchecked.
Click "Submit".
On the Fylamynt side
Create an API Key to use for ServiceNow webhooks.
On the Fylamynt Settings page, scroll to the bottom, and click "API Keys".
Click "Add New".
Enter a name for the API Key.
Return to Settings / ServiceNow.
Enter your ServiceNow instance's URL. For example: "https://dev12345.service-now.com".
Enter the username and password for the ServiceNow user you created earlier in the right-hand sidebar.
Select the API Key you created in Fylamynt from the dropdown list of API keys.
Click "Authorize".
Setting up Webhook Trigger Action for ServiceNow
In your ServiceNow instance navigate to Outbound->REST Message
Click "New"
Give the Outbound REST call a name and a short description.
Copy the "Webhook URL" from the Fylamynt ServiceNow configuration and paste it into the "endpoint" field.
Leave "Authentication" set to "No Authentication"
Click "Submit".
Find the REST Message you just created in the list and re-open it.
There will be an "HTTP Methods" section that wasn't there before. Click "New" next to "HTTP Methods".
Name it "POSTCall"
Select "POST" from the HTTP method dropdown.
In the "HTTP Request" tab, add the following to the headers:
x-api-key : copy the key value from the Fylamynt API Key you created above and paste in in the value.
accept : application/json
Content-Type : application/json
In the "Content" text box, paste the following JSON (this is just an example, you may add more fields from the incident table as needed)
Click "Submit".
Re-open the HTTP Method you just created.
In the "Related Links" list, click "Auto-generate variables"
Click "Update".
Navigate to "Business Rules".
Click "New"
For the new Business Rule, enter a name, select a table ('incident' is the default ServiceNow incident database table)
Check "Active" and "Advanced"
In the "Advanced" tab, enter the following JavaScript. (This is just an example. Feel free to edit this code to include/exclude whichever fields you require.)
Be sure to change 'YourOutboundRestCall' to the name you gave your outbound rest call above.
Also make sure the second argument to sn_ws.RESTMessageV2() is the name of the HTTP Method you created above.
In the "When to run" tab, select "after" from the dropdown and check "insert".
You can add other conditions as you see fit.
Click "Submit"
Now when you create a new incident in the incident table, a call will be made to Fylamynt containing the JSON you provided in step 12 above, populated with the fields in the new incident.
To take action when this message is received, create a new Fylamynt workflow and add a ServiceNow_Alert action to it.
Integration Actions
Fylamynt supports the following ServiceNow actions in workflows:
Create a new ServiceNow Incident
Creates a new incident in ServiceNow
Input
Parameter Name
Required
table
True
short_description
True
caller
True
urgency
False
severity
False
assigned_to
False
caller_id
False
category
False
description
False
due_date
False
made_sla
False
incident_state
False
impact
False
number
False
priority
False
template
False
state
False
Output
Parameter name
Type
Description
Result
Object
JSON of the newly created incident.
Delete a ServiceNow Incident
Delete the specified incident.
Input
Parameter Name
Description
Required
table
The ServiceNow table to update
True
sys_id
The ID of the incident to update
True
Output
Delete doesn't return a result.
Search a ServiceNow Incident
Return the results of a ServiceNow query. Because the results might be very large, you can provide the name of an S3 bucket to save the non-truncated results.
Input
Parameter Name
Description
Required
query
Query formatted per ServiceNow query syntax.
True
table
The ServiceNow table to run the query against.
True
s3_bucket
S3 bucket to save the full result list.
False
Output
Parameter name
Type
Description
result
JSON object
The output of the query.
is_result_truncated
Boolean
If the result is too large (>~100k) the results will be truncated to the first 5 incidents.
result_bucket_key
String
If an S3 bucket is specified, the path to the data.
s3_bucket
String
The bucket specified in the input.
ServiceNow Alert Trigger
The integration node triggers the automatic execution of a workflow from a selected ServiceNow Category.
When creating a workflow, you are presented with a wizard to select the trigger type to use.
On the workflow page, select New Workflow
Enter the name of the Workflow.
Select the ServiceNow trigger type.
Click Create Workflow
Configure the automatic execution of a workflow
To automatically run the workflow with the ServiceNow Alert trigger, the incident type and assignment need to be configured. Follow the step-by-step instructions provided on the Incident Management - Automatic workflow execution page.
Update a ServiceNow Incident
Given an incident to update, update the provided fields.
Input
Parameter Name
Description
Required
table
The ServiceNow table to update.
True
sys_id The ID of the incident to update
True
short_description
String
False
urgency
False
severity
False
assigned_to
False
caller_id
False
category
False
description
False
due_date
False
made_sla
False
incident_state
False
number
False
priority
False
template
False
state
False
caller
False
Output
Parameter name
Type
Description
Parameter name
Type
Description
result
JSON Object
The updated incident
Last updated