apiKey = “MySecretKey”
apiUrl = “https://api.monday.com/v2”
headers = {“Authorization” : apiKey}
########
query5 = ‘mutation ($myItemName: String!, $columnVals: JSON!) { create_item (board_id:myBoard_ID, item_name:$myItemName, column_values:$columnVals) { id } }’
vars = {
‘myItemName’ : billingAddressVariable, #works as is, variable
‘columnVals’ : json.dumps({
'WorkID : {‘value’ : workIDVariable}, #does not work, variable
‘Ticket#’ : {‘text’ : ticketNumberVariable}, #does not work, variable
‘status’ : {‘label’ : 'Working on it '}, #works as is; constant
‘date4’ : {‘date’ : dueDateVariable} #works as is; variable
})
}
data = {‘query’ : query5, ‘variables’ : vars}
r = requests.post(url=apiUrl, json=data, headers=headers) # make request
print(r.json())
No errors, date and status columns fill no problem, same with myItemName. This is but one of many attempted formats of implementation. Nothing changes. Ticket# and WorkID refuse to fill. I am using official docs as far as I am able.