I had the column in the smartsheet as 'Allowing multiple contacts to be selected'.
I am using simple_smartsheet package (https://pypi.org/project/simple-smartsheet/) but I cannot seems to find in the internet that anyone adding multiple contact using this package.
Below is the piece of code that i tried:
from simple_smartsheet import Smartsheet
from simple_smartsheet.models import Sheet, Column, Row, Cell, ColumnType
#%%
access_token='XXX'
smartsheet = Smartsheet(access_token)
sheet_name = 'test'
sh = smartsheet.sheets.get(sheet_name)
new_rows = [
Row(
to_top=True,
cells=[
Cell(column_id=released_by.id, value=[{'objectType': 'CONTACT',
'email': 'xxx.yyy@westrac.com.au',
'name': 'xxx yyy'},
{'objectType': 'CONTACT',
'email': 'aaa.bbb@westrac.com.au',
'name': 'aaa bbb'}])
],
),
]
#new_rows.append(Row(to_top=True,cells=sh.make_cells(row_value)))
smartsheet.sheets.add_rows(sh.id, new_rows)
But I got this error:
SmartsheetHTTPClientError: HTTP response code 400 - Error code 1008 - Unable to parse request. The following error occurred: Field "value" was not parsable. value must be a primitive type
at [Source: java.io.PushbackInputStream@786472ed; line: 1, column: 241].
I am not quite sure where did i do wrong. Any thoughts?