Need Clarity on Setting up a Webhook

Please read this before posting

  • If you received an error from the API that you’re looking for help with, please include the error in your post and be descriptive of the requests you made that received the errors. To be clear, we need the error in the JSON response from the API, not the error your code raised.
  • Do not share any API credentials. Please check that the code you’re pasting into the post does not contain any real OAuth tokens or personal access tokens. If you have exposed credentials, you should revoke them immediately.

Hello Asana;

I’m having a hard time setting up a webhook to subscribe in events when a task has changed tags or anything on that matter.

I followed the tutorial in your documentation but I keep getting an error message, “You should specify one of workspace”

I tried this first copying the tutorial video, but with no success:

I also tried other variations like this as seen in some posts in the forum, still with no success:

{
    "data" : {
        "resource": "1137xxxxxxxx", // workspace resource gid
        "target": "https://hooks.zapier.com/hooks/catch/-------/-----/"
    }
}
{
    "resource": "1137xxxxxxxx", // workspace resource gid
    "target": "https://hooks.zapier.com/hooks/catch/-------/-----/"
}

Am I missing something?
Please advise. Thanks!

Hi @Michael_Cloyd_Lazaro and welcome to the forum,

Unfortunately that error message is a bit misleading and no so helpful in this case.

Asana does not permit setting webhooks to return task changes at the workspace level, only at the project level. To obtain task change events, you have to establish a webhook for each project you want to monitor. (The reason for this limitation is that a webhook for all task changes in a large workspace at the workspace level could result in a firehose of events that could overwhelm both the Asana sending side and your receiving side.)

At the workspace level, you can set webhooks to obtain change events on higher-level objects such as projects and teams, but again not tasks.

So in your case, the resource should be a project gid.