Skip to content

Using the Asana Action Templates

You can use the Prebuilt Action Templates from your Asana integration to auto-create dialog tasks and test them using the Test option.

Steps to create a dialog task using Asana action templates:

  1. Ensure that you have configured Asana and installed templates successfully. If you have configured it and skipped installing the templates, see Marketplace to install the templates.

  2. Go to Automation AI >Virtual Assistant > Use Cases > Dialogs. All the dialogs are displayed.

  3. Click the auto-created dialog. The the canvas opens with all required entity nodes, service nodes, and message scripts.

Asana Actions

The following Asana action is supported in the latest version of the XO Platform:

Supported Actions Description Method
Get a Task by ID Retrieves a task from the Asana integration using the task ID. GET
Find Tasks Created By a User Retrieves tasks created by a user from the Asana integration. GET
Find Tasks Assigned to User Retrieves tasks assigned to a user from the Asana integration. GET
List All Projects Shows all projects in the Asana integration. POST
List All Users Shows all users in the Asana integration. POST

Get Task by ID

Steps to fetch a task with ID from the Asana integration:

  1. Refer to the Installing the Asana Templates section to install this template.
  2. The Get Task by Id dialog task is added with the following components:
    Dialog task is added

    1. getTaskById: A user intent to fetch a task with ID from the Asana space.
    2. taskId – An entity node for entering the task ID.
    3. getTaskByIdService – A bot action service to fetch the task with the ID from the Asana integration. Click the Plus icon to expand to view the getTaskByIdService bot action component properties. In the Component Properties window, click the Edit Request link to edit the request parameters as shown below:
      Edit request

      To add one or more responses, scroll down and click the +Add Response button:
      Add Response

      Sample Response

      {
              "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"
                  }
              }
          } 
      
    4. getTaskByIdMessage – A message node with script to display responses to find tasks with ID.

  3. Click the Train tab to complete the Dialog task training.

  4. Click the Talk to Bot icon to test and debug the dialog task.
  5. Follow the prompts in the VA console to find a task with ID on Asana.
  6. Enter the task ID when prompted by the VA as shown below:
    Enter Task ID

  7. You will notice that a task is found with the ID on Asana. Expand and click the View Task button.
    Task found with ID

  8. You can view the task on Asana.
    View task

Find Tasks Created by a User

Steps to fetch tasks created by a user from the Asana integration:

  1. Refer to the Installing the Asana Templates section to install this template.
  2. The Find Tasks Created by User dialog task is added with the following components:
    Add dialog task to find tasks

    1. findTasksCreatedByUser: A user intent to retrieve tasks created by a user from the Asana space.
    2. workSpaceId – An entity node for entering the workspace ID of your Asana account.
    3. userId – An entity node for entering the user ID of your Asana account.
    4. findCreatedTasksService – A bot action service to find tasks created by a user from the Asana integration. Click the Plus icon to expand to view the findCreatedTasksService bot action component properties. In the Component Properties window, to add one or more responses, scroll down and click the +Add Response button:
      Bot action service created

      Sample Response

      {
              "data": [
                  {
                      "gid": "1204325494675011",
                      "assignee": {
                          "gid": "12041917XXX0",
                          "name": "Alan Walker"
                      },
                      "created_at": "2023-04-03T20:32:00.270Z",
                      "created_by": {
                          "gid": "1204191722074650",
                          "name": "Alan Walker"
                      },
                      "name": "30Apr NEW TASK",
                      "notes": "The description",
                      "Permalink_url": "https://app.asana.com/0/12XX369/1XXX11",
                      "projects": [
                          {
                              "gid": "1204191735460369",
                              "name": "Int1"
                          }
                      ],
                      "workspace": {
                          "gid": "21968248715756",
                          "name": "xyz.com"
                      }
                  },
                  {
                      "gid": "1204326178006294",
                      "assignee": {
                          "gid": "1204191722074650",
                          "name": "Alan Walker"
                      },
                      "created_at": "2023-04-03T22:28:25.171Z",
                      "created_by": {
                          "gid": "1204191722074650",
                          "name": "Alan Walker"
                      },
                      "name": "30Apr NEW TASK",
                      "notes": "The description",
                      "permalink_url": "https://app.asana.com/0/1XXX9/12XXX294",
                      "projects": [
                          {
                              "gid": "1204191735460369",
                              "name": "Int1"
                          }
                      ],
                      "workspace": {
                          "gid": "21968248715756",
                          "name": "xyz.com"
                      }
                  }
              ]
          } 
      }
      
  3. createdTaskMessage – A message node with script to display responses to find tasks by a user.

  4. Click the Train tab to complete the Dialog task training.
  5. Click the Talk to Bot icon to test and debug the dialog task.
  6. Follow the prompts in the VA console to find tasks created with user ID on Asana as shown below:
    Find tasks with user ID

  7. Enter the user ID when prompted by the VA as shown below:
    Enter user ID

  8. You will notice that a task is found with the ID on Asana. Expand and click the View Task button.

  9. You can view the task on Asana.
    View task

Find Tasks Assigned to a User

Steps to fetch tasks created by a user from the Asana integration:

  1. Refer to the Installing the Asana Templates section to install this template.
  2. The FindTasks Assigned to a User dialog task is added with the following components:
    Dialog task to find task assigned to user is added

    1. findTasksAssignedToUser: A user intent to retrieve tasks assigned to a user from the Asana space.
    2. workSpaceId – An entity node for entering the workspace ID of your Asana account.
    3. userId – An entity node for entering the user ID of your Asana account.
    4. findAssignedTasksService – A bot action service to fetch the assigned tasks to a user from the Asana integration. Click the Plus icon to expand to view the findAssignedTasksService bot action component properties. In the Component Properties window, to add one or more responses, scroll down and click the +Add Response button:
      Bot action service created

      Sample Response

      {
              "data": [
                  {
                      "gid": "1204325494675011",
                      "assignee": {
                          "gid": "1204191722074650",
                          "name": "Alan Walker"
                      },
                      "created_at": "2023-04-03T20:32:00.270Z",
                      "created_by": {
                          "gid": "1204191722074650",
                          "name": "Alan Walker"
                      },
                      "name": "30Apr NEW TASK",
                      "notes": "The description",
                      "Permalink_url": "https://app.asana.com/0/1X69/1XX1",
                      "projects": [
                          {
                              "gid": "1204191735460369",
                              "name": "Int1"
                          }
                      ],
                      "workspace": {
                          "gid": "21968248715756",
                          "name": "xyz.com"
                      }
                  },
                  {
                      "gid": "1204326178006294",
                      "assignee": {
                          "gid": "1204191722074650",
                          "name": "Alan Walker"
                      },
                      "created_at": "2023-04-03T22:28:25.171Z",
                      "created_by": {
                          "gid": "1204191722074650",
                          "name": "Alan Walker"
                      },
                      "name": "30Apr NEW TASK",
                      "notes": "The description",
                      "permalink_url": "https://app.asana.com/0/1369/1294",
                      "projects": [
                          {
                              "gid": "1204191735460369",
                              "name": "Int1"
                          }
                      ],
                      "workspace": {
                          "gid": "21968248715756",
                          "name": "xyz.com"
                      }
                  }
              ]
          } 
      
  3. assignedTaskMessage – A message node with script to display responses to find tasks assigned to the user.

  4. Click the Train tab to complete the Dialog task training.
  5. Click the Talk to Bot icon to test and debug the dialog task.
  6. Follow the prompts in the VA console to find a task with ID on Asana as shown below:
    Find task

  7. Enter the user ID when prompted by the VA as shown below:
    Enter task ID

  8. You will notice that a task is found with the ID on Asana. Expand and click the View Task button.

List All Projects

Steps to retrieve all projects from the Asana integration:

  1. Refer to the Installing the Asana Templates section to install this template.
  2. The List All Projects dialog task is added with the following components:
    Dialog task for listing tasks

    1. listAllProjects: A user intent to retrieve tasks assigned to a user from the Asana space.
    2. listAllProjectsService – A bot action service to retrieve all projects from the Asana integration. Click the Plus icon to expand to view the listAllProjectsService bot action component properties. In the Component Properties window, to add one or more responses, scroll down and click the +Add Response button:
      Bot action service for listing tasks

      Sample Response

      {
              "data": [
                  {
                      "gid": "1190334540433515",
                      "created_at": "2020-08-24T13:09:10.888Z",
                      "due_on": null,
                      "name": "integration",
                      "owner": {
                          "gid": "1190337001098545",
                          "name": "Alan"
                      },
                      "permalink_url": "https://app.asana.com/0/1xx5/1xx5",
                      "workspace": {
                          "gid": "21968248715756",
                          "name": "xyz.com"
                      }
                  },
                  {
                      "gid": "1199516117757228",
                      "created_at": "2021-01-07T14:21:04.105Z",
                      "due_on": null,
                      "name": "test",
                      "owner": {
                          "gid": "1190339858363088",
                          "name": "John Doe"
                      },
                      "permalink_url": "https://app.asana.com/0/1xx8/1xx8",
                      "workspace": {
                          "gid": "21968248715756",
                          "name": "xyz.com"
                      }
                  }
              ]
          }
      
  3. listProjectMessage – A message node with script to display responses to find all projects..

  4. Click the Train tab to complete the Dialog task training.
  5. Click the Talk to Bot icon to test and debug the dialog task.
  6. Follow the prompts in the VA console to view all projects on Asana as shown below:
    VA prompt to list projects

  7. You will notice that all projects are found on Asana. Expand and click the View Project button.

List All Users

Steps to retrieve all users from the Asana integration:

  1. Refer to the Installing the Asana Templates section to install this template.
  2. The List All Users dialog task is added with the following components:
    Dialog task to list users

    1. listAllUsers: A user intent to retrieve tasks assigned to a user from the Asana space.
    2. listAllUsersService – A bot action service to find all users from the Asana integration. Click the Plus icon to expand to view the listAllUsersService bot action component properties. In the Component Properties window, to add one or more responses, scroll down and click the +Add Response button:
      Bot action service to find users

      Sample Response

      {
              "data": [
                  {
                      "gid": "11xxxx674034",
                      "email": "alan.walker@xyz.com",
                      "name": "Alan Walker",
                      "workspaces": [
                          {
                              "gid": "219xxx756",
                              "name": "xyz.com"
                          }
                      ]
                  }
              ]
          }
      
  3. listAllUsersMessage – A message node with script to display responses to find all projects.

  4. Click the Train tab to complete the Dialog task training.
  5. Click the Talk to Bot icon to test and debug the dialog task.
  6. Follow the prompts in the VA console to view all users on Asana as shown below:
    Prompt in VA

  7. You will notice that all users are found on Asana. Expand and click the View User button.