Slack Integration: How can I systematically retrieve the row from the slack notification
Answers
-
I do realise that the primary column ID is in the message, but as far as I can see, I can't use the smartsheet API to directly query a row based on it's primary column - am I wrong?
-
There are two possibilities I can think of, here:
1) One way to achieve this would be to add a column to the sheet with the
rowId
, then populate this row using the API.For example, use
getSheet
then loop over rows toupdateRow
(or maybe just oneupdateSheet
call) with the id in the newrowId
column.Then the workflow can include the
rowId
column. This could be coupled with additional logic/workflows that trigger these api calls again whenever a row is added (workflow) or whenever the slack message does not include the row id.2) As another option, you could use a system Auto-number column as a unique identifier for the row.
If you're using Slack notifications in conjunction with your own application, you could fetch the whole sheet via the API and keep a mapping of auto-number column ids to
rowId
s.I hope that helps!
Genevieve
Need more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.2K Get Help
- 419 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 141 Just for fun
- 58 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 299 Events
- 38 Webinars
- 7.3K Forum Archives