How to Update Custom Fields on an Asana Task

How to Update Custom Fields on an Asana Task

Show first post

30 replies

I just wanted to report back that this worked perfectly. Thank you!

Thank you. I will give this a shot and let you know how it goes.

Userlevel 6
Badge +1

Hi @jonathankmg - thanks for giving this a try!

I think you’re really close - and the issue here is the format of the JSON. 

Specifically this last comma after the ID of the Dropdown Option.

If we have multiple lines in the JSON we’d separate them with commas - but the last line will always not have a comma.

Notice in my screenshot here there is no comma on the last line only.

If you change the request to this format below (without the comma) - it should work.

{
"data": {
"custom_fields":{
"ID OF CUSTOM FIELD":"ID OF THE DROPDOWN OPTION"
}
}
}

Please let us know how it goes!

Userlevel 7
Badge +11

Hey @jonathankmg!

Awesome to see you trying to put this into practice 🙂 Let’s see if @Jared can chime in here with some pointers.

I wanted to have Zapier set a custom field to a specific dropdown value for each task created that has a specific tag. I use a filter after the task is create to say “If the newly created task has “design” as a tag.. keep going”. I then wanted it to set the dropdown field to a specific value.. the same value for each task created. I followed these instructions but since it was a dropdown, I was a bit uncertain on the syntax.

 

Here is what I put ::::::::::

Method: PUT

URL: https://app.asana.com/api/1.0/tasks/120….(TASKID)

Data Pass-Through? (blank)

Data:

    {

          "data": {

             "custom_fields":{

                 "ID OF CUSTOM FIELD":"ID OF THE DROPDOWN OPTION",

                }

            }

      }

 

Unflatten: yes

Basic Auth: (blank)

Headers

   Content-type: application/json

   Authorization: Bearer 1/118….

 

I got the error “ Could not parse request data, invalid JSON”. I’m not sure what I’m missing.

Reply