- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-12-2018 11:45 AM
I followed the instructions provide in the link below to create a Webhook and sucessfully posted an Alert to the system logs .
https://community.servicenow.com/community?id=community_blog&sys_id=886d2a29dbd0dbc01dcaf3231f9619b0
How do i create an incident for the messages /Alerts received through the webhook.
Thanks
Senthil
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-12-2018 06:17 PM
Hi Senthil,
In the scripted API that you created as part of the instructions in that blog... instead of doing a log entry, you actually can create the incident.
How?
It's very simple... just include something like the following before or after where you do the log entry...
var grIncident = new GlideRecord('incident');
grIncident.initialize();
grIncident.short_description = 'Incident created from WebHook';
grIncident.description = request.body.dataString;
//the above is just an example. you can parse the request body and fill up the various incident fields depending on the data that you have in your payload
grIncident.insert();
//and Voila! your Incident is created
Thanks,
Berny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-13-2018 12:12 AM
You're welcome Senthil! Indeed, please keep me posted in the outcome. I'll also appreciate if you could mark as helpful those answers that were helpful :P...
Thanks,
Berny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-13-2018 01:00 PM
Hi Berny,
The solution worked like a champ . Appreciate all the help.
You seem to be an expert at it
Regards,
Senthil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-13-2018 08:49 PM
lol! 🙂 thanks for the compliment Senthil!
You're welcome! I'm very happy you were able to get it working.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-19-2021 03:57 AM
Hi Berny,
This is not working for me, after adding the suggested attributes. I still do not see an incident created in SNOW.