# Using Zapier to complete/remove tasks

**URL:** <https://community.hubspot.com/t/using-zapier-to-complete-remove-tasks/112707>\
**Category:** Marketplace Apps\
**Tags:** integrations\
**Created:** [July 24, 2024, 7:25am UTC](https://community.hubspot.com/t/using-zapier-to-complete-remove-tasks/112707 "2024-07-24T07:25:35Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![DLiprini](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@DLiprini](https://community.hubspot.com/u/DLiprini)\
**Post date:** [July 24, 2024, 7:25am UTC](https://community.hubspot.com/t/using-zapier-to-complete-remove-tasks/112707/1 "2024-07-24T07:25:35Z")

</div>

Hi guys

I would like to remove hubspot tasks associated to a deal contact when the deal reaches a certage stage of the pipeline.

For example, when a deal is started it creates a follow up task (though Zapier) when the deal moves to won/lost stage I would like to remove(ideally) or complete all tasks associated to the deal.

Does anyone know how to do this?

---

<div class="post-metadata">

**Author:** ![janek](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/janek/32/101333_2.png) [@janek](https://community.hubspot.com/u/janek)\
**Post date:** [July 24, 2024, 7:02pm UTC](https://community.hubspot.com/t/using-zapier-to-complete-remove-tasks/112707/2 "2024-07-24T19:02:07Z")

</div>

Hi @DLiprini

Thanks for reaching out to the Community!

I wanted to invite our subject matter experts to this conversation to see if they have advice.

Hi @RSchweighart [@Shadab\_Khan](https://community.hubspot.com/t5/user/viewprofilepage/user-id/513582) [@HubSpot\_Corey](https://community.hubspot.com/t5/user/viewprofilepage/user-id/580930) - Do you have any insight or recommendations for @DLiprini?

Thank you!

Best,

Jan

---

<div class="post-metadata">

**Author:** ![RSchweighart](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/rschweighart/32/28924_2.png) [@RSchweighart](https://community.hubspot.com/u/RSchweighart)\
**Post date:** [July 24, 2024, 10:46pm UTC](https://community.hubspot.com/t/using-zapier-to-complete-remove-tasks/112707/3 "2024-07-24T22:46:36Z")

</div>

Hi @DLiprini,

Here’s what I would recommend using Zapier.

Trigger off the deal stage changing then maybe add a filter step for only the stages you want to allow through. You may need to grab the interal id of stages for the filter step like this:

 ![RSchweighart_0-1721860405398.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/4/d/4d825da60cb19852dc526bb799cb8161035cbfec.png)

Then, you’ll use the find associations step. Notice you’ll need to manually type in ‘task’.

 ![RSchweighart_1-1721860723428.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/8/9/8962cad7499cf505ad98f54fdf587c460fe0f46a.png)

You mentioned potentially having multiple tasks, so you’ll likely want to create a loop from text. This setup will still handle situations where only one task is associated with the deal. You also might want to have a filter step before the loop to ensure a task is actually associated with the deal.

 ![RSchweighart_2-1721860827574.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/7/2/72b5fad2edc9e5cc8d95d265422aba8bbfdb0f87.png)

Then, you’ll use an API request step to complete the tasks.

 ![RSchweighart_3-1721860934868.png](https://d2qpr2jzcazej7.cloudfront.net/original/2X/0/0a63adcdb22034fd88bd70eabaae5b12b589e7dc.png)

If you want to archive the task, set it up like this.

 ![RSchweighart_4-1721861027652.png](https://d2qpr2jzcazej7.cloudfront.net/original/2X/3/3a1c831d3d8b89c062926279616b7f2fbc2fa870.png)

Please let me know if anything is unclear from the screenshots.

All the Best,

_ **Ryan Schweighart** _

Whole Hart Impact, LLC

[whimpact.co](http://www.whimpact.co)

_I help businesses with HubSpot and Zapier._

---

<div class="post-metadata">

**Author:** ![DLiprini](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@DLiprini](https://community.hubspot.com/u/DLiprini)\
**Post date:** [August 27, 2024, 6:32am UTC](https://community.hubspot.com/t/using-zapier-to-complete-remove-tasks/112707/4 "2024-08-27T06:32:36Z")

</div>

Hi Ryan

Firstly, a massive thank you to you and the others that replied. I can’t believe there is a solution.

I found if there are more than one task assosiated to the deal, I get the following error. Do you know how I resolve it?

 ![Screenshot 2024-08-27 at 08.26.18.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/1/f/1fe7d4909979053bcb1921121c4afa13c477f55e.png)

Another question, you mentioned a filter to check whether the task is linked to the correct deal (we very often have multiple deals, in different stages linked to the same contact), how do I set that up?

Once again, huge thank you to all responses!

---

<div class="post-metadata">

**Author:** ![RSchweighart](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/rschweighart/32/28924_2.png) [@RSchweighart](https://community.hubspot.com/u/RSchweighart)\
**Post date:** [August 27, 2024, 6:24pm UTC](https://community.hubspot.com/t/using-zapier-to-complete-remove-tasks/112707/5 "2024-08-27T18:24:29Z")

</div>

Hi @DLiprini, you’re welcome, and I’m glad it’s been helpful.

You will need a [looping step](https://help.zapier.com/hc/en-us/articles/8496106701453-Loop-your-Zap-actions) to go through each one. Here’s an expansion of step 4 in my other screenshots.

 ![RSchweighart_0-1724782936260.png](https://d2qpr2jzcazej7.cloudfront.net/original/2X/6/62fca8806a4f3f5da1cafb2e570f26e1a547501c.png)

Here’s some more info [using filters in Zapier](https://help.zapier.com/hc/en-us/articles/8496276332557-Add-conditions-to-Zaps-with-filters#h_01HBG78VG30E8SQD8HK52QDJCA). What is the criteria you would use to filter?

---

<div class="post-metadata">

**Author:** ![DLiprini](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@DLiprini](https://community.hubspot.com/u/DLiprini)\
**Post date:** [August 29, 2024, 6:12am UTC](https://community.hubspot.com/t/using-zapier-to-complete-remove-tasks/112707/6 "2024-08-29T06:12:05Z")

</div>

Thanks Ryan

1. I have it set up as recommended and it works perfectly if there is only one task associated to the deal but if there are 2 or more tasks associated it gives an error. How do I solve that issue?

 ![Screenshot 2024-08-29 at 08.03.53.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/a/9/a9eb25c0fbd75ec83646e34a8b88aed5fc1180d9.png)

2. My filter question was in relation to ensuring it is removing tasks for that deal ONLY (as there are often multiple deals open for one customer), do I need to use a filter or will the current setup solve that issue?

Thanks again

---

<div class="post-metadata">

**Author:** ![RSchweighart](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/rschweighart/32/28924_2.png) [@RSchweighart](https://community.hubspot.com/u/RSchweighart)\
**Post date:** [August 29, 2024, 7:13pm UTC](https://community.hubspot.com/t/using-zapier-to-complete-remove-tasks/112707/7 "2024-08-29T19:13:01Z")

</div>

The loop step looks good. To confirm, does your step 5 map to the output from step 4 like this?

Step 3 will only work if there’s one deal being passed, so the find association step is finding all the tasks associated with the deal you have mapped in step 3, which is actually the deal that triggers the zap.

 ![RSchweighart_0-1724958668098.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/3/8/38b79fa47966f9122035e40cefcd74a704dcf28a.png)

Hope that gets you there. Let me know if there are any more questions.

---

<div class="post-metadata">

**Author:** ![DLiprini](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@DLiprini](https://community.hubspot.com/u/DLiprini)\
**Post date:** [September 2, 2024, 11:21am UTC](https://community.hubspot.com/t/using-zapier-to-complete-remove-tasks/112707/8 "2024-09-02T11:21:40Z")

</div>

Hi

I have set it up the same way as yours.

 ![Screenshot 2024-09-02 at 13.15.15.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/3/9/39ea7ce96f425024dd4eba76bac988e1837360b7.png)

Im still getting the same error when there are 2 tasks associated with the same deal.

 ![Screenshot 2024-09-02 at 13.15.28.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/9/d/9d41f7f87c2a317a683b2a04dd0cafb44ef63b44.png)

It seems the “,” delimiter between the two deal ids is causing the error?

 ![Screenshot 2024-09-02 at 13.21.10.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/2/7/276d73af1c3266a4c7b0c14832950bc868d4ea3d.png)

---

<div class="post-metadata">

**Author:** ![RSchweighart](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/rschweighart/32/28924_2.png) [@RSchweighart](https://community.hubspot.com/u/RSchweighart)\
**Post date:** [September 2, 2024, 2:24pm UTC](https://community.hubspot.com/t/using-zapier-to-complete-remove-tasks/112707/9 "2024-09-02T14:24:43Z")

</div>

That’s my bad, the error is due to incorrect mapping of step 4 in step 5. You will want to select the value ‘Task’ from step 4 in your case to map in step 5. It will be the first task id in the two you have listed. When the zap runs, it will loop through each task if there are multiple. I have mine labelled ‘Tasks’ but it looks like yours will be ‘Task’.

 ![RSchweighart_0-1725287003095.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/4/a/4aa55cab0a2a0191a23d80fe6812752e11d2e231.png)

Sorry about that.

---

<div class="post-metadata">

**Author:** ![DLiprini](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@DLiprini](https://community.hubspot.com/u/DLiprini)\
**Post date:** [September 2, 2024, 4:32pm UTC](https://community.hubspot.com/t/using-zapier-to-complete-remove-tasks/112707/10 "2024-09-02T16:32:07Z")

</div>

Thanks Ryan, you legend!

---

<div class="post-metadata">

**Author:** ![Shadab\_Khan](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/shadab_khan/32/12293_2.png) [@Shadab\_Khan](https://community.hubspot.com/u/Shadab_Khan)\
**Post date:** [July 25, 2024, 1:36am UTC](https://community.hubspot.com/t/using-zapier-to-complete-remove-tasks/112707/11 "2024-07-25T01:36:49Z")

</div>

@janek Thanks for the tag! I am pretty aligned with [RSchweighart](https://community.hubspot.com/t5/user/viewprofilepage/user-id/402487)’s solution here, The only thing I can think off is the governance & adoption part of this and ask questions:

- What types of tasks are left open when a deal is closed?
- Why are they open?

This will open up an opportunity with Reps to discuss and maybe remove / consolidate some tasks
