[ASK] Example of webhook create of moving task between sections in a project

Hi there,
I succesffuly created a webhook to target a task when moving between sections in a project will trigger a webhook.
But, it seems didn’t worked. Below is my body data when creating the webhook. Is this wrong?
{

  "data": {

    "filters": [

      {

        "action": "changed",

        "fields": [

          "section"

        ],

        "resource_subtype": "memberships",

        "resource_type": "task"

      }

    ],

    "resource": "123412412", -> this is resource Project

    "target": "https://example.com/12345"

  }

}

I tried this with no success

{

  "data": {

    "filters": [

      {

        "action": "added",

        "resource_type": "section"

      }

    ],

    "resource": "123412412", -> this is resource Project

    "target": "https://example.com/12345"

  }

}

Hi @Erick4,

We’re still hoping at some point to get a definitive list of what is and is not supported in terms of webhook filtering. (@Ross_Grambo hint hint :slightly_smiling_face:)

But section is not a field on a task object, so I’m sure that wouldn’t work as a filter. A task’s section is contained in its memberships field, so you could try filtering on that, although I’m a bit skeptical that will work as a filter, since it’s an array.

1 Like

Hey Phil!
I’m stumbling across the same question. Is there a way to set up a webhook that triggers every time a task changes its section in a project? If not, what would be the best way to monitor section changes on tasks?
Best
Dominik

1 Like

Hi Phil,
I have no luck filtering memberships. Even with memberships.sections didn’t work.
Then I found another way, I can trigger webhook when a task move section in a project like this:
{
“data”: {
“filters”: [
{
“action”: “added”,
“resource_type”: “story”,
“resource_subtype”: “section_changed”
}
],
“resource”: “123412412”, → this is resource Project
“target”: “https://example.com/12345
}
}

It will sent event with the GID of users, story, and task. From that, I just get the Story detail for histories from where the task originally move from.
Hope this helps.

5 Likes

It works! Saved me tons of hours.
Thank you so much.

2 Likes

:clap: Excellent find, @Erick4, thanks for letting us know!

1 Like