# Asana

> Create, update, and manage tasks, subtasks, comments, and followers in Asana.

App · Project Management · 7 actions. Web page: https://docs.lodol.com/docs/integrations/asana

## Actions

### Add a comment

Add a comment (story) to an Asana task.

**Inputs**

- Task ID (`task_gid`, text, required): The ID (gid) of the task to comment on.
- Comment (`text`, text, required): The plain-text comment to add.

**Outputs**: Asana story (comment) object.

- `created_at` (text)
- `created_by` (object)
- `gid` (text): The comment's unique ID.
- `resource_subtype` (text)
- `text` (text)
- `type` (text)

**Example output**

```json
{
  "created_by": {
    "gid": "1200000000001",
    "name": "Alex Kim"
  },
  "gid": "1300000000001",
  "resource_subtype": "comment_added",
  "text": "Looks good, approved to proceed."
}
```

### Add followers

Add one or more followers to an Asana task. Followers get notified about changes to the task.

**Inputs**

- Task ID (`task_gid`, text, required): The ID (gid) of the task to add followers to.
- Followers (`followers`, text, required): Comma-separated list of users to add as followers. Each can be a user ID, an email, or the word 'me'.

**Outputs**: Asana task object.

- `assignee` (object)
- `completed` (true/false)
- `completed_at` (text)
- `created_at` (text)
- `due_at` (text)
- `due_on` (text)
- `followers` (list)
- `gid` (text): The task's unique ID.
- `modified_at` (text)
- `name` (text)
- `notes` (text)
- `num_subtasks` (number)
- `parent` (object)
- `permalink_url` (text)
- `projects` (list)
- `resource_subtype` (text)
- `start_on` (text)
- `workspace` (object)

**Example output**

```json
{
  "followers": [
    {
      "gid": "1200000000001",
      "name": "Alex Kim"
    },
    {
      "gid": "1200000000002",
      "name": "Jordan Lee"
    }
  ],
  "gid": "1201234567890",
  "name": "Review Q3 budget"
}
```

### Create a subtask

Create a subtask under an existing Asana task.

**Inputs**

- Parent task ID (`parent_task_gid`, text, required): The ID (gid) of the task the subtask belongs to.
- Subtask name (`name`, text, required): The title of the subtask.
- Description (`notes`, text): The subtask description / notes.
- Assignee (`assignee`, text): The user to assign the subtask to: a user ID, an email, or the word 'me'.
- Due date (`due_on`, date): The day the subtask is due, in YYYY-MM-DD format.

**Outputs**: Asana task object.

- `assignee` (object)
- `completed` (true/false)
- `completed_at` (text)
- `created_at` (text)
- `due_at` (text)
- `due_on` (text)
- `gid` (text): The task's unique ID.
- `modified_at` (text)
- `name` (text)
- `notes` (text)
- `num_subtasks` (number)
- `parent` (object)
- `permalink_url` (text)
- `projects` (list)
- `resource_subtype` (text)
- `start_on` (text)
- `workspace` (object)

**Example output**

```json
{
  "completed": false,
  "gid": "1209876543210",
  "name": "Collect stakeholder feedback",
  "parent": {
    "gid": "1201234567890",
    "name": "Review Q3 budget"
  },
  "permalink_url": "https://app.asana.com/0/0/1209876543210"
}
```

### Create a task

Create a new Asana task in a workspace, and optionally in one or more of its projects.

**Inputs**

- Task name (`name`, text, required): The title of the task, for example, Review Q3 budget.
- Workspace (`workspace`, text, required): The workspace to create the task in.
- Projects (`projects`, list): Projects to add the task to. Pick a workspace first to load its projects.
- Description (`notes`, text): The task description / notes.
- Assignee (`assignee`, text): The workspace member to assign the task to. Pick a workspace first to load its members.
- Due date (`due_on`, date): The day the task is due, in YYYY-MM-DD format.

**Outputs**: Asana task object.

- `assignee` (object)
- `completed` (true/false)
- `completed_at` (text)
- `created_at` (text)
- `due_at` (text)
- `due_on` (text)
- `gid` (text): The task's unique ID.
- `modified_at` (text)
- `name` (text)
- `notes` (text)
- `num_subtasks` (number)
- `parent` (object)
- `permalink_url` (text)
- `projects` (list)
- `resource_subtype` (text)
- `start_on` (text)
- `workspace` (object)

**Example output**

```json
{
  "completed": false,
  "due_on": "2024-06-15",
  "gid": "1201234567890",
  "name": "Review Q3 budget",
  "permalink_url": "https://app.asana.com/0/0/1201234567890"
}
```

### Delete a task

Delete an Asana task by its task ID.

**Inputs**

- Task ID (`task_gid`, text, required): The ID (gid) of the task to delete.

**Outputs**

- `deleted` (true/false)
- `gid` (text)

**Example output**

```json
{
  "deleted": true,
  "gid": "1201234567890"
}
```

### Get a task

Get the full details of an Asana task by its task ID.

**Inputs**

- Task ID (`task_gid`, text, required): The ID (gid) of the task to fetch.

**Outputs**: Asana task object.

- `assignee` (object)
- `completed` (true/false)
- `completed_at` (text)
- `created_at` (text)
- `due_at` (text)
- `due_on` (text)
- `gid` (text): The task's unique ID.
- `modified_at` (text)
- `name` (text)
- `notes` (text)
- `num_subtasks` (number)
- `parent` (object)
- `permalink_url` (text)
- `projects` (list)
- `resource_subtype` (text)
- `start_on` (text)
- `workspace` (object)

**Example output**

```json
{
  "assignee": {
    "gid": "1200000000001",
    "name": "Alex Kim"
  },
  "completed": false,
  "due_on": "2024-06-01",
  "gid": "1201234567890",
  "name": "Draft launch plan",
  "notes": "Outline the Q3 launch steps.",
  "permalink_url": "https://app.asana.com/0/0/1201234567890"
}
```

### Update a task

Update fields on an existing Asana task, such as its name, description, assignee, due date, or completion status.

**Inputs**

- Task ID (`task_gid`, text, required): The ID (gid) of the task to update.
- Task name (`name`, text): A new title for the task.
- Description (`notes`, text): A new description / notes for the task.
- Assignee (`assignee`, text): Reassign the task to a user ID, an email, or the word 'me'.
- Due date (`due_on`, date): A new due date, in YYYY-MM-DD format.
- Completed (`completed`, true/false): Set to true to mark the task complete, false to reopen it.

**Outputs**: Asana task object.

- `assignee` (object)
- `completed` (true/false)
- `completed_at` (text)
- `created_at` (text)
- `due_at` (text)
- `due_on` (text)
- `gid` (text): The task's unique ID.
- `modified_at` (text)
- `name` (text)
- `notes` (text)
- `num_subtasks` (number)
- `parent` (object)
- `permalink_url` (text)
- `projects` (list)
- `resource_subtype` (text)
- `start_on` (text)
- `workspace` (object)

**Example output**

```json
{
  "completed": true,
  "due_on": "2024-06-20",
  "gid": "1201234567890",
  "name": "Review Q3 budget (revised)",
  "permalink_url": "https://app.asana.com/0/0/1201234567890"
}
```
