Register webhook which returns name of the task


I register webhook on the project level and I get all the calls like task added.

Now I would like to get the name of the task in that call, so I deleted the old webhook and try to establish new one with the ?opt_fields=name parameter, which is allowed according to the documentation. Unfortunately nothing changes - I still do not get the name provided in the callback from asana when I add the task.

Is the ?opt_fields parameter supported when I create new webhook? Could you please provide me the example how to use it to get the task’s name in the callback?

Hi @Apenceher,

No, you can’t use opt_fields with a webhook, nor can you get the task name returned in the webhook message.

As it says in the API docs:

Note that events are “skinny” and contain only some basic details of the change, not the whole resource. We expect integrations to make additional calls to the API to retrieve the latest state from Asana.

In other words, you’ll need to take the task gid you get from the webhook and call the Get a task endpoint to obtain the task’s name.

Thank you Phil!

I saw that doc, but also I saw that in Asana in Parameters, when I click “Show Common Parameters” I get ?opt_fields so I decided to give it a try :slight_smile: