Update the Custom Field using API

Hi Asana Team,

I have one requirement where i need to update the one text custom field with some specific value automatically whenever task has been created.

The Value of that field will be generated in specific way like ( value of another custom field value + Current Year + Last 6 digits of Asana Code of task ) and need to be updated after creation of that task.



Hi @Sachin_Subhash_Dhama,

You would use the “Update Task” API endpoint to accomplish that:

Read up on it in the docs, and let us know if you have specific questions.

Hi @Phil_Seeman
Thanks for the reply.

How do I run this API when task is being created?
Is there any listeners where I can get the task id which i can use in rest api?
Also I want to get the custom field value of created task which i can use as a parameter for rest api How do i get it?

Is there any plugin where i can write this code logic?


Yes - you have two options.

You can use the Events API - how this works is you call it periodically and it will send you all of the task activity which has occurred since the last time you called it.

Or you can use webhooks - how this works is you register to receive a webhook event each time task activity occurs.

You can read about them both in the API docs and decide which one is more appropriate for your situation.

In both cases, yes, the events include the task ID in the data that comes back from Asana. You then use that ID to read the full task record, which will include the custom field values that exist on that task.

There aren’t any plugins per se, you’ll need to write your own code. But if you’re writing in a language for which Asana has a client library available, I’d recommend you use that so as to save yourself from a bunch of code writing.