> ## Documentation Index
> Fetch the complete documentation index at: https://koreai-ai-for-work-dev.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Using the Asana Action Templates

<Badge icon="arrow-left" color="gray">[Back to Actions Integrations](/ai-for-service/integrations/overview#actions)</Badge>

Use prebuilt Asana action templates to auto-create dialog tasks.

**Prerequisites:** Configure [Asana](/ai-for-service/integrations/actions/configuring-the-asana-action) and [install templates](/ai-for-service/integrations/actions/configuring-the-asana-action#install-asana-action-templates) before proceeding.

Navigate to **Automation AI > Use Cases > Dialogs**, then click the auto-created dialog to open the canvas with entity nodes, service nodes, and message scripts.

***

## Supported Actions

| Action                       | Description                        | Method |
| ---------------------------- | ---------------------------------- | ------ |
| Get a Task by ID             | Retrieves a task by task ID        | GET    |
| Find Tasks Created By a User | Retrieves tasks created by a user  | GET    |
| Find Tasks Assigned to User  | Retrieves tasks assigned to a user | GET    |
| List All Projects            | Returns all projects               | POST   |
| List All Users               | Returns all users                  | POST   |

***

## Get Task by ID

1. Install the template from [Asana Templates](/ai-for-service/integrations/actions/configuring-the-asana-action#install-asana-action-templates).

2. The **Get Task by Id** dialog task is added with:

   <img src="https://mintcdn.com/koreai-ai-for-work-dev/qM7mwNztp4e7APSL/ai-for-service/integrations/actions/images/asana-action-img13.png?fit=max&auto=format&n=qM7mwNztp4e7APSL&q=85&s=79d112f069fc0bf43cacd79f5616be7a" alt="Dialog task added" width="1535" height="852" data-path="ai-for-service/integrations/actions/images/asana-action-img13.png" />

   * **getTaskById** - User intent to fetch a task by ID.

   * **taskId** - Entity node for the task ID.

   * **getTaskByIdService** - Bot action service to fetch the task. Click **Edit Request** to modify parameters.

     <img src="https://mintcdn.com/koreai-ai-for-work-dev/qM7mwNztp4e7APSL/ai-for-service/integrations/actions/images/asana_template-img5.png?fit=max&auto=format&n=qM7mwNztp4e7APSL&q=85&s=ec96ce82ba8e9a5fb1b91a69886833b8" alt="Edit request" width="1917" height="904" data-path="ai-for-service/integrations/actions/images/asana_template-img5.png" />

     Click **+Add Response** to add sample responses:

     <img src="https://mintcdn.com/koreai-ai-for-work-dev/qM7mwNztp4e7APSL/ai-for-service/integrations/actions/images/asana_template-img6.png?fit=max&auto=format&n=qM7mwNztp4e7APSL&q=85&s=c65543d2b5cd01f51b207d794117f847" alt="Add Response" width="1919" height="911" data-path="ai-for-service/integrations/actions/images/asana_template-img6.png" />

     **Sample Response:**

     ```json theme={null}
     {
       "data": {
         "gid": "1204307990977944",
         "assignee": { "gid": "1204191722074650", "name": "Alan Walker" },
         "created_at": "2023-03-31T11:11:44.658Z",
         "created_by": { "gid": "1204191722074650", "name": "Alan Walker" },
         "name": "NEW TASK",
         "notes": "The description",
         "permalink_url": "https://app.asana.com/0/1xx60369/1XXX944",
         "projects": [{ "gid": "1204191735460369", "name": "Int1" }],
         "workspace": { "gid": "21968248715756", "name": "xyz.com" }
       }
     }
     ```

   * **getTaskByIdMessage** - Message node to display the task result.

3. Click **Train** to complete training.

4. Click **Talk to Bot** to test.

5. Enter the task ID when prompted.

   <img src="https://mintcdn.com/koreai-ai-for-work-dev/qM7mwNztp4e7APSL/ai-for-service/integrations/actions/images/asana_template-img7.png?fit=max&auto=format&n=qM7mwNztp4e7APSL&q=85&s=254f5fe7cc3bd804ae53c8d8ff710c43" alt="Enter Task ID" width="586" height="829" data-path="ai-for-service/integrations/actions/images/asana_template-img7.png" />

6. The task is returned. Click **View Task** to open it in Asana.

   <img src="https://mintcdn.com/koreai-ai-for-work-dev/qM7mwNztp4e7APSL/ai-for-service/integrations/actions/images/asana_template-img8.png?fit=max&auto=format&n=qM7mwNztp4e7APSL&q=85&s=5b1029d9c4d95ea1b7e09fe1cf630f1c" alt="Task found with ID" width="584" height="837" data-path="ai-for-service/integrations/actions/images/asana_template-img8.png" />

   <img src="https://mintcdn.com/koreai-ai-for-work-dev/qM7mwNztp4e7APSL/ai-for-service/integrations/actions/images/asana_template-img9.png?fit=max&auto=format&n=qM7mwNztp4e7APSL&q=85&s=9c5f2a1b547954460a987e4445b9cff4" alt="View task" width="1916" height="832" data-path="ai-for-service/integrations/actions/images/asana_template-img9.png" />

***

## Find Tasks Created by a User

1. Install the template from [Asana Templates](/ai-for-service/integrations/actions/configuring-the-asana-action#install-asana-action-templates).

2. The **Find Tasks Created by User** dialog task is added with:

   <img src="https://mintcdn.com/koreai-ai-for-work-dev/qM7mwNztp4e7APSL/ai-for-service/integrations/actions/images/asana-template-img10-find_tasks.png?fit=max&auto=format&n=qM7mwNztp4e7APSL&q=85&s=889e46e6d60a36d8540a70da7e718409" alt="Dialog task" width="1525" height="899" data-path="ai-for-service/integrations/actions/images/asana-template-img10-find_tasks.png" />

   * **findTasksCreatedByUser** - User intent to retrieve tasks created by a user.

   * **workSpaceId** - Entity node for the workspace ID.

   * **userId** - Entity node for the user ID.

   * **findCreatedTasksService** - Bot action service to find created tasks. Click **+Add Response**:

     <img src="https://mintcdn.com/koreai-ai-for-work-dev/qM7mwNztp4e7APSL/ai-for-service/integrations/actions/images/asana-template-img11-find_tasks2.png?fit=max&auto=format&n=qM7mwNztp4e7APSL&q=85&s=5088dc89961ec930a4097d63536b0de6" alt="Bot action service" width="1917" height="775" data-path="ai-for-service/integrations/actions/images/asana-template-img11-find_tasks2.png" />

     **Sample Response:**

     ```json theme={null}
     {
       "data": [
         {
           "gid": "1204325494675011",
           "assignee": { "gid": "12041917XXX0", "name": "Alan Walker" },
           "created_at": "2023-04-03T20:32:00.270Z",
           "name": "30Apr NEW TASK",
           "notes": "The description",
           "projects": [{ "gid": "1204191735460369", "name": "Int1" }],
           "workspace": { "gid": "21968248715756", "name": "xyz.com" }
         }
       ]
     }
     ```

   * **createdTaskMessage** - Message node to display results.

3. Click **Train**, then **Talk to Bot** to test.

4. Follow prompts to enter workspace ID and user ID.

   <img src="https://mintcdn.com/koreai-ai-for-work-dev/qM7mwNztp4e7APSL/ai-for-service/integrations/actions/images/asana-template-img12-find_tasks5.png?fit=max&auto=format&n=qM7mwNztp4e7APSL&q=85&s=0a836505e0e938b164bb5cb44892488b" alt="Find tasks with user ID" width="600" height="829" data-path="ai-for-service/integrations/actions/images/asana-template-img12-find_tasks5.png" />

   <img src="https://mintcdn.com/koreai-ai-for-work-dev/qM7mwNztp4e7APSL/ai-for-service/integrations/actions/images/asana-template-img13-find_tasks6.png?fit=max&auto=format&n=qM7mwNztp4e7APSL&q=85&s=201f7e6ba5d2fe71e9e6e2fe5effa648" alt="Enter user ID" width="597" height="837" data-path="ai-for-service/integrations/actions/images/asana-template-img13-find_tasks6.png" />

5. Click **View Task** to open in Asana.

   <img src="https://mintcdn.com/koreai-ai-for-work-dev/qM7mwNztp4e7APSL/ai-for-service/integrations/actions/images/asana_template-img14.png?fit=max&auto=format&n=qM7mwNztp4e7APSL&q=85&s=7e07de9c280dda064e830d1e6bafcdd7" alt="View task" width="1916" height="832" data-path="ai-for-service/integrations/actions/images/asana_template-img14.png" />

***

## Find Tasks Assigned to a User

1. Install the template from [Asana Templates](/ai-for-service/integrations/actions/configuring-the-asana-action#install-asana-action-templates).

2. The **FindTasks Assigned to a User** dialog task is added with:

   <img src="https://mintcdn.com/koreai-ai-for-work-dev/qM7mwNztp4e7APSL/ai-for-service/integrations/actions/images/asana-template-img15-find_task_assigned.png?fit=max&auto=format&n=qM7mwNztp4e7APSL&q=85&s=4c86573ad5acf52675e8455f1adba086" alt="Dialog task" width="1532" height="906" data-path="ai-for-service/integrations/actions/images/asana-template-img15-find_task_assigned.png" />

   * **findTasksAssignedToUser** - User intent to retrieve tasks assigned to a user.

   * **workSpaceId** - Entity node for workspace ID.

   * **userId** - Entity node for user ID.

   * **findAssignedTasksService** - Bot action service to fetch assigned tasks. Click **+Add Response**:

     <img src="https://mintcdn.com/koreai-ai-for-work-dev/qM7mwNztp4e7APSL/ai-for-service/integrations/actions/images/asana-template-img16-find_task_assigned1.png?fit=max&auto=format&n=qM7mwNztp4e7APSL&q=85&s=0ca61a0a3dd5145702617cf5597f7066" alt="Bot action service" width="1913" height="902" data-path="ai-for-service/integrations/actions/images/asana-template-img16-find_task_assigned1.png" />

     **Sample Response:**

     ```json theme={null}
     {
       "data": [
         {
           "gid": "1204325494675011",
           "assignee": { "gid": "1204191722074650", "name": "Alan Walker" },
           "name": "30Apr NEW TASK",
           "projects": [{ "gid": "1204191735460369", "name": "Int1" }],
           "workspace": { "gid": "21968248715756", "name": "xyz.com" }
         }
       ]
     }
     ```

   * **assignedTaskMessage** - Message node to display results.

3. Click **Train**, then **Talk to Bot** to test.

4. Follow prompts to find tasks.

   <img src="https://mintcdn.com/koreai-ai-for-work-dev/qM7mwNztp4e7APSL/ai-for-service/integrations/actions/images/asana-template-img17-find_task_assigned3.png?fit=max&auto=format&n=qM7mwNztp4e7APSL&q=85&s=0b5336b99e2ec0b395a6f63418237a92" alt="Find task" width="593" height="834" data-path="ai-for-service/integrations/actions/images/asana-template-img17-find_task_assigned3.png" />

   <img src="https://mintcdn.com/koreai-ai-for-work-dev/qM7mwNztp4e7APSL/ai-for-service/integrations/actions/images/asana-template-img18-find_task_assigned4.png?fit=max&auto=format&n=qM7mwNztp4e7APSL&q=85&s=ae659435de791121689831a91d748081" alt="Enter task ID" width="595" height="832" data-path="ai-for-service/integrations/actions/images/asana-template-img18-find_task_assigned4.png" />

5. Click **View Task** to open in Asana.

***

## List All Projects

1. Install the template from [Asana Templates](/ai-for-service/integrations/actions/configuring-the-asana-action#install-asana-action-templates).

2. The **List All Projects** dialog task is added with:

   <img src="https://mintcdn.com/koreai-ai-for-work-dev/qM7mwNztp4e7APSL/ai-for-service/integrations/actions/images/asana-template-img19-list_all_projects.png?fit=max&auto=format&n=qM7mwNztp4e7APSL&q=85&s=360554f500d369bfd0556c42545da38a" alt="Dialog task" width="1432" height="907" data-path="ai-for-service/integrations/actions/images/asana-template-img19-list_all_projects.png" />

   * **listAllProjects** - User intent to retrieve all projects.

   * **listAllProjectsService** - Bot action service to retrieve all projects. Click **+Add Response**:

     <img src="https://mintcdn.com/koreai-ai-for-work-dev/qM7mwNztp4e7APSL/ai-for-service/integrations/actions/images/asana-template-img20-list_all_projects1.png?fit=max&auto=format&n=qM7mwNztp4e7APSL&q=85&s=80eaf16a67b0f7148fb2ae51be338ee1" alt="Bot action service" width="1917" height="817" data-path="ai-for-service/integrations/actions/images/asana-template-img20-list_all_projects1.png" />

     **Sample Response:**

     ```json theme={null}
     {
       "data": [
         {
           "gid": "1190334540433515",
           "name": "integration",
           "owner": { "gid": "1190337001098545", "name": "Alan" },
           "workspace": { "gid": "21968248715756", "name": "xyz.com" }
         }
       ]
     }
     ```

   * **listProjectMessage** - Message node to display results.

3. Click **Train**, then **Talk to Bot** to test.

4. Follow prompts to list projects.

   <img src="https://mintcdn.com/koreai-ai-for-work-dev/qM7mwNztp4e7APSL/ai-for-service/integrations/actions/images/asana-template-img21-list_all_projects2.png?fit=max&auto=format&n=qM7mwNztp4e7APSL&q=85&s=5ccee491bec5c00baac35fe22fa0153c" alt="List projects prompt" width="597" height="839" data-path="ai-for-service/integrations/actions/images/asana-template-img21-list_all_projects2.png" />

5. Click **View Project** to open in Asana.

***

## List All Users

1. Install the template from [Asana Templates](/ai-for-service/integrations/actions/configuring-the-asana-action#install-asana-action-templates).

2. The **List All Users** dialog task is added with:

   <img src="https://mintcdn.com/koreai-ai-for-work-dev/qM7mwNztp4e7APSL/ai-for-service/integrations/actions/images/asana-template-img22list_all_users.png?fit=max&auto=format&n=qM7mwNztp4e7APSL&q=85&s=da9a45c033766502d3ba46cc49238512" alt="Dialog task" width="1446" height="907" data-path="ai-for-service/integrations/actions/images/asana-template-img22list_all_users.png" />

   * **listAllUsers** - User intent to retrieve all users.

   * **listAllUsersService** - Bot action service to find all users. Click **+Add Response**:

     <img src="https://mintcdn.com/koreai-ai-for-work-dev/qM7mwNztp4e7APSL/ai-for-service/integrations/actions/images/asana-template-img23-list_all_users1.png?fit=max&auto=format&n=qM7mwNztp4e7APSL&q=85&s=c0a0cccaf1790377ef87e59f43471b5c" alt="Bot action service" width="1918" height="815" data-path="ai-for-service/integrations/actions/images/asana-template-img23-list_all_users1.png" />

     **Sample Response:**

     ```json theme={null}
     {
       "data": [
         {
           "gid": "11xxxx674034",
           "email": "alan.walker@xyz.com",
           "name": "Alan Walker",
           "workspaces": [{ "gid": "219xxx756", "name": "xyz.com" }]
         }
       ]
     }
     ```

   * **listAllUsersMessage** - Message node to display results.

3. Click **Train**, then **Talk to Bot** to test.

4. Follow prompts to list users.

   <img src="https://mintcdn.com/koreai-ai-for-work-dev/qM7mwNztp4e7APSL/ai-for-service/integrations/actions/images/asana-template-img24-list_all_users2.png?fit=max&auto=format&n=qM7mwNztp4e7APSL&q=85&s=807ce49e2ce4121bd90982d612cd1d73" alt="List users prompt" width="589" height="830" data-path="ai-for-service/integrations/actions/images/asana-template-img24-list_all_users2.png" />

5. Click **View User** to open in Asana.
