You can use the Prebuilt Action Templates from your Asana integration to auto-create dialog tasks and test them using the Talk to Bot option.
Steps to create a dialog task using Asana action templates:
- Go to Build > Conversation Skills > Dialog Tasks.
- Click Create a Dialog Task.
- On the Dialog Task pop-up, under the Integration, select the Asana option to view the action templates.
Note: If you have not configured any integration for your virtual assistant, you will see the Explore Integrations option. Once you click this option, you will be redirected to the Actions page to configure an integration for your VA. For more information, see Actions Overview.
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:
- Refer to the Installing the Asana Templates section to install this template.
- The Get Task by Id dialog task is added with the following components:
- getTaskById: A user intent to fetch a task with ID from the Asana space.
- taskId – An entity node for entering the task ID.
- 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:
To add one or more responses, scroll down and click the +Add Response button:
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" } } }
- getTaskByIdMessage – A message node with script to display responses to find tasks with ID.
- Click the Train tab to complete the Dialog task training.
- Click the Talk to Bot icon to test and debug the dialog task.
- Follow the prompts in the VA console to find a task with ID on Asana.
- Enter the task ID when prompted by the VA as shown below:
- You will notice that a task is found with the ID on Asana. Expand and click the View Task button.
- You can view the task on Asana.
Find Tasks Created by a User
Steps to fetch tasks created by a user from the Asana integration:
- Refer to the Installing the Asana Templates section to install this template.
- The Find Tasks Created by User dialog task is added with the following components:
- findTasksCreatedByUser: A user intent to retrieve tasks created by a user from the Asana space.
- workSpaceId – An entity node for entering the workspace ID of your Asana account.
- userId – An entity node for entering the user ID of your Asana account.
- 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:
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" } } ] } }
- createdTaskMessage – A message node with script to display responses to find tasks by a user.
- Click the Train tab to complete the Dialog task training.
- Click the Talk to Bot icon to test and debug the dialog task.
- Follow the prompts in the VA console to find tasks created with user ID on Asana as shown below:
- Enter the user ID when prompted by the VA as shown below:
- You will notice that a task is found with the ID on Asana. Expand and click the View Task button.
- You can view the task on Asana.
Find Tasks Assigned to a User
Steps to fetch tasks created by a user from the Asana integration:
- Refer to the Installing the Asana Templates section to install this template.
- The FindTasks Assigned to a User dialog task is added with the following components:
- findTasksAssignedToUser: A user intent to retrieve tasks assigned to a user from the Asana space.
- workSpaceId – An entity node for entering the workspace ID of your Asana account.
- userId – An entity node for entering the user ID of your Asana account.
- 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:
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" } } ] }
- assignedTaskMessage – A message node with script to display responses to find tasks assigned to the user.
- Click the Train tab to complete the Dialog task training.
- Click the Talk to Bot icon to test and debug the dialog task.
- Follow the prompts in the VA console to find a task with ID on Asana as shown below:
- Enter the user ID when prompted by the VA as shown below:
- 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:
- Refer to the Installing the Asana Templates section to install this template.
- The List All Projects dialog task is added with the following components:
- listAllProjects: A user intent to retrieve tasks assigned to a user from the Asana space.
- 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:
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" } } ] }
- listProjectMessage – A message node with script to display responses to find all projects..
- Click the Train tab to complete the Dialog task training.
- Click the Talk to Bot icon to test and debug the dialog task.
- Follow the prompts in the VA console to view all projects on Asana as shown below:
- 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:
- Refer to the Installing the Asana Templates section to install this template.
- The List All Users dialog task is added with the following components:
- listAllUsers: A user intent to retrieve tasks assigned to a user from the Asana space.
- 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:
Sample Response{ "data": [ { "gid": "11xxxx674034", "email": "alan.walker@xyz.com", "name": "Alan Walker", "workspaces": [ { "gid": "219xxx756", "name": "xyz.com" } ] } ] }
- listAllUsersMessage – A message node with script to display responses to find all projects.
- Click the Train tab to complete the Dialog task training.
- Click the Talk to Bot icon to test and debug the dialog task.
- Follow the prompts in the VA console to view all users on Asana as shown below:
- You will notice that all users are found on Asana. Expand and click the View User button.