Updating tickets from Smartsheet to Servicenow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2020 05:00 AM
Hi Team,
I have integrated Servicenow (incident table)with Smart sheet.
On creating incident ticket on servicenow instance, integration triggers and creates a smart sheet and copies incident record data into smart sheet.
Now I am looking for reverse integration i.e on updating incident record in smart sheet, it should update respective incident ticket in servicenow. Please help me with your ideas.
- Labels:
-
Integrations
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2020 05:18 AM
Hi Varun,
How the smartsheet will trigger the events to servicenow ? smartsheet has any webhook mechanism or REST webservice so it can trigger the alerts if any updation happens in that system.
If they have webhooks or someother functionality to trigger the alerts, then in servicenow you can create the scripted REST api and you can make the incident table to update.
Create the endpoint using the scripted rest api in servicenow and then configure it in smartsheet.
Now you can write the code to update the incident table.
Thanks.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2020 05:26 AM
I echo Harish's comments. You need to look for a webhook capability in Smartsheets so you can say "Hey, something changed, I need to tell ServiceNow about it at this endpoint."
You'll then call an endpoint corresponding to the table API, import set API, or custom scripted REST API.
Be aware that your BR that sends the outbound request needs to also be updated or you could find yourself caught in a loop of "Smartsheets tells ServiceNow to make an update" then "ServiceNow recognizes the update and tells Smartsheets", which tells ServiceNow... you get the idea.
The solution to this is to use gs.isInteractive() on the condition statement your business rule (I'm assuming you have a BR on insert/update somewhere that triggers the outbound integration to Smartsheets). That says "Only tell Smartsheets if this change was made by a human". If you get the trigger from Smartsheets working back to ServiceNow, this prevents the loop because the webhook isn't considered interactive.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2020 07:15 AM
FYI - A response to this post was featured on the Community Live Stream video. I invite you to watch the episode.
Video: Community Live Stream - 2020-02-04 - Developer Community - ServiceNow Community
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2020 09:11 PM
Hi Harish,
Thanks for the response.
I created a webhook in servicenow rest message and enabled the webhook as well. I also configured the scripted rest API which triggers whenever there is an update happens on the smart sheet.
So, I updated the record in the sheet sheet and I received the response in the servicenow logs as below
Sheet request data recieved from SS{"nonce":"c48901ee-0f2f-41de-91fc-893bf71d4317","timestamp":"2020-02-10T04:48:22.010+0000","webhookId":4775392641869700,"scope":"sheet","scopeObjectId":7060708719388548,"events":[{"objectType":"sheet","eventType":"updated","id":7060708719388548,"userId":3993115888510852,"timestamp":"2020-02-10T04:48:16.000+0000"},{"objectType":"row","eventType":"updated","id":6861346000660356,"userId":3993115888510852,"timestamp":"2020-02-10T04:48:16.000+0000"},{"objectType":"cell","eventType":"updated","rowId":6861346000660356,"columnId":5094695169746820,"userId":3993115888510852,"timestamp":"2020-02-10T04:48:16.000+0000"},{"objectType":"cell","eventType":"updated","rowId":6861346000660356,"columnId":2842895356061572,"userId":3993115888510852,"timestamp":"2020-02-10T04:48:16.000+0000"}]}
From the above response, I am able get the cell details which got updated in the sheet. But I am not receiving the changes which I made in the sheet. Say for example I updated short description in the sheet and saved the sheet. So, in the logs I expect what value of short description is updated in the sheet. But this value is not coming up in the payload from smart sheet.
Please let me know any thoughts in the getting the changes in the smart sheet payload.