---
availability: INSTALLABLE
description: A plugin that allows you to delete a task in asana.
installation_asset_uuid: 4c1229ef-7fff-466f-9598-3efca8876d66
name: Delete a Task
purple_chat_link: https://marketplace.moveworks.com/purple-chat?conversation=%7B%22messages%22%3A%5B%7B%22role%22%3A%22user%22%2C%22parts%22%3A%5B%7B%22richText%22%3A%22Delete+a+task+in+Asana.%22%7D%5D%7D%2C%7B%22role%22%3A%22assistant%22%2C%22parts%22%3A%5B%7B%22reasoningSteps%22%3A%5B%7B%22status%22%3A%22success%22%2C%22richText%22%3A%22Searching+for+relevant+Asana+workspaces...%22%7D%2C%7B%22status%22%3A%22success%22%2C%22richText%22%3A%22Retrieving+teams+you+are+a+part+of+in+Asana...%22%7D%5D%7D%2C%7B%22richText%22%3A%22%3Cp+xmlns%3D%5C%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%5C%22%3EWhich+team+is+the+task+in%3F+Please+select+from+the+following%3A%3C%2Fp%3E%3Col+xmlns%3D%5C%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%5C%22%3E%3Cli%3E%3Cb%3EMarketing+Team%3C%2Fb%3E%3C%2Fli%3E%3Cli%3E%3Cb%3EProduct+Team%3C%2Fb%3E%3C%2Fli%3E%3Cli%3E%3Cb%3ESales+Team%3C%2Fb%3E%3C%2Fli%3E%3C%2Fol%3E%22%7D%5D%7D%2C%7B%22role%22%3A%22user%22%2C%22parts%22%3A%5B%7B%22richText%22%3A%221%22%7D%5D%7D%2C%7B%22role%22%3A%22assistant%22%2C%22parts%22%3A%5B%7B%22reasoningSteps%22%3A%5B%7B%22status%22%3A%22success%22%2C%22richText%22%3A%22Retrieving+projects+for+the+%3Cb+xmlns%3D%5C%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%5C%22%3EMarketing+Team%3C%2Fb%3E...%22%7D%5D%7D%2C%7B%22richText%22%3A%22%3Cp+xmlns%3D%5C%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%5C%22%3EOkay%2C+which+project+is+the+task+in+for+the+%3Cb%3EMarketing+Team%3C%2Fb%3E%3F+Please+select+from+the+following%3A%3C%2Fp%3E%3Col+xmlns%3D%5C%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%5C%22%3E%3Cli%3E%3Cb%3EQ3+Marketing+Campaign%3C%2Fb%3E%3C%2Fli%3E%3Cli%3E%3Cb%3EWebsite+Redesign%3C%2Fb%3E%3C%2Fli%3E%3Cli%3E%3Cb%3EContent+Strategy+2024%3C%2Fb%3E%3C%2Fli%3E%3C%2Fol%3E%22%7D%5D%7D%2C%7B%22role%22%3A%22user%22%2C%22parts%22%3A%5B%7B%22richText%22%3A%222%22%7D%5D%7D%2C%7B%22role%22%3A%22assistant%22%2C%22parts%22%3A%5B%7B%22reasoningSteps%22%3A%5B%7B%22status%22%3A%22success%22%2C%22richText%22%3A%22Retrieving+tasks+from+the+%3Cb+xmlns%3D%5C%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%5C%22%3EWebsite+Redesign%3C%2Fb%3E+project...%22%7D%5D%7D%2C%7B%22richText%22%3A%22%3Cp+xmlns%3D%5C%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%5C%22%3EHere+are+the+tasks+in+the+%3Cb%3EWebsite+Redesign%3C%2Fb%3E+project.+Which+one+would+you+like+to+delete%3F%3C%2Fp%3E%3Col+xmlns%3D%5C%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%5C%22%3E%3Cli%3E%3Cb%3EDesign+UI%2FUX+Mockups%3C%2Fb%3E+%28Due%3A+2024-07-15%29%3C%2Fli%3E%3Cli%3E%3Cb%3EDevelop+Frontend+Components%3C%2Fb%3E+%28Due%3A+2024-07-20%29%3C%2Fli%3E%3Cli%3E%3Cb%3EWrite+Homepage+Copy%3C%2Fb%3E+%28Due%3A+2024-07-18%29%3C%2Fli%3E%3Cli%3E%3Cb%3ESEO+Audit%3C%2Fb%3E+%28Due%3A+2024-07-22%29%3C%2Fli%3E%3C%2Fol%3E%22%7D%5D%7D%2C%7B%22role%22%3A%22user%22%2C%22parts%22%3A%5B%7B%22richText%22%3A%223%22%7D%5D%7D%2C%7B%22role%22%3A%22assistant%22%2C%22parts%22%3A%5B%7B%22richText%22%3A%22%3Cp+xmlns%3D%5C%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%5C%22%3EYou+are+about+to+delete+the+task+%3Cb%3EWrite+Homepage+Copy%3C%2Fb%3E+from+the+%3Cb%3EWebsite+Redesign%3C%2Fb%3E+project+within+the+%3Cb%3EMarketing+Team%3C%2Fb%3E.%3C%2Fp%3E%3Cp+xmlns%3D%5C%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%5C%22%3E%3Cb%3EAre+you+sure+you+want+to+proceed%3F%3C%2Fb%3E%3C%2Fp%3E%22%7D%2C%7B%22buttons%22%3A%5B%7B%22buttonText%22%3A%22Yes%2C+delete+it%22%2C%22style%22%3A%22filled%22%7D%2C%7B%22buttonText%22%3A%22No%2C+cancel%22%2C%22style%22%3A%22outlined%22%7D%5D%7D%5D%7D%2C%7B%22role%22%3A%22user%22%2C%22parts%22%3A%5B%7B%22richText%22%3A%22Yes%2C+delete+it%22%7D%5D%7D%2C%7B%22role%22%3A%22assistant%22%2C%22parts%22%3A%5B%7B%22reasoningSteps%22%3A%5B%7B%22status%22%3A%22success%22%2C%22richText%22%3A%22Initiating+deletion+of+the+task+in+Asana...%22%7D%5D%7D%2C%7B%22richText%22%3A%22%3Cp+xmlns%3D%5C%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%5C%22%3EThe+task+has+been+successfully+deleted.%3C%2Fp%3E%22%7D%2C%7B%22citations%22%3A%5B%7B%22connectorName%22%3A%22asana%22%2C%22citationTitle%22%3A%22Write+Homepage+Copy%22%7D%5D%7D%5D%7D%5D%7D
solution_tags:
- Productivity
- Project Management
systems:
- asana
---

