Connect ServiceNow to Teamwork Graph
Quickly find the ServiceNow tickets and orders you need by connecting to Teamwork Graph.
What is indexed?
The ServiceNow connector indexes these objects:
Incident tickets
Catalog requests
Catalog items
Knowledge articles
News articles
Strategic Portfolio Management (SPM)
Projects
Demands
Epic
For each object, it indexes these attributes:
Name
URL
Created date
Last updated date
Description
Item type
Assignee
Due date
Before you begin
You must be a ServiceNow Instance Admin to connect to Teamwork Graph.
Teamwork Graph will always respect permissions. Users will only ever see content that they already have access to.
Set up ServiceNow OAuth
Log in to ServiceNow, take note of your organization’s subdomain. For example, if your site is vitafleet.service-now.com, you’ll need the
vitafleetlater.From the top navigation, go to All > System Application > All Available Application > All.
In the search bar at the top of the next page, search for
com.snc.platform.security.oauth.If the result shows under the Installed tab, move on to the next step.
If the OAuth 2.0 result shows under Available for you, select it and select Install.
4. In the Workspaces menu in the top navigation, filter for sys_properties.list (there won’t be a result for this) and press enter.
5. On the resulting page, search for com.snc.platform.security.oauth.is.active.
If this result’s Value column is
true, you can move on to step 6.If the Value column is set to
false, select the link in the Name column, and change the Value totrueand selecting Update. Move on to step 6.
If there is no result for
com.snc.platform.security.oauth.is.active, you’ll need to add it. Select New in the top right, and fill in the form:Set Name to
com.snc.platform.security.oauth.is.activeSet Type to true | false.
Set Value to
trueSelect Submit.
6. From the top navigation, go to All > System OAuth > Application Registry.
7. On the Application Registry, select New in the top right of the table.
8. Choose Create an OAuth API Endpoint for external clients.
9. Fill out the details for the new OAuth connection:
Give your connection a name, like
Atlassian IntegrationWe recommend adding an icon URL. Select the lock symbol () to edit. Can be anything, but you can use this URL if you’d prefer the Atlassian logo.
You can leave Client Secret blank (it will generate a random one) or type your own.
Edit the Redirect URL by selecting the lock symbol, and set it to
https://id.atlassian.com/outboundAuth/finishTick Public Client.
Under Auth Scope at the bottom, double-click (yes, double) into the Insert a new row text. You’ll get a popup. Type
useraccountand select the tick icon.
Select Submit.
10. You’ll be redirected back to the Application Registries screen. Select the name of the integration you just added.
11. You need to copy down two values that you’ll need later from this integration. From this screen, copy (or keep this tab open) to see the:
Client ID
Client Secret, which you’ll need to use the lock symbol () to view.
Install the RovoSearch web service
Go to
All→Scripted Web Services→Scripted REST APIs

2. Select the Add new button
3. Enter the Name, API ID and Default ACLs Scripted REST External Default
Name - Rovo Search
API ID - rovosearch
Default ACLs - Scripted REST External Default
4. After the web service is created, in the Resources section, select New.
5. Enter the following values:
Name -
User CriteriaHTTP method -
GETRelative path -
/user_criteriaScript - Paste the script below
Here’s the script that you can copy and paste in the Script section.
/* Resource Path: /api/{api_namepsace}/rovosearch/user_criteria
* Description: This API endpoint retrieves user criteria records that match the specified user sys_id(s).
*/
(function process( /*RESTAPIRequest*/ req, /*RESTAPIResponse*/ res) {
// Retrieve parameters from incoming request
var requestParameters = req.queryParams;
// Get the 'user' identifier and convert to string, defaulting to null if missing
var userIds = requestParameters.user ? String(requestParameters.user) : null;
// Validate that userId exists
if (!userIds) {
gs.warn("UserCriteriaLoader API: Missing 'user' parameter in request.");
res.setStatus(400);
return {
"error": "User sys_id is required."
};
}
try {
// Create new instance of UserCriteriaLoader
var criteriaLoader = sn_uc.UserCriteriaLoader;
var allCriteriaList = [];
var results = [];
var criteriaRecord = new GlideRecord('user_criteria');
criteriaRecord.addQuery('active', true); // Filter for enabled entries
criteriaRecord.query();
//get ALL User Criteria records
while (criteriaRecord.next()) {
allCriteriaList.push(criteriaRecord.getUniqueValue());
}
gs.addInfoMessage("UserCriteriaLoader API: allCriteriaList size: " + allCriteriaList.length);
var userIdSplit = userIds.split(",");
// Invoke API to retrieve criteria that match the user
for (const user of userIdSplit) {
gs.addInfoMessage("UserCriteriaLoader API: matching criteria for user " + user + ".");
var matchedCriteria = criteriaLoader.getMatchingCriteria(user, allCriteriaList);
var criteriaPerUserMap = new Object();
criteriaPerUserMap.userId = user;
criteriaPerUserMap.userCriteria = matchedCriteria;
gs.addInfoMessage("UserCriteriaLoader API: Got " + matchedCriteria.length + " results for user " + user + ".");
results.push(criteriaPerUserMap);
}
// Send back the matched criteria collection
return results;
} catch (err) {
// Record any exceptions encountered during execution
gs.error("UserCriteriaLoader API: Failed to process criteria for user " + userIds + ". Error: " + err.message);
res.setStatus(500); // Server error response
return {
error_message: "Failed to process criteria for user " + userIds,
error_details: err.message
};
}
})(request, response);(Optional) Enable the Employee Center Pro plugin for news articles
If News Article Ingestion hasn’t been enabled, skip this section.
More about installing Employee Center Pro
Go to
All→Application Manageragain.
2. Using the search filter, search for sn_ex_sp_pro and install the plugin.
3. After installation, select Load Demo Datafrom the Quick Actions section in the plugin page.
4. Go to All → Fix Scripts.
5. Search the Fix Scripts page for employee and press the Enter key.
It should show these two Employee scripts.
6. Select the Employee Center Easy Install script first.
7. If you cannot edit the script, select the To edit this record, click here button.
8. In the script editor, change the var runManually = false to var runManually = true and select Update.
9. Return to the Employee Center Easy Install script and select Run Fix Script.
10. Back in the Fix Scripts list, select the Employee Center Pro Fix Dashboardscript
11. Select Run Fix Script for the Employee Center Pro Fix Dashboard
Connecting to ServiceNow
Once you’ve setup your OAuth integration in ServiceNow, you can connect. To get to the setup screen for ServiceNow:
Go to admin.atlassian.com. Select your organization if you have more than one.
Select Apps, then Connectors.
If you have more than one site, pick the site you want to connect, then select Add connector.
Select ServiceNow and press Next.
Enter a name for your ServiceNow connection. This doesn’t need to match anything.
Enter the subdomain for your ServiceNow site. If your full ServiceNow URL is
vitafleet.service-now.com, you only need to entervitafleet.Enter the Client ID and the Client Secret you setup in the steps above.
Review the disclaimer.
Select Authorize ServiceNow.
A new tab will open in ServiceNow. Review and accept the permissions. Select Allow.
Next steps
After you’ve finished connecting ServiceNow:
Tickets and orders will start to show in Search incrementally over the next few hours.
Your team members will see ServiceNow show up as a filter option in Search. If they haven’t connected to ServiceNow from their Atlassian account, they may be asked to connect before they can see results. This is required so Teamwork Graph can make sure your teammates only see tickets that they already have access to.
Depending on the number of tickets and orders in ServiceNow, it may take some time for all your content to be indexed and appear in Search.
Was this helpful?