Column webhook firing on all changes and repeatedly reporting same deleted row
I created a webhook with column scope as follows and enabled it.
Everytime a change is made on the smartsheet, the webhook fires, even though I specified only one column for the subscope. Shouldn't it only change if a value in that column changes?
{ "message": "SUCCESS", "resultCode": 0, "result": { "id": 7548025422800772, "name": "Webhook Name", "scope": "sheet", "scopeObjectId": 2724913632044932, "subscope": { "columnIds": [ 4188043048445828 ] }, "events": [ "*.*" ], "callbackUrl": "https://myapp.com", "enabled": true, "status": "ENABLED", "version": 1, "createdAt": "2020-08-19T03:18:53Z", "modifiedAt": "2020-08-19T03:36:03Z" } }
On a side note the webhook fired when I deleted a row. Every subsequent call now seems to include an event for that deletion as shown below. How can a row be deleted more than once?
1st Webhook Callback
{ "nonce": "e93d6ba6-74f8-468a-a92d-225c07b2cc49", "timestamp": "2020-08-19T04:05:31.885+0000", "webhookId": 7548025422800772, "scope": "sheet", "scopeObjectId": 2724913632044932, "events": [ { "objectType": "row", "eventType": "deleted", "id": 5798330593503108, "userId": 6819047602972548, "timestamp": "2020-08-19T03:59:14.000+0000" } ] }
Subsequent Webhook call (later time) seems to be deleting the same row.
{ "nonce": "52e56df4-7bc0-460e-a90e-d9206cfc5498", "timestamp": "2020-08-19T04:36:22.313+0000", "webhookId": 7548025422800772, "scope": "sheet", "scopeObjectId": 2724913632044932, "events": [ { "objectType": "row", "eventType": "deleted", "id": 5798330593503108, "userId": 6819047602972548, "timestamp": "2020-08-19T03:59:14.000+0000" } ] }
Is this expected behaviour? It doesn't seem correct.
Thanks,
Greg
Best Answer
-
Hi @Greg Caine
It sounds like there are two things to address:
Firstly, a row being deleted will affect a value in a column (as it affects all columns, across the whole sheet for that row). Secondly, it sounds like perhaps your webhook answering code is not responding correctly. When that's the case, if the webhook service doesn’t think it’s been correctly received it will re-try (hence your duplicate call).
You can find more information on webhooks in our API documentation (see here).
If you need more detailed help, you may also want to post in the larger API community, in Stack Overflow (see here).
Cheers!
Genevieve
Need more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
Answers
-
Hi @Greg Caine
It sounds like there are two things to address:
Firstly, a row being deleted will affect a value in a column (as it affects all columns, across the whole sheet for that row). Secondly, it sounds like perhaps your webhook answering code is not responding correctly. When that's the case, if the webhook service doesn’t think it’s been correctly received it will re-try (hence your duplicate call).
You can find more information on webhooks in our API documentation (see here).
If you need more detailed help, you may also want to post in the larger API community, in Stack Overflow (see here).
Cheers!
Genevieve
Need more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
-
Hi Genevieve,
Thanks so much your information really helped a lot. I wasn't returning a HTTP 200 response under certain circumstances.
I did understand that the delete row should fire the webhook (as you said a delete will affect all columns of the row in a sheet) so wasn't suggesting that was incorrect behaviour. I now understand that Smartsheets was retrying (and resending events - which is the expected behaviour) as my app had not confirmed that it had received those event notifications.
Cheers,
Greg
-
Hi Greg,
Great! I'm glad it makes sense. 🙂
Need more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 439 Global Discussions
- 138 Industry Talk
- 471 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 488 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives