Unleashing the Power of Integration: Learn How to Insert Records in ServiceNow using REST!

แชร์
ฝัง
  • เผยแพร่เมื่อ 15 ก.ย. 2024
  • In this video, we'll be showing you how to use the REST API in ServiceNow to insert records from an external page.
    By the end of this video, you'll be able to insert records from an external page using the REST API in ServiceNow! This is a great technique for accessing data that's not available in the ServiceNow console or through the ServiceNow API. So make sure to watch this video and learn how to insert records in ServiceNow using the REST API!
    You should have basic understanding of HTML, Javascript, Ajax and API. This is an integration demo from external website to work on ServiceNow records.
    If you want to learn integration and connect ServiceNow from another application then this video will help you perform integration with ServiceNow.
    Subscribe to the channel and Learn more about ServiceNow.
    ServiceNow Administration Training : • ServiceNow Administrat...
    What is ServiceNow : • What is ServiceNow | S...
    ServiceNow Incident Management: • #1 #ServiceNow #Incide...
    ServiceNow Developer Training: • #1 ServiceNow Develope...
    ServiceNow Portal Training: • #1 ServiceNow Service ...
    #ServiceNowIntegration #ServiceNow #WhatisServiceNow

ความคิดเห็น • 79

  • @kishored8336
    @kishored8336 5 ปีที่แล้ว +5

    Thanks Gaurav! it's very clear.i have followed your steps , it was done.
    Can you please share how to integrate ServiceNow with Jira ( insert, update, Delete) ,not only Jira, any third party tool based on this 3 operations (insert, update, delete) , if you have links please share , most helpful for me.

  • @prinskumargupta2553
    @prinskumargupta2553 6 ปีที่แล้ว +1

    Hi Gaurav, thank you for share this video, it's really to helpful for me. Thanks alot

  • @Allenw154
    @Allenw154 6 ปีที่แล้ว

    Clear and simple. Good work.

  • @adhikarun
    @adhikarun 6 ปีที่แล้ว

    Hello Gaurav, Thank a lot, I was able to create a new record in Computer table following the steps.

  • @KaisLaribi
    @KaisLaribi 5 ปีที่แล้ว

    Nice and easy ! thank you so much !

  • @ravijoshi716
    @ravijoshi716 7 ปีที่แล้ว

    Thanks for the detailed explanation Gaurav. Very helpful....

  • @Anilsharma-vo2nx
    @Anilsharma-vo2nx 5 ปีที่แล้ว

    Thanx Gaurav ,, perfect and clear

  • @tawseeflone2186
    @tawseeflone2186 6 ปีที่แล้ว

    Thanks Gaurav... This vedio helps me lot.

  • @pratiknarole2377
    @pratiknarole2377 6 ปีที่แล้ว

    Great video Gaurav...!!!

  • @tpac2594
    @tpac2594 5 ปีที่แล้ว

    Thanks for making this awesome videos.
    I would like to know how we can create request/incident using service now API catalog.

  • @karthikavijaya88
    @karthikavijaya88 4 ปีที่แล้ว +2

    Hey gaurav can u cover the CORS policy of the rest API in next session

    • @SAASWithServiceNow
      @SAASWithServiceNow  4 ปีที่แล้ว +1

      Hi, its already there ..ServiceNow - 4MV4D - REST API Inbound Request Security - S01L06 th-cam.com/video/i0a9_0LwSx0/w-d-xo.html
      You can always look my playlist all of categories of my videos..

  • @mayurmalhotra5494
    @mayurmalhotra5494 5 ปีที่แล้ว

    Good video. Thanks.

  • @antoninmorin4564
    @antoninmorin4564 6 ปีที่แล้ว

    Very clear, thank u

  • @sudarshangurav6800
    @sudarshangurav6800 5 ปีที่แล้ว

    Thank you so much Aweeeeeeeeeeeeeeeeeeeeesome video

  • @vijayrk612
    @vijayrk612 6 ปีที่แล้ว

    Hi Gaurav, Really Nice video.I appreciate that.
    Could you please make an video on bi-directional integration like Servicenow-Salesforce, Salesforce to Servicenow please.
    Waiting for your reply...

  • @ranavaibhav1
    @ranavaibhav1 6 ปีที่แล้ว

    Gaurav - great tutorial. Thank you!
    I'm following your steps however keep getting following in console -
    XHR failed loading: OPTIONS
    any suggestions?

  • @prateekdhantole6182
    @prateekdhantole6182 5 ปีที่แล้ว

    Sir can you please provide a tutorial for bi-directional Integration between two instances in servicenow.

  • @kshirabdhisayanamdas3131
    @kshirabdhisayanamdas3131 3 ปีที่แล้ว

    Hi I'm getting an error "Access-control-allow-origin" as missing header. Can you please help me on that

  • @oshinaantony2127
    @oshinaantony2127 3 ปีที่แล้ว

    Can you explain how to insert record in request table via catalog item in servicenow through c# code?

  • @firozautomation4047
    @firozautomation4047 6 ปีที่แล้ว

    very helpful for me

  • @deepalijoshi202
    @deepalijoshi202 4 ปีที่แล้ว

    Great Video thanks. I understood how we can post / put data into incidents. I want to know if serviceNow can automatically post the updates from a incident table by any user back to my third party application without having to do GET. Because I don't want to keep polling using GET. So is there something like subscription where my application can automatically get updates from serviceNow about changes in any incident. Thank you again :)

  • @ayushbiswal9270
    @ayushbiswal9270 6 ปีที่แล้ว +1

    hi gaurav,
    i tried this exactly on kingston but i am unable to create incident record in that instance. if you could please help me with that.

    • @SAASWithServiceNow
      @SAASWithServiceNow  6 ปีที่แล้ว

      There should not be any difference. Can you show me your script.

  • @sureshk1685
    @sureshk1685 6 ปีที่แล้ว +1

    i clearly understood the concept but the same thing i done on my instance its not getting output in Kingston version.So is there any modification to be done

    • @SAASWithServiceNow
      @SAASWithServiceNow  6 ปีที่แล้ว

      Nothing extra needed for Kingston, can you share the code

    • @sureshk1685
      @sureshk1685 6 ปีที่แล้ว

      function learnApi()
      {
      var requestBody = "{\"short_description\":\"test value1\",\"assignment_group\":\"Database\"}";
      var client=new XMLHttpRequest();
      client.open("post","dev35123.service-now.com/api/now/table/incident");
      client.setRequestHeader('Accept','application/json');
      client.setRequestHeader('Content-Type','application/json');
      //Eg. UserName="admin", Password="admin" for this code sample.
      client.setRequestHeader('Authorization', 'Basic '+btoa('admin'+':'+'190@R.puram'));
      client.onreadystatechange = function() {
      if(this.readyState == this.DONE) {
      document.getElementById("response").innerHTML=this.status + this.response;
      }
      };
      client.send(requestBody);
      }
      this my code and that submit button code i done perfectly no mistake in that. please verify where i done mistake thank you

  • @gopimaturu
    @gopimaturu 6 ปีที่แล้ว +1

    401 Unauthorized from javascript which you mentioned in the video am getting 401 error, but from postman retrieving incident records successfully,can you help me why this happen from js.

    • @SAASWithServiceNow
      @SAASWithServiceNow  6 ปีที่แล้ว

      Hi Gopi, please check your authentication. Are you using admin or any other user.

    • @gopimaturu
      @gopimaturu 6 ปีที่แล้ว

      SAAS With Service-Now - Hai , thanks for your reply,I set the cors rules now my rest API working fine.

    • @panivrushab3389
      @panivrushab3389 3 ปีที่แล้ว

      I am using admin and provided all necessary roles .. still I'm getting 401 Unauthorized error
      Changed password, created new user similar to admin but no luck.
      Getting error in Postman as well.
      If I use the URL in search box then it will ask for credentials, if I provide admin creds it will work, but same admin creds is not working via POSTMAN

  • @SG-ip1ee
    @SG-ip1ee 4 ปีที่แล้ว

    Hi Wat if I want to add for walking for fields like I want to add a ci of particular class

  • @anusmita202
    @anusmita202 5 ปีที่แล้ว

    Hi if we want to run from two different instances..? So what will be the process

  • @gauravraiIT
    @gauravraiIT 7 ปีที่แล้ว

    HI Its really very helpful to understand rest from external .
    Its my humble request if you can upload video as you uploaded .The same way for JIRA (atlassian or any one type) or two way communication .(ServiceNow to jira and jira to servicenow ). Plz I am really struggling with that last 15 days i also went community .

    • @SAASWithServiceNow
      @SAASWithServiceNow  7 ปีที่แล้ว

      Please watch-th-cam.com/video/X_6zjpFJO2w/w-d-xo.html

  • @sagarkhobare283
    @sagarkhobare283 5 ปีที่แล้ว +1

    Thank you sir for knowledge....
    But when I run in Chrome it's not working... it's throwing some error

    • @SAASWithServiceNow
      @SAASWithServiceNow  5 ปีที่แล้ว

      What error you are getting?

    • @sagarkhobare283
      @sagarkhobare283 5 ปีที่แล้ว

      @@SAASWithServiceNow when I'm using Chrome record is not inserting in to incident table.
      But using IE record is inserting

  • @ShaliniRaviGupta
    @ShaliniRaviGupta 6 ปีที่แล้ว

    Nice video..

  • @CyberSnowman
    @CyberSnowman 5 ปีที่แล้ว

    Good information but very distracted by numerous interruptions of about 10 commercials and errors just left in example.

  • @kishored8336
    @kishored8336 5 ปีที่แล้ว

    i have created one incident record from ABC instance-----> XYZ instance, then if i updated incident Record in ABC it should be update in XYZ

  • @shreemaatha9997
    @shreemaatha9997 4 ปีที่แล้ว

    Hi Gourav, I m trying to do same but in ServiceNow its not creating INC, ANy property setting need to be done in Sn

  • @denisdenis3736
    @denisdenis3736 7 ปีที่แล้ว +1

    Hi Gaurav, thank you for the tutorial. I have a question for you, how would you add the 'caller' field in the builder, and make it display the 'current logged in user"? I tried something like 'javascript:gs.getUserID()' but it does not work. Thanks

    • @SAASWithServiceNow
      @SAASWithServiceNow  7 ปีที่แล้ว

      +denis denis Hi Denis, ideally the contact should be the api account name however if you want put contact then you need to add the field in the html form and map it with contact field like i did for other fields, ask user to fill their name, if name matches it will put the contact. Gs.getuserid wont work here as you are filling the data from external source.

    • @denisdenis3736
      @denisdenis3736 7 ปีที่แล้ว +1

      Thank you for your answer Gaurav. The problem is :
      - I need the name of the caller to be inserted on the incident form
      - if I use the html form to map it to SNOW, I have to make sure, the user enters his name correctly - indeed, the user might mispel it - like 'Jean-Yves Dupont' and not 'Jean Yves Dupont'. The hyphen should be mentionned otherwise the system would leave an empty field or like sometimes, the user might enter 'Dupont Jean-Yves' (LastName.FirstName)...
      I don't think it would be possible to attach a script to the html form to display the current logged in user as the caller of the Incident, wouldn't it?
      I am still learning :) Thank you for your help.

    • @SAASWithServiceNow
      @SAASWithServiceNow  7 ปีที่แล้ว

      +denis denis Hi Denis, I think I can write a script for this to check when user enters his name. I am away for my Indian festival holidays. I can try to give you by 25 Oct. Please also like and share my channel if you can and subscribe too.

    • @denisdenis3736
      @denisdenis3736 7 ปีที่แล้ว

      Thank you Gaurav. I appreciate your help. Take your time and enjoy your holiday:!!!!!!!

  • @tfreid62
    @tfreid62 7 ปีที่แล้ว

    Thank you Gaurav

    • @tribidmaji
      @tribidmaji 6 ปีที่แล้ว

      Hi gaurav..can you let us know..which user ID and password should we use in the script... because I have tried but incident is not getting created

    • @kishored8336
      @kishored8336 5 ปีที่แล้ว

      @@tribidmaji you can use any user of user id , password from your UserTable, but he must have admin role to create incidents in servicenow

  • @palashgajbhiye7919
    @palashgajbhiye7919 4 ปีที่แล้ว

    I am getting this error
    Access to XMLHttpRequest at *********' from origin 'null' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

    • @panivrushab3389
      @panivrushab3389 3 ปีที่แล้ว

      You need to add your domain in CORS rules
      I had same issue, then I added HTTPS://localhost:port to CORS rules ..issue resolved now

  • @querofolminar3456
    @querofolminar3456 ปีที่แล้ว

    🎉

  • @pankajvyas4531
    @pankajvyas4531 5 ปีที่แล้ว

    Why it doesn't work on Chrome?? I have clicked on "run in chrome" from notepad++, it did not worked.
    Could you please let us know what's this issue?

  • @ajaysaitejchepeni6524
    @ajaysaitejchepeni6524 6 ปีที่แล้ว +2

    why does it not work if we run through chrome

    • @SAASWithServiceNow
      @SAASWithServiceNow  6 ปีที่แล้ว

      Are you getting any error. This is not browser specific.

    • @kishored8336
      @kishored8336 5 ปีที่แล้ว

      @@SAASWithServiceNow we are not getting any error, but come to Chorme it is not working may i know cause.
      HTML script:--------------------
      function learnApi()
      {
      //var requestBody = "{\"short_description\":\"REST API 1st record\",\"assignment_group\":\"network\"}";
      var incgroup=document.getElementById("group").value;
      var inctitle=document.getElementById("title").value;
      var requestBody= "{\"short_description\":\"" + inctitle + "\",\"assignment_group\":\"" + incgroup + "\"}"
      var client=new XMLHttpRequest();
      client.open("post","dev61367.service-now.com/api/now/table/incident");
      client.setRequestHeader('Accept','application/json');
      client.setRequestHeader('Content-Type','application/json');
      //Eg. UserName="admin", Password="admin" for this code sample.
      client.setRequestHeader('Authorization', 'Basic '+btoa('test'+':'+'123'));
      client.onreadystatechange = function() {
      if(this.readyState == this.DONE) {
      //document.getElementById("response").innerHTML=this.status + this.response;
      var res=this.response;
      parsedData= JSON.parse(res);
      alert(" You have sucessfully created Incident with number:" + parsedData.result.number);
      }
      };
      client.send(requestBody);
      }
      JS code:--------------------------------------------------------------
      Short Description:
      Assignment Group:

  • @Neelbiker
    @Neelbiker 4 ปีที่แล้ว

    When I am doing this I am getting an cors issue from chrome browser I added cors policy and also tried doing cors false .. but not working . Any idea ?
    It's working from POST man but not from browser

    • @panivrushab3389
      @panivrushab3389 3 ปีที่แล้ว

      Same issue with me aswell

    • @Neelbiker
      @Neelbiker 3 ปีที่แล้ว

      @@panivrushab3389 bro don't use their Js code .. just write a simple code using jQuery it will work !

    • @panivrushab3389
      @panivrushab3389 3 ปีที่แล้ว

      I was able to solve this error by adding domain to cors rules in Snow
      But now i am getting 401 Unauthorized error. It works if I manually search with the URL and enter the username and password, but fails when done through webpage
      I have given all necessary roles still not working

  • @pragyasingla3618
    @pragyasingla3618 5 ปีที่แล้ว

    Implemented same as you. It is working in IE but not working on chrome. Please help on this. Getting "access to XMLHttpRequest at from origin 'null' has been blocked by CORS policy" error

    • @SAASWithServiceNow
      @SAASWithServiceNow  5 ปีที่แล้ว

      I have seen this error only on Chrome, let me check on this.

    • @pragyasingla3618
      @pragyasingla3618 5 ปีที่แล้ว +1

      @@SAASWithServiceNow thanks for your quick response

    • @panivrushab3389
      @panivrushab3389 3 ปีที่แล้ว +2

      Hi,
      For this to work in chrome/edge, you need to create a CORS rule in SNOW and set domain field as 'null'.

  • @raghavendrak.v7052
    @raghavendrak.v7052 6 ปีที่แล้ว

    hello sir i have tried this in my earlier instance but in my new kingston instance its not working why is that?

    • @SAASWithServiceNow
      @SAASWithServiceNow  6 ปีที่แล้ว

      Can you share the code.. are you getting any error.

  • @caninha2023
    @caninha2023 4 ปีที่แล้ว

    And how can I protect my password that was stored in the javascript file?

  • @ashishsaxena2406
    @ashishsaxena2406 6 ปีที่แล้ว

    how to insert record in snow by automic?

  • @PASZCZak47
    @PASZCZak47 4 ปีที่แล้ว

    Lol, why at the beginning Gaurav is testing for video for 6minutes?

    • @SAASWithServiceNow
      @SAASWithServiceNow  4 ปีที่แล้ว

      Did not understand, it is to show how you can do it from ServiceNow OOB API

    • @PASZCZak47
      @PASZCZak47 4 ปีที่แล้ว

      @@SAASWithServiceNow watch it man. by mistake you have left some preparation footage and video starts over from around 6th minute

    • @PASZCZak47
      @PASZCZak47 4 ปีที่แล้ว

      @@SAASWithServiceNow actually is just after 7:04.