- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2020 03:33 AM
Hi Community,
I have a business rule attached that work for updating and creating incident tickets over API to external 3rd party, but I am now trying to add to the business rule the capture and sending of attachments, whenever there is an attachment.
I successful created a test update and get and post of the attachments from Postman (with help of the document that Muhammad had previously sent through "HackLab") however was unsure of how to fit the script and which bits of script to add from the document
, however I am not sure of the JSON script i should be writing to be able get and send the attachments over externally from the business rule.
Just need to add to the business rule (not take away anything because it works fine for creating / updating of incidents)
Any help much appreciated
Thanks
Steve
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2020 04:39 AM
I am glad that you got it working.
Just for your information, In case if you need to hit different endpoints based on Insert or update then you can create a script include reusable utility and from BR you can use
current.insert() & current.update() methods to check the operation and based on that you can call your script include passing in dynamic data. I hope this will help you in the future.
Have a nice day 🙂
Thanks & Regards,
Sharjeel
Muhammad

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2020 03:14 PM
Steve,
This won't work in Postman like this. I was asking to make a post call or create a ticket from servicenow that will trigger the rest call.
In simple words you have your business on the incident table. When you create incident record it will trigger the rest call.
Now if you go to System logs > system log > All. Filter Message field with "@Steve" and it will show you few logs there share those logs with me.
Thanks & Regards,
Sharjeel
Muhammad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2020 04:35 PM
Sharjeel,
Thank you, i have just been setting up another oauth profile, web messages, and new business rule for testing purposes. 🙂
I will provide a test and come back to you shortly.
Many thanks
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2020 04:56 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2020 05:08 PM
Steve,
I think the HTTP method you define 'Create Ticket' or somwhere in the end point has some problem. This is not related to changes we did for attachment thing. Lets confirm this by removing the if condition we placed and try then
Thanks,
Sharjeel
Muhammad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2020 05:59 AM
Hi,
Check this link
If my answer helped you in any way, mark answer as helpful and correct.
Thanks and regards,
Megha.