Auto creation incident through REST API integration

sukanya kotni
Tera Contributor

Hi Team,

Please help me on below requirement.

Q) When third party tool sends an json file, We need to check service now side Ci is operational or not. If Ci is operational we need to create incident in serviceNow. 

If CI is not operational it needs to be failed and send mail to xyz group msg like due ci is not valid like that.

 

Thanks in advance,

 

8 REPLIES 8

Vasantharajan N
Giga Sage
Giga Sage

@sukanya kotni - Do you have the sample payload the third party system will send to ServiceNow? if yes, could you please get the below details,

 

1. JSON Payload

2. Email body content to send

 

Then follow the below steps

1. Create the scripted rest API which accepts the JSON request body and business logics

2. Register a Event which we will use to trigger notification

3. Create Email notification using the event registered in Step 2. 

 


Thanks & Regards,
Vasanth

Hi Vasanth,

Thanks for quick response.

We have JSNON payload and message body also.Can you please help me how to check the ci is operational or not.

If operational needs to craete incident in serviceNow automatically if not needs to failed and notification needs to trigger xyz group.

Please help me on this step by step.I am new to integrations and Please provide me the code and where we needs to add these code in post method? If yes-Could you please provide me the the code.

 

Thanks in Advance, 

 

@sukanya kotni - Could you please share the sample payload which i can use for your requirement.


Thanks & Regards,
Vasanth

Adrian Ubeda
Mega Sage
Mega Sage

Hi Sukanya, 
I would create a simple flow for achieving this. First, you need to create a trigger for an API call that this 3rd party application will do into the instance, then with a custom action you can compare and select if CI its operational or not, and then create or not the incident.
Check this link: https://docs.servicenow.com/bundle/quebec-servicenow-platform/page/administer/integrationhub/concept...

https://docs.servicenow.com/bundle/tokyo-application-development/page/administer/flow-designer/conce...

 

If it was helpful, please give positive feedback! ✔
☆ Community Rising Star 22, 23 & 24 ☆