Asana

Asana API integration with managed OAuth. Access tasks, projects, workspaces, users, and manage webhooks. Use this skill when users want to manage work items, track projects, or integrate with Asana workflows. For other third party apps, use the api-gateway skill (https://clawhub.ai/byungkyu/api-gateway).

Audits

Pass

Install

openclaw skills install asana-api

Asana

Access the Asana API with managed OAuth authentication. Manage tasks, projects, workspaces, users, and webhooks for work management.

Quick Start

CLI:

maton asana task list --project <project-gid>
maton api '/asana/api/1.0/tasks?project=PROJECT_GID'

Python:

python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.maton.ai/asana/api/1.0/tasks?project=PROJECT_GID')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

Base URL

https://api.maton.ai/asana/{native-api-path}

Maton proxies requests to app.asana.com and automatically injects your OAuth token.

Installation

NPM:

npm install -g @maton-ai/cli

Homebrew:

brew install maton-ai/cli/maton

Authentication

CLI:

maton login                          # Opens browser for API key
maton login --interactive            # Skip browser, paste API key directly
maton whoami                         # Show current auth state

Manual:

  1. Sign in or create an account at maton.ai
  2. Go to maton.ai/settings
  3. Copy your API key
  4. Set your API key as MATON_API_KEY:
export MATON_API_KEY="YOUR_API_KEY"

Connection Management

Manage your Asana OAuth connections at https://api.maton.ai.

List Connections

CLI:

maton connection list asana --status ACTIVE
maton api -X GET /connections -f app=asana -f status=ACTIVE

Python:

python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.maton.ai/connections?app=asana&status=ACTIVE')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

Create Connection

CLI:

maton connection create asana
maton api /connections -f app=asana

Python:

python <<'EOF'
import urllib.request, os, json
data = json.dumps({'app': 'asana'}).encode()
req = urllib.request.Request('https://api.maton.ai/connections', data=data, method='POST')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
req.add_header('Content-Type', 'application/json')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

Get Connection

CLI:

maton connection view {connection_id}
maton api /connections/{connection_id}

Python:

python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.maton.ai/connections/{connection_id}')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

Response:

{
  "connection": {
    "connection_id": "{connection_id}",
    "status": "ACTIVE",
    "creation_time": "2025-12-08T07:20:53.488460Z",
    "last_updated_time": "2026-01-31T20:03:32.593153Z",
    "url": "https://connect.maton.ai/?session_token=...",
    "app": "asana",
    "metadata": {}
  }
}

Open the returned url in a browser to complete OAuth authorization.

Delete Connection

CLI:

maton connection delete {connection_id}
maton api -X DELETE /connections/{connection_id}

Python:

python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.maton.ai/connections/{connection_id}', method='DELETE')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

Specifying Connection

If you have multiple Asana connections, specify which one to use:

CLI:

maton asana task list --project <project-gid> --connection {connection_id}
maton api /asana/api/1.0/tasks?project=PROJECT_GID --connection {connection_id}

Python:

python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.maton.ai/asana/api/1.0/tasks?project=PROJECT_GID')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
req.add_header('Maton-Connection', '{connection_id}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

If you have multiple connections, always specify the connection to ensure requests go to the intended account.

Security & Permissions

  • Access is scoped to tasks, projects, workspaces, users, and manage webhooks within the connected Asana account.
  • All write operations require explicit user approval. Before executing any create, update, or delete call, confirm the target resource and intended effect with the user.

API Reference

Tasks

Get Multiple Tasks

GET /asana/api/1.0/tasks

Query parameters:

  • project - Project GID to filter tasks
  • assignee - User GID or "me" for assigned tasks
  • workspace - Workspace GID (required if no project specified)
  • completed_since - ISO 8601 date to filter tasks completed after this date
  • opt_fields - Comma-separated list of fields to include

Example:

maton asana task list --project 1234567890 --opt-fields name,completed,due_on

Get a Task

GET /asana/api/1.0/tasks/{task_gid}

Example:

maton asana task view 1234567890

Create a Task

POST /asana/api/1.0/tasks
Content-Type: application/json

{
  "data": {
    "name": "New task",
    "projects": ["PROJECT_GID"],
    "assignee": "USER_GID",
    "due_on": "2025-03-20",
    "notes": "Task description here"
  }
}

Example:

maton asana task create --name 'New task' --projects PROJECT_GID --assignee USER_GID --due-on 2025-03-20 --notes 'Task description here'

Update a Task

PUT /asana/api/1.0/tasks/{task_gid}

Example:

maton asana task update 1234567890 --completed

Delete a Task

DELETE /asana/api/1.0/tasks/{task_gid}

Example:

maton asana task delete 1234567890

Get Tasks from a Project

GET /asana/api/1.0/projects/{project_gid}/tasks

Example:

maton asana task list --project 1234567890

Get Subtasks

GET /asana/api/1.0/tasks/{task_gid}/subtasks

Example:

maton asana task list --parent 1234567890

Create Subtask

POST /asana/api/1.0/tasks/{task_gid}/subtasks
Content-Type: application/json

{
  "data": {
    "name": "Subtask name",
    "assignee": "USER_GID",
    "due_on": "2025-03-20"
  }
}

Example:

maton asana task create --name 'Subtask name' --parent 1234567890 --assignee USER_GID --due-on 2025-03-20

Search Tasks (Premium)

Note: This endpoint requires an Asana Premium subscription.

GET /asana/api/1.0/workspaces/{workspace_gid}/tasks/search

Query parameters:

  • text - Text to search for
  • assignee.any - Filter by assignees
  • projects.any - Filter by projects
  • completed - Filter by completion status

Example:

maton asana task search -w 1234567890 --text 'quarterly report' --completed=false

Projects

Get Multiple Projects

GET /asana/api/1.0/projects

Query parameters:

  • workspace - Workspace GID
  • team - Team GID
  • opt_fields - Comma-separated list of fields

Example:

maton asana project list --workspace <workspace-gid> --opt-fields name,owner,due_date

Get a Project

GET /asana/api/1.0/projects/{project_gid}

Example:

maton asana project view <project-gid>

Create a Project

POST /asana/api/1.0/projects

Example:

maton asana project create --workspace <workspace-gid> --name 'New Project' --notes 'Project description'

Update a Project

PUT /asana/api/1.0/projects/{project_gid}

Example:

maton asana project update PROJECT_GID --name 'Updated Name'

Delete a Project

DELETE /asana/api/1.0/projects/{project_gid}

Example:

maton asana project delete <project-gid>

Workspaces

Get Multiple Workspaces

GET /asana/api/1.0/workspaces

Example:

maton asana workspace list

Get a Workspace

GET /asana/api/1.0/workspaces/{workspace_gid}

Example:

maton asana workspace view 1234567890

Update a Workspace

PUT /asana/api/1.0/workspaces/{workspace_gid}

Add User to Workspace

POST /asana/api/1.0/workspaces/{workspace_gid}/addUser

Remove User from Workspace

POST /asana/api/1.0/workspaces/{workspace_gid}/removeUser

Users

Get Multiple Users

GET /asana/api/1.0/users

Query parameters:

  • workspace - Workspace GID to filter users

Get Current User

GET /asana/api/1.0/users/me

Example:

maton asana whoami

Get a User

GET /asana/api/1.0/users/{user_gid}

Get Users in a Team

GET /asana/api/1.0/teams/{team_gid}/users

Get Users in a Workspace

GET /asana/api/1.0/workspaces/{workspace_gid}/users

Webhooks

Get Multiple Webhooks

GET /asana/api/1.0/webhooks

Query parameters:

  • workspace - Workspace GID (required)
  • resource - Resource GID to filter by

Create Webhook

Note: Asana verifies the target URL is reachable and responds with a 200 status during webhook creation.

POST /asana/api/1.0/webhooks
Content-Type: application/json

{
  "data": {
    "resource": "PROJECT_OR_TASK_GID",
    "target": "https://example.com/webhook",
    "filters": [
      {
        "resource_type": "task",
        "action": "changed",
        "fields": ["completed", "due_on"]
      }
    ]
  }
}

Get a Webhook

GET /asana/api/1.0/webhooks/{webhook_gid}

Update a Webhook

PUT /asana/api/1.0/webhooks/{webhook_gid}

Delete a Webhook

DELETE /asana/api/1.0/webhooks/{webhook_gid}

Returns 200 OK with empty data on success.

Pagination

Asana uses cursor-based pagination. The CLI automatically paginates with '--paginate'.

Example:

maton asana task list --project <project-gid> --paginate

Code Examples

CLI

# Get tasks as JSON (default format); select fields with --opt-fields
maton asana task list --project 1234567890 --opt-fields name,completed,due_on

# Filter with jq — e.g., only incomplete tasks (responses are wrapped in {"data": [...]})
# Note: --jq requires --json
maton asana task list --project 1234567890 --opt-fields name,completed,due_on \
  --json --jq '.data | map(select(.completed == false))'

# Extract specific fields
maton asana project list --workspace 1234567890 --opt-fields name --json --jq '.data[].name'

JavaScript

const response = await fetch(
  'https://api.maton.ai/asana/api/1.0/tasks?project=1234567890',
  {
    headers: {
      'Authorization': `Bearer ${process.env.MATON_API_KEY}`
    }
  }
);
const data = await response.json();

Python

import os
import requests

response = requests.get(
    'https://api.maton.ai/asana/api/1.0/tasks',
    headers={'Authorization': f'Bearer {os.environ["MATON_API_KEY"]}'},
    params={'project': '1234567890'}
)
data = response.json()

Notes

  • Resource IDs (GIDs) are strings
  • Timestamps are in ISO 8601 format
  • Use opt_fields to specify which fields to return
  • Workspaces are the highest-level organizational unit
  • Organizations are specialized workspaces representing companies
  • IMPORTANT: When using curl commands, use curl -g when URLs contain brackets (fields[], sort[], records[]) to disable glob parsing
  • IMPORTANT: When piping curl output to jq or other commands, environment variables like $MATON_API_KEY may not expand correctly in some shell environments. You may get "Invalid API key" errors when piping.

Error Handling

StatusMeaning
400Bad request or missing Asana connection
401Invalid or missing Maton API key
403Forbidden - insufficient permissions
404Resource not found
429Rate limited
4xx/5xxPassthrough error from Asana API

Troubleshooting: API Key Issues

CLI:

  1. Check your auth state:
maton whoami
  1. Verify the API key is valid by listing connections:
maton connection list

Manual:

  1. Check that the MATON_API_KEY environment variable is set:
echo $MATON_API_KEY
  1. Verify the API key is valid by listing connections:
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.maton.ai/connections')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

Troubleshooting: Invalid App Name

  1. Ensure your URL path starts with asana. For example:
  • Correct: https://api.maton.ai/asana/api/1.0/tasks
  • Incorrect: https://api.maton.ai/api/1.0/tasks

Resources