Webhooks for status updates

Hello,

I’ve been having issues creating webhooks to track status updates for portfolios and for each project within a portfolio.

To troubleshoot this issue, I have created the webhooks keeping the parameters as broad as possible to capture any data. By doing this, I was able to obtain status updates for projects by:

{
            "filters": [
                {
                    "action": "changed",
                    "resource_type": "project",
                    "fields": [
                        "completed_at"
                    ]
                }
            ],
            "resource": project.asana_id,
            "target": "https://example.api.io/v1/projects/update/webhook"
        }

Prior to this, I had tried changing the resource to project_status as indicated in the error message:

Invalid Request: filters: [0]: resource_type: Must be one of {attachment, column_recipe, conversation, custom_field, custom_field_setting, enum_option, job, portfolio, portfolio_membership, project, project_membership, project_membership_recipe, project_recipe, project_status, project_template, project_template_configuration_membership, section, story, tag, task, team, team_membership, template_task_recipe, user, webhook, workspace, workspace_membership}

However, changing my project status would not trigger the webhook with these parameters no matter the action and it is also not listed in the documentation for resources and actions: Webhooks
Is there a better way to achieve this than watching the “completed_at” field as I have it structured currently?

As for tracking a status for a portfolio, I’m having no success whatsoever even when maintaining broad parameters. Following the documentation linked before:

{
            "filters": [
                {
                    "action": "added",
                    "resource_type": "portfolio",

                }
            ],
            "resource": portfolio.asana_id,
            "target": "https://example.api.io/v1/projects/update/webhook"
   }

Asana sends back this error:

Forbidden: Webhooks for larger scoped resources must have at least one filter and all filters must be in our whitelist.

Is there something I’m missing? I tried filtering on a field such as “current_status_update” but received the same error pertaining to a whitelist. I was able to resolve this error by using “project” for the resource_type instead and using the portfolio_id as the resource but nothing is triggering when updating the status for the portfolio. It has only triggered when adding/removing projects to the portfolio and changing the date.

Is there a better way for me to track status updates for projects than I’m currently doing and is there a way to track status updates for portfolios at all?

@Phil_Seeman is the web hook master, calling him for help!

Hi @Zach_Earl,

Unfortunately I haven’t really done much with webhooks at the project/portfolio level, so I don’t have any personal knowledge to impart. However, see this thread for someone who was able to figure out how to get project status updates via webhook:

Unfortunately, this was something I had already tried prior to making this post to get status updates at the project level, and the webhook would fire for other comments if I recall. Any suggestions on how to create one for status updates at the portfolio level?

Right - the solution provided in that other thread does involve getting all comments for a project, and using logic on your end to figure out which ones are status updates (he explains how that logic is done), I don’t know of any other way to get project status updates via the API.

I don’t think that’s going to be possible. You can’t use the same logic for portfolios as he did for projects because whereas projects have a changed event, portfolios only have added and deleted.