Can we create webhook on Workspace ? If yes then please share the body of that.

I want to create webhook on workspace to get all event notification for the newly created or updated projects as well as task.

Hi @Salesforce,

See this forum thread for the best information on creating webhooks for workspaces:
https://forum.asana.com/t/last-webhook-improvement-larger-scopes-team-workspace-webhooks-3-of-3/52575


You can’t get task-based events at the workspace level, only via project-level webhooks. See this part of the above-linked thread on that topic:

Because webhooks on workspaces would receive potentially an enormous volume of events, team and domain webhooks must have filters on them, and those filters must be from a set of whitelisted filters. We may expand this restriction in the future, but for stability we will not permit a full “firehose” of all events in the workspace. In particular, the filters we currently expect to allow at this level are:

  • Project created/deleted
  • Project added to/removed from team
  • User added to/removed from team
  • User added to/removed from workspace

If yes then please share the body of that.

Here is a sample request for creating a webhook for “project added” and “project removed” events:

POST /webhooks

{
  "data": {
    "resource": "<workspace or team GID>",
    "target": "<target URL>",
    "filters": [
      {
        "resource_type": "project",
        "action": "added",
      },
      {
        "resource_type": "project",
        "action": "removed",
      }
    ]
  }
}
1 Like

Thanks for the response @Phil_Seeman . But when I am deleted/removed the project I’ll not get any response but once I created/added new project then its work fine. I couldn’t fine the issue. I followed the same body format that you sent above and also webhook created successfully.