YellowAnt Help Center
  • Overview
  • How to Signup
    • Signup with Slack
    • Signup with MS Teams
    • Signup with Email
    • Inviting Team Members
  • Managing Dashboard
    • Applications
    • Command Workflows
    • Event Workflows
    • Select Teams
    • Console
    • Settings
    • External Links
  • Integrating Applications
    • Marketplace and App Categories
    • Adding an Integration
    • Applications on YellowAnt
      • Airbrake
      • Airtable
      • Alexa
      • Asana
      • AWS Cloudwatch
      • Azure DevOps
      • Bitbucket
      • Circle CI
      • Evernote
      • Freshdesk
      • Github
      • Gmail
      • Google Analytics
      • Google Calander
      • Google Contacts
      • Google Drive
      • HubSpot
      • Jenkins
      • Jira
      • JiraO
      • New Relic
      • Outlook Mail
      • Pagerduty
      • Pivotal Tracker
      • RSS
      • Salesforce
      • Sentry
      • ServiceNow
      • StackExchange
      • Trello
      • Twitter
      • VictorOps
      • Wikipedia
      • YouTube
      • Zendesk
  • Commanding Apps
  • Notifications
  • Workflows
    • Command Workflows
      • Building Command Workflows
        • Trigger
        • Collection
        • Action
        • Using Action Outputs
        • Logical Functions
        • Using Conditional Actions
    • Event Workflows
      • Building Event Workflows
        • Trigger
        • Collection
        • Action
        • Using Action Outputs
        • Logical Functions
        • Using Conditonal Actions
    • Using Templates
  • System Commands
  • Plans and Pricing
  • Developer Community
Powered by GitBook
On this page
  1. Integrating Applications
  2. Applications on YellowAnt

ServiceNow

PreviousSentryNextStackExchange

Last updated 6 years ago

  1. Go to your YellowAnt Dashboard () or head over to the .

  2. In the search bar, look for "ServiceNow" or simply click the icon. If you have already integrated the application, you will be able to see it under "My Applications".

3. Once you find the application either in the dashboard or on the Marketplace click on Integrate. You will be taken to a page where you'll find the integrate option/button. Click on the integrate button.

4. You will be on the integration page which prompts you to add an account to the application. Click add account which takes you to the ServiceNow OAuth page. Note: Select a team before you click "+ ADD ACCOUNT".

5. Allow the needed permissions to ServiceNow.

6. Select "Integrate". YellowAnt will ask you to fill in a few details

To find the values for these fields, follow these steps:

(i) Open Application registry in System OAuth in your ServiceNow Instance. Click on "New" and then "Connect to a third party OAuth Provider"

(ii) Click on Create an OAuth API endpoint for external clients. Enter your application name

7. Enter the Instance name,Client ID and Client secret which was copied earlier. Click "Allow" in your ServiceNow instance

8. YellowAnt will send you a message with available functions. Run "Generate Webhooks". A webhook will be generated in your chat console

9. In your ServiceNow instance, open "Business Rules" and click "New".

10. Enter a Name for the new webhooks rule. Choose the table as "Incident" .Select" Advanced Checkbox". Select "after" from the "When" dropdown. Select "Insert". In Role conditions select web_service_admin.

11. Go to the "Advanced" tab and paste this code:

(function executeRule(current, previous /*null when async*/) {
try { 
var webhook_id="//Your Webhook ID"
var r = new sn_ws.RESTMessageV2();
r.setEndpoint("https://www.yellowant.com/market/applications/1930/webhooks/"+webhook_id);
body ='{' + 
    '"state"' + ':' + '"' + "created"+'"' + ',' + 
    '"sys_id"' + ':' + '"'+current.sys_id+'"' + ',' + 
    '"number"' + ':' + '"'+current.number+'"' + ',' + 
    '"assigned_to"' + ':' + '"'+current.assigned_to+'"' + ',' + 	
    '"description"' + ':' + '"'+current.short_description+'"' + ',' + 
    '"assigned_to"' + ':' + '"'+current.assigned_to+'"' 
    + '}';
r.setRequestBody(body);
r.setHttpMethod("POST");
 var response = r.execute();
 var responseBody = response.getBody();
 var httpStatus = response.getStatusCode();
}
catch(ex) {
 var message = ex.getMessage();
}
})(current, previous);

12. Your ServiceNow integration is now complete.

Select "Add Account"
OAuth for ServiceNow Integration

(iii) Copy the Client ID and the Client Secret. Set the Access token and Refresh token lifespan to some high value Click on Submit. The redirect URL needs to filled with the value:

Use these details to integrate your YellowAnt App
Webhooks in Slack
https://www.yellowant.com/market/applications/1930/service-now-auth/
yoursubdomain.yellowant.com
YellowAnt Marketplace
Fill in the details of your ServiceNow Account
We are naming this "YellowAnt"
Click Allow to complete Integration
Webhooks in Microsoft Teams