Webhook for "task moved into project"

I was checking the available webhooks and was wondering if it is possible to get the event of a task being moved into another project?

Or maybe there is already a webhook you could use for that?

Hi @julian_vierless, yes, you can use the task updated webhook and check for the project id in the list of changes. Webhooks — awork API | Documentation
Hope this helps!

Hi @sebastian, thanks for the answer!

I tried it and it seems to work. The only challenge I have now is to distinguish if the trigger was a task status update or moving the task into a new project. Because if I try moving the task it is still marked as "eventType": "task_status_changed" which makes it hard to know what really happened.

How would I go about that?

The best option is to check the changes array and see if the change you’re expecting is in there, otherwise discard the event.

Yes I was thinking that too. But in there is also just the task status id (old & new).

My idea now is to do an API call, check the project id that the task status id belongs to and compare if they are the same. Do you think this is the easiest way to do that?

This is what I get:

I do get a change event that has this list of changes:

 "changes": [
        {
            "property": "ProjectId",
            "old": "789958bd-907e-ec11-a506-38563d686c6e",
            "new": "ad0a8f86-34f6-ec11-b47a-38563d6e63a9"
        },
        {
            "property": "UpdatedBy",
            "old": "b413d3a0-93fc-e911-add2-00155d3138d8",
            "new": "5a317017-67b9-e711-80c2-0017fa10039b"
        },
        {
            "property": "UpdatedOn",
            "old": "10/01/2024 10:43:25",
            "new": "02/03/2025 15:34:57"
        }
    ]

However, it is possible that we send multiple change events as not all changes are applied in one operation, as changing a project is more involved and has a lot of additional effects such as changing the task status etc.

I updated the project again and this is what I am getting. So for me there is no ProjectId object for some reason. This is my traceId: 3b42a9eecdac27818a52a7d97a1a4bad

But is this the only event you are receiving? You will likely get 3-5 events in this case.

Ah, I just saw that you are only using the task_status_changed. This will not include the project id in the changes. So you need to configure the webhook for task_changed.

I updated the event type to „task updated“ and now this is my response when moving a task into a new project. Trace ID: d22393f60e173c23525c1e0469e89774

Edit:
I see that my webhook was triggered 4 times by that single action. So I guess I need to filter it in a way that it only continues my Make scenario if the changes array contains TaskStatusId or projectId. If not, I don’t need it to continue.

It would be awesome if you could add „Task moved to project“ as separate webhook like the „Task status changed“. This way this would be much easier and reduces operations as well (only 1 trigger instead of 4).

Thanks, I’ll add it as feedback for our next iteration of the webhooks.