4 min read

Documentation for getTask Logic

Overview

This node is an asynchronous function designed to retrieve detailed information about a specific task from the Asana project management platform. This function facilitates integration between the Vantage analytics & data platform and Asana, allowing users to access task-specific data based on a provided Task Global ID (GID).

Purpose

The primary purpose of getTask is to inquire about the details of a task such as its name, assignee, completion status, due dates, and associated projects or tags. This allows users to seamlessly pull relevant task data into their analytics workflow for reporting, tracking, or further processing.

Settings

This node has several configurable settings that affect its behavior. Each setting is described in detail below.

1. taskGid

2. inputs

3. config

4. context

Error Handling

The function includes built-in error handling to manage situations where the task GID is missing or if an error occurs during the API call to Asana. In such cases, the function returns an error message specifying the problem.

Workflow

  1. Input Validation: The function checks if a valid taskGid is provided through inputs or config. If not, it returns an error.
  2. Integration Setup: The function calls the integration connection with 'asana' as a parameter and uses the context provided to establish a connection with the Asana API.
  3. Data Retrieval: Using the established integration, the task information is fetched using the provided taskGid.
  4. Output Construction: If successful, the function structures the output data into a predefined format, including important task attributes such as name, assignee, completion status, and due dates.
  5. Error Handling: In case of any internal errors during the API request, the function captures the error and returns a descriptive message.

Data Expected

The node expects the following data:

Use Cases & Examples

Use Cases

  1. Project Performance Tracking: A project manager can use getTask to track the completion status of specific tasks within ongoing projects, reporting on how many tasks are completed versus outstanding.

  2. Automated Reporting: An analytics dashboard can automate the retrieval of task details from Asana, compiling them into reports to share with stakeholders throughout project lifecycles.

  3. Workflow Automation: By integrating getTask into a larger automation sequence, developers can trigger notifications or updates in response to changes in task statuses (like marking tasks as complete).

Configuration Example

Use Case: Project Performance Tracking

Sample Configuration Data:

json
{
    "inputs": {
        "taskGid": "1234567890123456"
    },
    "config": {},
    "context": {
        "authToken": "yourAsanaAccessToken"
    }
}

Explanation: In this example, the user has provided the taskGid corresponding to a specific task they wish to retrieve. The context contains an authentication token required to access the Asana API, allowing getTask to successfully obtain detailed information about task 1234567890123456. The resulting output will contain attributes such as task name, completion status, due date, and any associated projects or tags, facilitating tracking and performance evaluation.