# Introduction

The **Asana Delete a Task** plugin allows users to delete a specific task in a project directly through the Moveworks AI Assistant. With this plugin, users can quickly navigate through workspaces, teams, and projects to view task details such as due dates, assignees, and statuses — and then remove tasks that are no longer needed, without leaving their workflow.

This guide will help you install and configure the plugin in **Agent Studio** within minutes.

# Prerequisites

- Access to Agent Studio
- [Asana Connector](https://developer.moveworks.com/creator-studio/resources/connector?id=asana) built in Creator Studio (follow the Asana Authentication guide to create your connector)

# What are we building?

## Agent Design

This [purple chat](https://marketplace.moveworks.com/purple-chat?conversation=%7B%22messages%22%3A%5B%7B%22role%22%3A%22user%22%2C%22parts%22%3A%5B%7B%22richText%22%3A%22Delete+a+task+in+Asana.%22%7D%5D%7D%2C%7B%22role%22%3A%22assistant%22%2C%22parts%22%3A%5B%7B%22reasoningSteps%22%3A%5B%7B%22status%22%3A%22success%22%2C%22richText%22%3A%22Searching+for+relevant+Asana+workspaces...%22%7D%2C%7B%22status%22%3A%22success%22%2C%22richText%22%3A%22Retrieving+teams+you+are+a+part+of+in+Asana...%22%7D%5D%7D%2C%7B%22richText%22%3A%22%3Cp+xmlns%3D%5C%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%5C%22%3EWhich+team+is+the+task+in%3F+Please+select+from+the+following%3A%3C%2Fp%3E%3Col+xmlns%3D%5C%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%5C%22%3E%3Cli%3E%3Cb%3EMarketing+Team%3C%2Fb%3E%3C%2Fli%3E%3Cli%3E%3Cb%3EProduct+Team%3C%2Fb%3E%3C%2Fli%3E%3Cli%3E%3Cb%3ESales+Team%3C%2Fb%3E%3C%2Fli%3E%3C%2Fol%3E%22%7D%5D%7D%2C%7B%22role%22%3A%22user%22%2C%22parts%22%3A%5B%7B%22richText%22%3A%221%22%7D%5D%7D%2C%7B%22role%22%3A%22assistant%22%2C%22parts%22%3A%5B%7B%22reasoningSteps%22%3A%5B%7B%22status%22%3A%22success%22%2C%22richText%22%3A%22Retrieving+projects+for+the+%3Cb+xmlns%3D%5C%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%5C%22%3EMarketing+Team%3C%2Fb%3E...%22%7D%5D%7D%2C%7B%22richText%22%3A%22%3Cp+xmlns%3D%5C%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%5C%22%3EOkay%2C+which+project+is+the+task+in+for+the+%3Cb%3EMarketing+Team%3C%2Fb%3E%3F+Please+select+from+the+following%3A%3C%2Fp%3E%3Col+xmlns%3D%5C%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%5C%22%3E%3Cli%3E%3Cb%3EQ3+Marketing+Campaign%3C%2Fb%3E%3C%2Fli%3E%3Cli%3E%3Cb%3EWebsite+Redesign%3C%2Fb%3E%3C%2Fli%3E%3Cli%3E%3Cb%3EContent+Strategy+2024%3C%2Fb%3E%3C%2Fli%3E%3C%2Fol%3E%22%7D%5D%7D%2C%7B%22role%22%3A%22user%22%2C%22parts%22%3A%5B%7B%22richText%22%3A%222%22%7D%5D%7D%2C%7B%22role%22%3A%22assistant%22%2C%22parts%22%3A%5B%7B%22reasoningSteps%22%3A%5B%7B%22status%22%3A%22success%22%2C%22richText%22%3A%22Retrieving+tasks+from+the+%3Cb+xmlns%3D%5C%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%5C%22%3EWebsite+Redesign%3C%2Fb%3E+project...%22%7D%5D%7D%2C%7B%22richText%22%3A%22%3Cp+xmlns%3D%5C%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%5C%22%3EHere+are+the+tasks+in+the+%3Cb%3EWebsite+Redesign%3C%2Fb%3E+project.+Which+one+would+you+like+to+delete%3F%3C%2Fp%3E%3Col+xmlns%3D%5C%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%5C%22%3E%3Cli%3E%3Cb%3EDesign+UI%2FUX+Mockups%3C%2Fb%3E+%28Due%3A+2024-07-15%29%3C%2Fli%3E%3Cli%3E%3Cb%3EDevelop+Frontend+Components%3C%2Fb%3E+%28Due%3A+2024-07-20%29%3C%2Fli%3E%3Cli%3E%3Cb%3EWrite+Homepage+Copy%3C%2Fb%3E+%28Due%3A+2024-07-18%29%3C%2Fli%3E%3Cli%3E%3Cb%3ESEO+Audit%3C%2Fb%3E+%28Due%3A+2024-07-22%29%3C%2Fli%3E%3C%2Fol%3E%22%7D%5D%7D%2C%7B%22role%22%3A%22user%22%2C%22parts%22%3A%5B%7B%22richText%22%3A%223%22%7D%5D%7D%2C%7B%22role%22%3A%22assistant%22%2C%22parts%22%3A%5B%7B%22richText%22%3A%22%3Cp+xmlns%3D%5C%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%5C%22%3EYou+are+about+to+delete+the+task+%3Cb%3EWrite+Homepage+Copy%3C%2Fb%3E+from+the+%3Cb%3EWebsite+Redesign%3C%2Fb%3E+project+within+the+%3Cb%3EMarketing+Team%3C%2Fb%3E.%3C%2Fp%3E%3Cp+xmlns%3D%5C%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%5C%22%3E%3Cb%3EAre+you+sure+you+want+to+proceed%3F%3C%2Fb%3E%3C%2Fp%3E%22%7D%2C%7B%22buttons%22%3A%5B%7B%22buttonText%22%3A%22Yes%2C+delete+it%22%2C%22style%22%3A%22filled%22%7D%2C%7B%22buttonText%22%3A%22No%2C+cancel%22%2C%22style%22%3A%22outlined%22%7D%5D%7D%5D%7D%2C%7B%22role%22%3A%22user%22%2C%22parts%22%3A%5B%7B%22richText%22%3A%22Yes%2C+delete+it%22%7D%5D%7D%2C%7B%22role%22%3A%22assistant%22%2C%22parts%22%3A%5B%7B%22reasoningSteps%22%3A%5B%7B%22status%22%3A%22success%22%2C%22richText%22%3A%22Initiating+deletion+of+the+task+in+Asana...%22%7D%5D%7D%2C%7B%22richText%22%3A%22%3Cp+xmlns%3D%5C%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%5C%22%3EThe+task+has+been+successfully+deleted.%3C%2Fp%3E%22%7D%2C%7B%22citations%22%3A%5B%7B%22connectorName%22%3A%22asana%22%2C%22citationTitle%22%3A%22Write+Homepage+Copy%22%7D%5D%7D%5D%7D%5D%7D) shows the experience we are going to build.

# Installation Steps

While you can create a connector during plugin installation, we recommend creating a connector in **Agent Studio** beforehand to streamline the process. Please follow our **Asana Connector Guide** to do so. Once completed, follow our plugin installation documentation to install the **Asana Delete a Task** plugin in minutes.

For **Asana – Delete a Task**, you will also need to add the following permissions:

**Required Scopes:**

- `workspaces:read` – Allows reading available workspaces
- `teams:read` – Allows reading teams in a workspace
- `projects:read` – Allows reading project details
- `tasks:read` – Allows reading task details from a project
- `tasks:write` – Allows modifying or deleting tasks
- `tasks:delete` - Allows deletion of tasks within a project
- **Assign Necessary Permissions** – Ensure that the admin account used to generate the Personal Access Token for your Asana connector is explicitly added to all Asana Workspaces where the plugin will operate.

> Note: Users can only delete tasks for projects that belong to teams they are part of.
> 

After configuring the connector, refer to our installation documentation for more details on completing the setup.

# Appendix

### **API #1: Get Workspaces**

The [Get Workspaces API](https://developers.asana.com/reference/getworkspaces) returns all workspaces available in the scope of the integration.

```bash
curl --request GET \
     --url https://app.asana.com/api/1.0/workspaces \
     --header 'accept: application/json'
     --header 'authorization: Bearer {{personal_access_token}}'
```

**Response:** Returns all workspaces the authenticated integration has access to. No filters required.

### **API #2: Get Teams for a User**

The [Get Teams for a User API](https://developers.asana.com/reference/getteamsforuser) retrieves the list of teams that a given user belongs to in a specific workspace.

```bash
curl --request GET \
     --url https://app.asana.com/api/1.0/users/{{user_gid}}/teams?workspace={{workspace_gid}} \
     --header 'accept: application/json'
     --header 'authorization: Bearer {{personal_access_token}}'
```

**Path Parameters:**

- `user_gid` (string) – The GID of the user.

**Query Parameters:**

- `workspace` (string) – The GID of the workspace to scope the teams.

### **API #3: Get Projects in a Workspace/Team**

The [Get Projects API](https://developers.asana.com/reference/getprojectsforteam) retrieves the list of projects for a given team in a workspace.

```bash
curl --request GET \
     --url 'https://app.asana.com/api/1.0/projects?workspace={{workspace_gid}}&team={{team_gid}}' \
     --header 'accept: application/json'
     --header 'authorization: Bearer {{personal_access_token}}'
```

**Query Parameters:**

- `workspace` (string) – The GID of the workspace.
- `team` (string) – The GID of the team within the workspace.

### **API #4: Get Tasks from a Project**

The [Get Tasks from a Project](https://developers.asana.com/reference/gettasksforproject) API retrieves a list of tasks within a specific Asana project.

```bash
curl --request GET \
     --url 'https://app.asana.com/api/1.0/projects/{{project_gid}}/tasks?opt_fields=gid,name,notes,assignee.gid,assignee.name,assignee.email,completed,completed_at,created_at,modified_at,due_on,start_on,projects.name,tags.name,followers.name,workspace.name,dependencies.name,dependents.name,subtasks.name,subtasks.completed,subtasks.assignee.name,subtasks.due_on,subtasks.notes' \
     --header 'accept: application/json'
     --header 'authorization: Bearer {{personal_access_token}}'
```

**Path Parameters:**

- `project_gid` (string) – The GID of the project whose tasks you want to retrieve.

**Query Parameters:**

- `opt_fields` (string) – Comma-separated list of fields to include in the response, including task metadata and subtasks.

### **API #5: Delete a Task**

The [Delete a Task](https://developers.asana.com/reference/deletetask) API deletes a task in a project.

```bash
curl --request DELETE \
     --url https://app.asana.com/api/1.0/tasks/{{task_gid}} \
     --header 'accept: application/json' \
     --header 'authorization: Bearer {{personal_access_token}}'
```

**Path Parameters:**

- `task_gid` (string) – The GID of the task you want to delete.