How to code Python in Zapier without using Smartsheet python SDK
Using Smartsheet Python SDK, I'm running the following code to access Smartsheet to:
- Get customer list from "Customer name" column of a Customer sheet
- Update Picklist of "Customer name" column with the customer list get from 1.
import smartsheet # Initialize Smartsheet client smartsheet_client = smartsheet.Smartsheet(my SMARTSHEET_ACCESS_TOKEN) sheet_Customer = 5623822008248192 column_Customer_name = 4467860205528922 sheet = smartsheet_client.Sheets.get_sheet(sheet_Customer) Customer_list = [] for row in sheet.rows: for cell in row.cells: if cell.column_id == column_Customer_name: Customer_list.append(cell.value) Customer_list.sort() # ABC Sort # Specify column properties column_spec = smartsheet.models.Column({'type': 'PICKLIST', 'options': Customer_list}) # Update customer list to "Customer name" column response = smartsheet_client.Sheets.update_column(sheet_Customer,column_Customer_name, column_spec)
The above coding run fine in Pycharm. Now I want to run it in Zapier, but Zapier does not support Python SDK but Python request. Can you help to code the above with Python request so that it can run in Zapier without using SDK?
Appreciate your help.
Best Answers
-
I don’t know how Zappier’s coding features work but if they won’t allow specific dependencies then you could just place the imported code directly in script. You can find the dependency code wherever you pip installed the module/package.
Also , you can access the api without the sdk just using the request library. That’s how the wrapper works anyways.
-
Dear Coby,
Thanks for your suggestion. So far, I have coded successfully Python without importing Smartsheet sdk in the script. It has already run.
Answers
-
I don’t know how Zappier’s coding features work but if they won’t allow specific dependencies then you could just place the imported code directly in script. You can find the dependency code wherever you pip installed the module/package.
Also , you can access the api without the sdk just using the request library. That’s how the wrapper works anyways.
-
Dear Coby,
Thanks for your suggestion. So far, I have coded successfully Python without importing Smartsheet sdk in the script. It has already run.
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
- 142 Just for fun
- 58 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 299 Events
- 38 Webinars
- 7.3K Forum Archives