Creating a Webhook that only gets triggered for new added rows but not for updates
Hello according to API documentation, creation request of Webhooks the events parameter should only get an array with "*.*" value.This would mean that web hook would be called on any changes happened on sheet.
I would need to get my web hook get triggered only when a new row is added.
Is it possible to limit this?
Answers
-
And second nested question will be how would I get the values of the cells in the body of the web hook.
-
Hi @ILKER
You are correct, currently the Event that Webhooks are subscribed to is "all objects" and "all events". You can use this to subscribe to all events and then have your code process the webhooks to filter for only when a row is added on your side.
To answer your second question, the callback payload is a "skinny" payload -- it indicates which objects changed and the type of events that occurred, but does not contain any data from the objects themselves.
See the Note in this section of the API documentation: Intro to Webhooks
Cheers,
Genevieve
Need more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
-
On the 'Webhooks Basics' page, Section 1 of the 'Intro to Webhooks' contains the following text:
Webhook examples in plain English:
- "When any changes occur in Sheet_A, send a callback to https://www.example.com/abc"
- "When a new row is added to Sheet_B, send a callback to https://www.example.com/def"
- "When a cell value is changed in Sheet_C, send a callback to https://www.example.com/ghi"
Based on @Genevieve P.'s answer, this documentation is very misleading.
If it is still true in 2024 that a webhook can only be created to subscribe to all events (i.e. "*.*") in a sheet (it should be noted that 'sheet' is also the only allowable 'scope'), then none of the 'plain English' examples provided are possible, since you can't create a webhook that sends different events to different callback urls/listeners.
Is adding the functionality described in the 'plain English' examples on the smartsheet API roadmap?
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.7K Get Help
- 433 Global Discussions
- 136 Industry Talk
- 468 Announcements
- 4.9K Ideas & Feature Requests
- 143 Brandfolder
- 147 Just for fun
- 64 Community Job Board
- 466 Show & Tell
- 32 Member Spotlight
- 2 SmartStories
- 298 Events
- 36 Webinars
- 7.3K Forum Archives