Webhook For Project Status Updates

We are looking to create an integration that will post project status updates to Slack. Any suggestions on the best way to go about this? Can you set up a webhook for project statuses, or do we need to look for the current_status on a project to be updated? And would we need to establish a separate webhook for each project?

2 Likes

Hi @anon99059457 and welcome to the forum!

No, there’s not a webhook available specifically for that.

Yes, that would be the way to go.

No - you can set up a webhook at the workspace or team level (whichever best fits your use case), and in that webhook, set a filter for “Project changed” (and maybe “Project added”, depending on your use case). That’ll cover status changes on all projects in that workspace/team with one webhook.

I’m using this filter but getting a 403 when attempting to set up this webhook. Any suggestions here?
{
“data”: {
“filters”: [
{
“action”: “changed”,
“fields”: [
“current_status”
],
“resource_type”: “project”
}
],
“resource”: “1190918529632195”,
“target”: “https://hooks.zapier.com/hooks/catch/2241477/olrfavu/”
}
}

additional info: this is an attempt at a team level webhook as the resource referenced is a team GID

There will also be a text error message that accompanies the 403 error - can you let us know what that is? It should provide a further clue as to the root cause.

{
“errors”: [
{
“error”: “invalid_filters_for_larger_scoped_webhooks”,
“message”: “Webhooks for larger scoped resources must have at least one filter and all filters must be in our whitelist.”,
“user_message”: “Webhooks for larger scoped resources must have at least one filter and all filters must be in our whitelist.”,
“help”: “For more information on API status codes and how to handle them, read the docs on errors: Errors”
}
]
}

@anon64907371,

Ah, good, that helps point us in some direction!

I have a couple of thoughts as to what the issue might be.

One thought is that current_status isn’t a supported fields filter (maybe because it’s actually a complex object, or for some other reason). Can you try removing that fields clause (I know, that would get you more changes than you want, but let’s at least figure out the source of your error first).

Does it help to remove that clause?

Pulling off the field filters allows for the successful creation of the webhook. Any idea of what field filters are part of the whitelist? It seems modifed_at isn’t supported either which might have helped narrow this down better to the use case we’re pursuing.

1 Like

Unfortunately there’s currently no published list.

@Ross_Grambo, is it possible to get a list of allowable fields for different webhook scopes? :slight_smile:

Sorry about this. I have a task to figure out and supply this list for the past few sprints but it keeps getting pushed back with other priorities… I’ll prioritize it next week.

1 Like

Did you get this working? If I subscribe to the team for projet updates, I do not get any notification via webhook when a new status is posted?

I’ve just been playing around with this as I found in portfolios there is no easy method to automatically move a project to a “Completed projects” portfolio or something etc. In order to do this, I was looking at creating a webhook to understand when a project in a particular portfolio is archived so that I can perform another follow up action in the background.

{
“data”: {
“resource”: “portfolio_gid”,
“filters”: [
{
“action”: “changed”,
“resource_type”: “project”,
“fields”: [
“archived”
]
}
],
“target”: “url”
}
}

The problem is that I’m also just getting the response:
{
“errors”: [
{
“error”: “invalid_filters_for_larger_scoped_webhooks”,
“message”: “Webhooks for larger scoped resources must have at least one filter and all filters must be in our whitelist.”,
“user_message”: “Webhooks for larger scoped resources must have at least one filter and all filters must be in our whitelist.”,
“help”: “For more information on API status codes and how to handle them, read the docs on errors: Errors”
}
]
}

Upon trying a random resource type it did give me the following helpful hint:

“message”: "filters: [0]: resource_type: Must be one of {attachment, conversation, custom_field, custom_field_setting, enum_option, job, portfolio, portfolio_membership, project, project_membership, project_status, section, story, tag, task, team, team_membership, user, webhook, workspace, workspace_membership}

But that doesn’t help me on the “fields” field and nothing I’ve tried seems to work. Any idea what’s causing this error?

Thanks!

We ended up designing a solution around the Events framework whereby we’ve used an integrations layer to periodically query the project resource on the events endpoint to look for status update posts. When you utilize this endpoint you’ll get any and all changes that occur on a project but if you filter only on responses with these critieria:

  • Action: Added
  • Type = story
  • Parent, resource type = project
  • Resource, Type = comment
    You can be fairly confident that you’re capturing project status posts. The only exception that I can see here is if your team is actively using project level conversations as project status posts utilize comments at the project level that aren’t associated to tasks.

It’s likely that it’s not a resource that you can establish a webhook subscription on. I got the same when I attempted it with the current_status resource. The “whitelist” resources that are available for webhook subscriptions is opaque and from my observation is discovered through trial and error.