Integrate Servicenow API with POST method


(Priyanshu shukla) #1

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.

(Swagata Sengupta) #2

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.