I have made a very simple Python helper, to update a task in Asana with custom field on a task. it works on my local machine in terminal.
I am trying to add it to a Zapier 'Run Python' block, but get what looks like a generic error 'str' object has no attribute 'copy'
Here's the Python code which I'd appreciate any advice on why it wont run in a "Run Python" module in Zapier -- there's no str in these lines!!?
import requests
headers = {'Authorization':'Bearer 1/xxxxx'}
task_id = input_data['task_id']
data = {"data": {"custom_fields": {"1200278184463303":"#" + input_data['row_number']}}}
response = requests.put('https://app.asana.com/api/1.0/tasks/' + task_id, headers=headers, json=data)
return 'task #' + input_data['row_number'] + 'assigned'