Integrate Servicenow API with POST method

I need to integrate service now api with post method. I have created the below flow:

I created the authorization profile in config settings. I need to send the 3 entity values in api which will store in servicenow database.

Configuration of service node is given below:

Here auth= post incident (authorization profile created by me)
In headers- Key :Content-Type , value: application/json
In Body- i given sample values

After testing the above response is coming fine.
But when we test the bot on clicking “talk to bot”, it gives the below error:

Please help where i am wrong.

Your screenshot does not show how you are preparing the payload of the service node call. Please refer to “Working with service node” in our documentation. You can use this node when you have collected the parameters needed for the API request using Entity or other nodes to capture the user input.

It is further explained in the documentation that you need to refer to captured entities or context variables as the following:

  1. In the second field of the Request URL , specify the URL for the Dialog task response to process at, for example, Add query or path parameters as part of the URL, if required. To use Entity node values as parameters, use the following syntax for accessing the Context object:`{{context.entities.topic}}for the context.entities.topic. You must use the double brackets {{ context.object }}` . For more information, see the Context Object.

Hope this helps.

Hi Priyanshu,

I am getting an error in creating Basic Auth Profile. I have entered service now credentials to get the data from API but showing below error:
“message”: “User Not Authenticated”,
“detail”: “Required to provide Auth information”

But same credentials are working in POSTMAN.
Could you please tell me how you setup the Basic Auth profile and where i am doing wrong?

1 Like

I have the same problem with a service now api. works correctly in postman, but kore issues error! please help us!!!

Hi Gourav,
You can use servicenow api with post using following steps:

  1. You need to navigate to Config Settings->Authorization Profile-> Click on add
    Now create it like below image:

  2. Now create a service node & define request as given below:

  3. Set header like this:

  4. Set the values, which you want to send using api with post method. For ex, i have used description here. This description i have already created as an entity node, which i am sending along with api.)

  5. Now click on test like below:
    (while testing enter your credentials & also provide the entity value which you want to post with api)

If you are getting the correct output, then it worked correctly.
Save it as a sample response.

Let me know if you are facing any issue.

Priyanshu Shukla

1 Like

Please help me out with https://{{tenant}}.com/api/now/table/incident .
Is there any format to be followed?

Its your servicenow instance api url…which you are using to post data

For more details…go through with servicenow documentation.


Help me out with the authorization check URL .

https://{{tenant}}/api/tnse/create_incident is not working when making an authorization profile under basic auth but https://{{tenant}}/api/now/table/incident is working well for making a service now call by using authorisation profile.

Can i know the reason.

Are there some necessary details this URL should have ?

I got the https://{{tenant}}/api/tnse/create_incident

Hi! Priyanshu .I am getting 422 error. ( Attaching screenshot)

I followed your instruction and using Airtable to post data.
It would be nice of you , if you help a bit.

Hi Priyanshu, I did exactly as you told. But while testing the API request, i am getting this error “Missed idp info or stream user acc info”