How to trigger outbound REST API when State is change?

jackh
Kilo Contributor

Hi,

My use case requires to call external REST API from ServiceNow when the incident state is changed.   For example, our release pipeline will create a new incident (via inbound REST API call) for someone to approve this release.   Once the incident assignee approves the ticket by changing the State (e.g. from New to Approved), it will trigger to call outbound REST API to our release pipeline.   How to do that in ServiceNow to trigger such outbound API when State is changed?


Any advice would be appreciated.

Thanks

1 ACCEPTED SOLUTION

That is because, when you click "Update" you are redirected to the recent page you opened. When you click save, you can still stay on the same incident form even after updating the form.


View solution in original post

22 REPLIES 22

jackh
Kilo Contributor

I'm able to create script include and call it from business rule.   Thanks everyone for helping me.   This community is great.


RAM52
Kilo Contributor

HEY ,CAN YOU PLEASE TELL ME HOW YOU DID THAT.

 

 

 

Thanks

When creating the REST Message it will give you the option to copy it to a script.  Simply click the link and the preview pane will popup and then copy the script and paste it into your custom Business Rule.