# Asana

{% hint style="info" %}
The following documentation is for **Asana v1.0.6** *(BDK)*.
{% endhint %}

## Overview

Asana is a leading project management and team collaboration platform that helps organize work and track progress. This integration allows you to automate task creation, project updates, and team notifications across your workflows. Streamline project coordination and improve team productivity with automated Asana interactions.

## Prerequisites

### 1. Required Books

The following Book(s) need to be added to your agent so it can learn and understand the automation procedures defined within them:

* **Asana**

#### How to Add the Book(s)

1. Go to **Books** → **All Books**.
2. Search for the name of the book and click on it.
3. Click on <kbd>**Install**</kbd> or <kbd>**Add Connection**</kbd> to add the book to your agent.
4. If adding a connection, you'll be prompted for [**connectivity**](#connectivity) details.

## Connectivity

This section outlines the available methods for connecting to the Book, along with the required configuration details for each.

### Connect using Api Key

Authenticate with API KEY.

| Label   | Description   | Type        |
| ------- | ------------- | ----------- |
| Api Key | Asana API Key | `sensitive` |

## Procedures

### to create a (task) in a project

Create a task in a project.

**Input Concepts**

| Concept                     | Description                                                                | Type            | Required | Default Value |
| --------------------------- | -------------------------------------------------------------------------- | --------------- | -------- | ------------- |
| [`project`](#asana-project) | The project in which to create the task.                                   | `asana project` | Yes      | (no default)  |
| [`task`](#asana-task)       | A Task object, used for its 'name' and optionally 'html\_notes' attribute. | `asana task`    | Yes      | (no default)  |

**Output Concepts**

| Concept               | Description                                    | Type         |
| --------------------- | ---------------------------------------------- | ------------ |
| [`task`](#asana-task) | The newly created task as returned by the API. | `asana task` |

**Examples**

```generic
create a json
use the above as the task
set the task's "name" to "Write documentation"
>>>
get some projects from asana
create the task in the first project
```

### to delete a task

Delete a task in Asana.

**Input Concepts**

| Concept               | Description                                    | Type         | Required | Default Value |
| --------------------- | ---------------------------------------------- | ------------ | -------- | ------------- |
| [`task`](#asana-task) | The task to be deleted. Must have a valid GID. | `asana task` | Yes      | (no default)  |

**Examples**

```generic
create a json
use the above as the task
set the task's "name" to "Write documentation"
>>>
get some projects from asana
create the task in the first project
delete the task
```

### to get some (project's tasks)

Get tasks from a project.

**Input Concepts**

| Concept                     | Description                   | Type            | Required | Default Value |
| --------------------------- | ----------------------------- | --------------- | -------- | ------------- |
| [`project`](#asana-project) | The project to get tasks from | `asana project` | Yes      | (no default)  |

**Output Concepts**

| Concept                          | Description                    | Type         |
| -------------------------------- | ------------------------------ | ------------ |
| [`project's tasks`](#asana-task) | A list of tasks in the project | `asana task` |

**Examples**

```generic
get some projects from asana
use the first project as my project
get my project's tasks
```

### to get some projects from *asana*

Get projects from Asana.

**Output Concepts**

| Concept                    | Description        | Type            |
| -------------------------- | ------------------ | --------------- |
| [`answer`](#asana-project) | A list of projects | `asana project` |

**Examples**

```generic
get some projects from asana
```

## Concepts

### Asana project

A project in Asana.

| Field Name      | Description                                        | Type   |
| --------------- | -------------------------------------------------- | ------ |
| `gid`           | The global ID of the project                       | `text` |
| `name`          | The name of the project                            | `text` |
| `resource_type` | The resource type of the project (e.g., "project") | `text` |

### Asana task

A task in Asana.

| Field Name         | Description                                              | Type             |
| ------------------ | -------------------------------------------------------- | ---------------- |
| `name`             | The name of the task                                     | `text`           |
| `resource_type`    | The resource type of the task (e.g., "task")             | `optional[text]` |
| `resource_subtype` | The resource subtype of the task (e.g., "default\_task") | `optional[text]` |
| `gid`              | The global ID of the task                                | `optional[text]` |
| `html_notes`       | Optional HTML content of the task description.           | `optional[text]` |
| `created_at`       | The time at which this resource was created.             | `optional[text]` |
