# Webhook for "task moved into project"

**URL:** <https://community.awork.com/t/webhook-for-task-moved-into-project/2773>\
**Category:** Developer Forum\
**Created:** [2. Februar 2025 um 01:00 UTC](https://community.awork.com/t/webhook-for-task-moved-into-project/2773 "2025-02-02T01:00:03Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![julian\_vierless](https://dub1.discourse-cdn.com/flex013/user_avatar/community.awork.com/julian_vierless/32/627_2.png) [@julian\_vierless](https://community.awork.com/u/julian_vierless)\
**Post date:** [2. Februar 2025 um 01:00 UTC](https://community.awork.com/t/webhook-for-task-moved-into-project/2773/1 "2025-02-02T01:00:03Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Sebastian](https://dub1.discourse-cdn.com/flex013/user_avatar/community.awork.com/sebastian/32/1305_2.png) [@Sebastian](https://community.awork.com/u/Sebastian)\
**Post date:** [3. Februar 2025 um 07:30 UTC](https://community.awork.com/t/webhook-for-task-moved-into-project/2773/2 "2025-02-03T07:30:41Z")

</div>

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](https://developers.awork.com/webhooks)  
Hope this helps!

---

<div class="post-metadata">

**Author:** ![julian\_vierless](https://dub1.discourse-cdn.com/flex013/user_avatar/community.awork.com/julian_vierless/32/627_2.png) [@julian\_vierless](https://community.awork.com/u/julian_vierless)\
**Post date:** [3. Februar 2025 um 14:59 UTC](https://community.awork.com/t/webhook-for-task-moved-into-project/2773/3 "2025-02-03T14:59:04Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Sebastian](https://dub1.discourse-cdn.com/flex013/user_avatar/community.awork.com/sebastian/32/1305_2.png) [@Sebastian](https://community.awork.com/u/Sebastian)\
**Post date:** [3. Februar 2025 um 15:04 UTC](https://community.awork.com/t/webhook-for-task-moved-into-project/2773/4 "2025-02-03T15:04:51Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![julian\_vierless](https://dub1.discourse-cdn.com/flex013/user_avatar/community.awork.com/julian_vierless/32/627_2.png) [@julian\_vierless](https://community.awork.com/u/julian_vierless)\
**Post date:** [3. Februar 2025 um 15:06 UTC](https://community.awork.com/t/webhook-for-task-moved-into-project/2773/5 "2025-02-03T15:06:32Z")

</div>

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:**

 ![Bildschirmfoto 2025-02-03 um 16.07.01](https://europe1.discourse-cdn.com/flex013/uploads/awork1/original/1X/f2d7b04f65e1229e64ee15f5d7814d7f668eff67.png)

---

<div class="post-metadata">

**Author:** ![Sebastian](https://dub1.discourse-cdn.com/flex013/user_avatar/community.awork.com/sebastian/32/1305_2.png) [@Sebastian](https://community.awork.com/u/Sebastian)\
**Post date:** [3. Februar 2025 um 15:51 UTC](https://community.awork.com/t/webhook-for-task-moved-into-project/2773/6 "2025-02-03T15:51:09Z")

</div>

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

```auto
 "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.

---

<div class="post-metadata">

**Author:** ![julian\_vierless](https://dub1.discourse-cdn.com/flex013/user_avatar/community.awork.com/julian_vierless/32/627_2.png) [@julian\_vierless](https://community.awork.com/u/julian_vierless)\
**Post date:** [3. Februar 2025 um 15:55 UTC](https://community.awork.com/t/webhook-for-task-moved-into-project/2773/7 "2025-02-03T15:55:37Z")

</div>

![Bildschirmfoto 2025-02-03 um 16.54.40](https://europe1.discourse-cdn.com/flex013/uploads/awork1/original/1X/a5fffde110ab5eceac989adfba6858680521195e.png)

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

---

<div class="post-metadata">

**Author:** ![Sebastian](https://dub1.discourse-cdn.com/flex013/user_avatar/community.awork.com/sebastian/32/1305_2.png) [@Sebastian](https://community.awork.com/u/Sebastian)\
**Post date:** [3. Februar 2025 um 15:58 UTC](https://community.awork.com/t/webhook-for-task-moved-into-project/2773/8 "2025-02-03T15:58:24Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Sebastian](https://dub1.discourse-cdn.com/flex013/user_avatar/community.awork.com/sebastian/32/1305_2.png) [@Sebastian](https://community.awork.com/u/Sebastian)\
**Post date:** [3. Februar 2025 um 16:01 UTC](https://community.awork.com/t/webhook-for-task-moved-into-project/2773/9 "2025-02-03T16:01:30Z")

</div>

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`.

---

<div class="post-metadata">

**Author:** ![julian\_vierless](https://dub1.discourse-cdn.com/flex013/user_avatar/community.awork.com/julian_vierless/32/627_2.png) [@julian\_vierless](https://community.awork.com/u/julian_vierless)\
**Post date:** [3. Februar 2025 um 16:19 UTC](https://community.awork.com/t/webhook-for-task-moved-into-project/2773/10 "2025-02-03T16:19:20Z")

</div>

![Bildschirmfoto 2025-02-03 um 17.18.27](https://europe1.discourse-cdn.com/flex013/uploads/awork1/original/1X/6e3e615fccae0eb6b22cb2144fe049da3b10e22f.png)

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).

---

<div class="post-metadata">

**Author:** ![Sebastian](https://dub1.discourse-cdn.com/flex013/user_avatar/community.awork.com/sebastian/32/1305_2.png) [@Sebastian](https://community.awork.com/u/Sebastian)\
**Post date:** [4. Februar 2025 um 14:14 UTC](https://community.awork.com/t/webhook-for-task-moved-into-project/2773/11 "2025-02-04T14:14:33Z")

</div>

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