- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-09-2022 05:04 AM
We want to run few custom scripts which will be triggered at a certain stage of workflow. One such script is the below curl command which triggers a CI job in jenkins:
curl -X POST -u username:password https://demo.example.com/job/sample/build?token=xyz
I have added a "Run Script" block in my workflow, but not sure what is the code to be added in the script section to get the above line executed. Can someone please help.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-09-2022 05:15 AM
Hi Meghana,
The easy way to do this is to create a rest message in the ServiceNow and use it in the script section.
Simple steps:
https://docs.servicenow.com/bundle/rome-application-development/page/integrate/outbound-rest/task/t_ConfiguringARESTMessage.html
Once you have created the rest message you have the option to generate a script variable in the related links, you can just copy-paste that to the workflow script section,
Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-09-2022 05:15 AM
Hi Meghana,
The easy way to do this is to create a rest message in the ServiceNow and use it in the script section.
Simple steps:
https://docs.servicenow.com/bundle/rome-application-development/page/integrate/outbound-rest/task/t_ConfiguringARESTMessage.html
Once you have created the rest message you have the option to generate a script variable in the related links, you can just copy-paste that to the workflow script section,
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-09-2022 07:32 AM
Thank you Murali! This was exactly what we were looking for!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-09-2022 11:18 PM
You've welcome!