How Can I store in a pandas´s df the a webhook´s results
Hi,
I Could Connected a webhook that I Created and Enabled in python, and Im using aws lambda with the url callback made in aws api gateawa. Wich is all well connected.
But as far as I Know, the the event triggered by the webhook just contains the column id and the row id but not the modified value of the cell. So I got stuck because I Need to store in a df the row id, columnd if and the new value of the cell modified in the sheet because I Will use that df to update deals in a crm called pipe due to the organization I work for has the two plattaform connected.
So I wanted to know if some of you have been work with this issues so could help me to solve it in a python´s code.
Thanks in advance.
Bye.
Answers
-
There are significant security, bandwidth and computer reasons for why the Webhook do not contain more information. You need to take the info provided by the webhook and then make API calls to take the needed actions. It is beyond my time availability to help with the code in this forum, but here is a video and GitHub repository for code.
https://www.youtube.com/watch?v=qYZ1MZgbQmU
https://github.com/JakeMarquez/smartsheetdemo
Yes, it is javascript, but I found it very helpful when I was starting writing webhooks for Smartsheet in both javascript and python.
Good luck
-
The webhook has all the information that you need [sheetID, columnID and rowID]. When you receive the webhook use smartsheet API to make the call to get_row:
https://api.smartsheet.com/2.0/sheets/{sheetId}/rows/{rowId}
As you have got the ColumnID you can loop over the results from the get_row and get the modified value.
Or you can grab the sheet and loop over the results and get the values based on rowID and columnID.
It all depends on how much data are you expecting to receive in the webhook (would it be 1 row or many rows).
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 139 Industry Talk
- 471 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 494 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives