4 min read

Asana Get Projects

Purpose

This node is designed to interact with the Asana API to retrieve project information from a specified workspace. It allows users to fetch a list of projects along with their relevant details such as project IDs, names, ownership, due dates, status (archived or public), and timestamps for creation and modification. This functionality is useful for teams managing multiple projects within Asana, allowing for integration with analytics and reporting features in the Vantage platform.

Settings

This node has a few key settings that dictate its behavior, as detailed below:

1. Workspace

Effects of Changing This Setting:

When the workspace is specified, only projects from that particular workspace will be fetched. If no workspace is specified, the system fetches projects from the first workspace available, which may yield unexpected results if the user intends to query a different workspace.

2. Max Results

Effects of Changing This Setting:

Modifying this value affects the number of project entries returned. A smaller number might be useful for quick checks, while a larger number can be applied for more comprehensive analytics and reporting. However, excessive values may lead to performance bottlenecks or slower response times due to the increased data load.

How It Works

This node operates asynchronously and utilizes the integration connection to establish a connection with the Asana API. The following steps outline its operation:

  1. Retrieve Inputs: The function fetches the workspace and maxResults inputs from the provided parameters. If these inputs are absent, it defaults to predefined values: an empty string for workspace and 100 for max results.

  2. Establish Asana Integration: It uses the the integration connection to create an instance for connecting with the Asana API.

  3. Fetch Workspace GID: If no workspace ID (GID) is specified, the logic calls the Asana API to get the first workspace's GID.

  4. Fetch Projects: It requests project data from the Asana API using the specified or default workspace and the maximum results limit.

  5. Transform Response: The returned project data is mapped to a more manageable structure, extracting pertinent information such as GID, name, owner, due date, archived status, and timestamps.

  6. Error Handling: If any error occurs during the API calls, an error message is returned, ensuring the calling function is informed of internal issues that may arise.

  7. Output: Finally, the defined project data along with the total count of projects is returned for further processing.

Expected Data

The function expects the following data structure in its inputs and config objects:

Use Cases & Examples

Use Cases

  1. Team Collaboration: A project management team needs to pull a report on all active projects under their workspace in Asana to monitor progress and resource allocation.

  2. Data Analytics: A data scientist wants to analyze the performance of various projects over time by importing project data into the Vantage platform for further manipulation and visualization.

  3. Project Health Monitoring: A project manager needs to maintain oversight of project deadlines and ownership across multiple projects to ensure timely completion.

Example Configuration

Use Case: Team Collaboration - Retrieving All Active Projects

To configure this node for retrieving all active projects from the "Product Development" workspace, the inputs might be structured as follows:

json
{
  "inputs": {
    "workspace": "1234567890",  // Example GID for the "Product Development" workspace
    "maxResults": 200            // Fetch up to 200 projects
  },
  "config": {
    "workspace": "",              // Defaults to first workspace if inputs.workspace is not provided
    "maxResults": 100             // Default maxResults, will not apply here since input is provided
  }
}

In this setup, the team will obtain a comprehensive list of up to 200 projects in the specified workspace to streamline collaboration and project oversight. The larger result set assists in getting an extensive view of the ongoing initiatives.