Asana

Overview

The Asana connector enables your AI Colleagues to integrate with your organization's Asana platform, facilitating automated task management, project tracking, and workflow automation.

Asana is a work management and collaboration platform that helps teams organize, track, and manage their work. The Asana connector allows Leena AI to automate task workflows, manage projects, and interact with Asana seamlessly.

API Details

Leena AI integrates with Asana via REST APIs.

Documentation link: https://developers.asana.com/reference/rest-api-reference

Setup

The Asana connector supports two authentication methods:

  • OAuth 2.0 authentication with the authorization code grant type (recommended for multi-user apps)
  • Personal Access Token (PAT) authentication (recommended for scripts and simple integrations)

Prerequisites

Before setting up the Asana connector, ensure you have:

  • An Asana account with appropriate permissions
  • Access to the Asana Developer Console (https://app.asana.com/0/my-apps)
  • Ability to create OAuth applications or generate Personal Access Tokens in Asana
  • Access to your Leena AI workspace with connector management permissions

Get credentials

Option 1: OAuth 2.0 (Recommended for Multi-User Apps)

Here is how to create an OAuth application in Asana Developer Console:

  1. Log in to the Asana Developer Console at https://app.asana.com/0/my-apps
  2. Click on Create new app
  3. Enter the App Details:
    1. App name: Enter a descriptive name for your application (e.g., "Leena AI Integration")
    2. Purpose: Select the appropriate use case for your app
    3. Click Create app
  4. Configure OAuth Settings:
    1. Navigate to OAuth in the left sidebar
    2. Click + Add redirect URL
    3. Add the Redirect URL from Leena AI (This will be filled later from Leena AI)
    4. Click Add
  5. Configure Permission Scopes:
    1. Under OAuth > Permission scopes, select the required scopes:
      • tasks:read - Read access to tasks
      • tasks:write - Write access to tasks
      • projects:read - Read access to projects
      • projects:write - Write access to projects
      • Or toggle Full permissions for access to all endpoints
    2. Save the changes
  6. Note Your Credentials:
    1. Client ID: Found in the OAuth section
    2. Client Secret: Found in the OAuth section (keep this secure)
  7. Configure Distribution:
    1. Navigate to Manage distribution in the left sidebar
    2. Choose distribution method based on your requirements:
      • Specific workspaces: Limit access to specific Asana workspaces
      • Any workspace: Allow any user to authorize the app

Option 2: Personal Access Token (PAT)

Here is how to create a Personal Access Token in Asana:

  1. Log in to the Asana Developer Console at https://app.asana.com/0/my-apps
  2. Navigate to Personal access tokens section
  3. Click + Create new token
  4. Enter a Token name (e.g., "Leena AI Integration")
  5. Check the box to agree to the Asana API terms
  6. Click Create token
  7. Copy the token immediately (it will only be shown once)
  8. Store the token securely

Add connection

Here is how to add a connection on Leena AI:

For OAuth 2.0 Authentication:

  1. Log in to your Leena AI workspace
  2. Navigate to Settings > Integrations
  3. Search for "Asana" and select it from the list to add its new connector
  4. Start configuring the connector:
    1. Client ID: OAuth application client ID from Asana
    2. Client Secret: OAuth application client secret from Asana
    3. Scope: List of permissions required to perform actions through Leena AI (Pre-filled with default scopes)
    4. Grant Type: Authorization grant type for OAuth 2.0 (Pre-filled as 'authorization_code')
    5. Authorization URL: https://app.asana.com/-/oauth_authorize
    6. Token URL: https://app.asana.com/-/oauth_token
    7. ID Mapping Fields: The profile field in Leena AI, which corresponds to unique identifier in Asana (Pre-filled with 'email')
    8. Redirect URL: The callback URL for OAuth flow (Auto-generated by Leena AI)
  5. Complete OAuth Flow and Save Configurations:
    1. Click Connect in Leena AI for Asana connector setup
    2. You'll be redirected to Asana authorization page
    3. Sign in to your Asana account if prompted
    4. Click Allow to grant permissions
    5. You'll be redirected back to Leena AI with a successful connection
    6. The connector will be saved
  6. Copy Callback URL and Update Asana OAuth App:
    1. Once the connector is saved in Leena AI, you can reopen the connector to view the Callback URL
    2. Copy the Callback URL from Leena AI
    3. Go back to Asana Developer Console > Your App > OAuth
    4. Add the Callback URL to redirect URLs
    5. Save the changes

For Personal Access Token Authentication:

  1. Log in to your Leena AI workspace
  2. Navigate to Settings > Integrations
  3. Search for "Asana" and select it from the list to add its new connector
  4. Start configuring the connector:
    1. Personal Access Token: The PAT generated from Asana Developer Console
    2. ID Mapping Fields: The profile field in Leena AI, which corresponds to unique identifier in Asana (Pre-filled with 'email')
  5. Save the configuration

Actions

The following actions are supported for the Asana connector:

Create Task

Creates a new task in Asana. The Agent can leverage the skill (workflow), which has been designed to create a new task in Asana, once the user raises a query to do so.

Input Parameters

Here are the input parameters required to set up this action:

Mandatory

NameDescription
Workspace GIDThe globally unique identifier of the workspace where the task will be created
NameThe name/title of the task

Optional

NameDescription
ProjectsArray of project GIDs to add the task to
AssigneeThe GID of the user to assign the task to, or "me" for the authenticated user
Due OnThe date on which the task is due (format: YYYY-MM-DD)
Due AtThe date and time on which the task is due (ISO 8601 format)
NotesFree-form text description of the task
HTML NotesHTML-formatted description of the task
Start OnThe date on which work begins for the task (format: YYYY-MM-DD)
Start AtThe date and time on which work begins (ISO 8601 format)
TagsArray of tag GIDs to add to the task
FollowersArray of user GIDs to add as followers
ParentThe GID of the parent task (for creating subtasks)
Custom FieldsObject containing custom field values

Here is a sample JSON input:

{
  "data": {
    "workspace": "12345678901234",
    "name": "Complete quarterly report",
    "projects": ["98765432109876"],
    "assignee": "me",
    "due_on": "2025-09-15",
    "notes": "Compile and review all department submissions for the Q3 report",
    "followers": ["11111111111111", "22222222222222"],
    "tags": ["33333333333333"]
  }
}

Response

Upon successful creation, the action returns the created task details including:

  • Task GID
  • Task name
  • Assignee information
  • Project associations
  • Due date
  • Created timestamp
  • Permalink URL

Get Task

Retrieves the details of a specific task from Asana. The Agent can leverage the skill (workflow) to fetch task information when a user requests details about a specific task.

Input Parameters

Here are the input parameters required to set up this action:

Mandatory

NameDescription
Task GIDThe globally unique identifier of the task to retrieve

Optional

NameDescription
Opt FieldsComma-separated list of optional fields to include in the response

Here is a sample JSON input:

{
  "task_gid": "12345678901234",
  "opt_fields": "name,assignee,due_on,notes,projects,tags,completed,custom_fields"
}

Response

The action returns the task details including:

  • Task GID
  • Task name
  • Resource type
  • Assignee details
  • Due date
  • Notes/description
  • Completion status
  • Project associations
  • Tags
  • Custom field values
  • Followers
  • Created and modified timestamps

Update Task

Updates an existing task in Asana. The Agent can leverage the skill (workflow), which has been designed to modify an existing task in Asana, once the user provides the task details to be updated.

Input Parameters

Here are the input parameters required to set up this action:

Mandatory

NameDescription
Task GIDThe globally unique identifier of the task to update

Optional

NameDescription
NameThe updated name/title of the task
AssigneeThe GID of the user to assign the task to
Due OnThe updated due date (format: YYYY-MM-DD)
Due AtThe updated due date and time (ISO 8601 format)
NotesUpdated free-form text description
HTML NotesUpdated HTML-formatted description
CompletedBoolean to mark the task as complete or incomplete
Start OnUpdated start date (format: YYYY-MM-DD)
Custom FieldsObject containing updated custom field values

Here is a sample JSON input:

{
  "task_gid": "12345678901234",
  "data": {
    "name": "Complete quarterly report - Updated",
    "due_on": "2025-09-20",
    "assignee": "98765432109876",
    "notes": "Updated: Include additional data from marketing department",
    "completed": false
  }
}

Response

Upon successful update, the action returns the updated task details including:

  • Updated task properties
  • Task GID
  • Modification timestamp
  • Permalink URL

Delete Task

Deletes an existing task from Asana. The Agent can leverage the skill (workflow), which has been designed to remove a task from Asana, once the user specifies the task to be deleted.

Input Parameters

Here are the input parameters required to set up this action:

Mandatory

NameDescription
Task GIDThe globally unique identifier of the task to delete

Here is a sample JSON input:

{
  "task_gid": "12345678901234"
}

Response

Upon successful deletion, the action returns:

  • Confirmation of successful deletion (empty data object)
  • HTTP status 200

List Tasks

Retrieves a list of tasks from Asana based on specified filters. This action can be leveraged by Leena AI Orchestrator/Agent to list tasks from a project, section, or user's task list.

Input Parameters

Here are the input parameters required to set up this action:

Optional (at least one filter required)

NameDescription
Project GIDThe project GID to retrieve tasks from
Section GIDThe section GID to retrieve tasks from
AssigneeThe user GID or "me" to filter tasks by assignee
Workspace GIDThe workspace GID (required when using assignee filter)
Completed SinceOnly return tasks completed since this time (ISO 8601 format)
Modified SinceOnly return tasks modified since this time (ISO 8601 format)
Opt FieldsComma-separated list of optional fields to include
LimitMaximum number of results to return (1-100)

Here is a sample JSON input:

{
  "project": "98765432109876",
  "opt_fields": "name,assignee,due_on,completed,tags",
  "limit": 50
}

Response

The action returns a list of tasks, each containing:

  • Task GID
  • Task name
  • Resource type
  • Assignee information
  • Due date
  • Completion status
  • Additional requested fields

Search Tasks

Searches for tasks in a workspace based on specified criteria. This action enables finding tasks by text, assignee, projects, tags, and other attributes.

Input Parameters

Here are the input parameters required to set up this action:

Mandatory

NameDescription
Workspace GIDThe workspace GID to search within

Optional

NameDescription
TextText to search for in task names and descriptions
Projects.anyComma-separated project GIDs to search within
Assignee.anyComma-separated user GIDs to filter by assignee
Tags.anyComma-separated tag GIDs to filter by tags
CompletedBoolean to filter by completion status
Due OnFilter by specific due date
Due On.beforeFilter for tasks due before this date
Due On.afterFilter for tasks due after this date
Sort ByField to sort by (due_date, created_at, modified_at, likes, etc.)
Sort AscendingBoolean for sort direction

Here is a sample JSON input:

{
  "workspace": "12345678901234",
  "text": "quarterly report",
  "assignee.any": "98765432109876",
  "completed": false,
  "due_on.before": "2025-09-30",
  "sort_by": "due_date",
  "sort_ascending": true
}

Response

The action returns a list of matching tasks with:

  • Task GID
  • Task name
  • Assignee details
  • Due date
  • Project associations
  • Completion status

Create Project

Creates a new project in Asana. The Agent can leverage the skill (workflow) to create a new project when a user requests to set up a new project.

Input Parameters

Here are the input parameters required to set up this action:

Mandatory

NameDescription
Workspace GIDThe workspace GID where the project will be created (required if team is not specified)
NameThe name of the project

Optional

NameDescription
Team GIDThe team GID to create the project in (for organization workspaces)
NotesFree-form text description of the project
HTML NotesHTML-formatted description of the project
ColorThe color of the project (dark-pink, dark-green, dark-blue, dark-red, dark-teal, dark-brown, dark-orange, dark-purple, dark-warm-gray, light-pink, light-green, light-blue, light-red, light-teal, light-brown, light-orange, light-purple, light-warm-gray, none)
Due OnThe date on which the project is due (format: YYYY-MM-DD)
Start OnThe date on which work begins (format: YYYY-MM-DD)
Default ViewThe default view of the project (list, board, calendar, timeline)
PublicBoolean to set project visibility
FollowersArray of user GIDs to add as followers

Here is a sample JSON input:

{
  "data": {
    "workspace": "12345678901234",
    "name": "Q4 Marketing Campaign",
    "notes": "Marketing campaign planning and execution for Q4 2025",
    "color": "light-blue",
    "due_on": "2025-12-31",
    "default_view": "board",
    "public": true
  }
}

Response

Upon successful creation, the action returns the created project details including:

  • Project GID
  • Project name
  • Workspace information
  • Team information (if applicable)
  • Color
  • Due date
  • Permalink URL
  • Created timestamp

Get Project

Retrieves the details of a specific project from Asana.

Input Parameters

Here are the input parameters required to set up this action:

Mandatory

NameDescription
Project GIDThe globally unique identifier of the project to retrieve

Optional

NameDescription
Opt FieldsComma-separated list of optional fields to include in the response

Here is a sample JSON input:

{
  "project_gid": "98765432109876",
  "opt_fields": "name,notes,owner,team,due_on,members,custom_fields"
}

Response

The action returns the project details including:

  • Project GID
  • Project name
  • Notes/description
  • Owner details
  • Team information
  • Due date
  • Members list
  • Custom field values
  • Created and modified timestamps

Add Comment to Task

Creates a comment (story) on a task in Asana. The Agent can leverage this action to add updates or notes to existing tasks.

Input Parameters

Here are the input parameters required to set up this action:

Mandatory

NameDescription
Task GIDThe globally unique identifier of the task to comment on
TextThe plain text content of the comment

Optional

NameDescription
HTML TextThe HTML-formatted content of the comment
Is PinnedBoolean to pin the comment to the top

Here is a sample JSON input:

{
  "task_gid": "12345678901234",
  "data": {
    "text": "Updated the report with the latest sales figures. Ready for review."
  }
}

Response

Upon successful creation, the action returns the created comment details including:

  • Story GID
  • Created timestamp
  • Created by (user details)
  • Text content
  • Resource type
  • Target task information

Update Project

Updates an existing project in Asana.

Input Parameters

Here are the input parameters required to set up this action:

Mandatory

NameDescription
Project GIDThe globally unique identifier of the project to update

Optional

NameDescription
NameThe updated name of the project
NotesUpdated free-form text description
HTML NotesUpdated HTML-formatted description
ColorUpdated color of the project
Due OnUpdated due date (format: YYYY-MM-DD)
Start OnUpdated start date (format: YYYY-MM-DD)
ArchivedBoolean to archive or unarchive the project
PublicBoolean to update project visibility

Here is a sample JSON input:

{
  "project_gid": "98765432109876",
  "data": {
    "name": "Q4 Marketing Campaign - Phase 2",
    "due_on": "2026-01-15",
    "notes": "Extended timeline for additional market analysis"
  }
}

Response

Upon successful update, the action returns the updated project details including:

  • Updated project properties
  • Project GID
  • Modification timestamp
  • Permalink URL

Delete Project

Deletes an existing project from Asana.

Input Parameters

Here are the input parameters required to set up this action:

Mandatory

NameDescription
Project GIDThe globally unique identifier of the project to delete

Here is a sample JSON input:

{
  "project_gid": "98765432109876"
}

Response

Upon successful deletion, the action returns:

  • Confirmation of successful deletion (empty data object)
  • HTTP status 200