# How to Connect Asana to OpenClaw

- Tool: OpenClaw
- Difficulty: Intermediate
- Time required: 20 minutes
- Last updated: March 2026

## TL;DR

To connect OpenClaw to Asana, store your ASANA_ACCESS_TOKEN in OpenClaw's config and configure direct HTTP calls to the Asana REST API. This is a Direct API integration — no ClawHub skill is required. Once set up, OpenClaw can create tasks, update task status, add comments, read project data, and query workspace information through Asana's REST API using structured HTTP calls.

## Automate Asana Project Management From OpenClaw

Asana is a mature project management platform with a comprehensive REST API that exposes all of its core functionality: workspaces, projects, sections, tasks, subtasks, comments, assignees, due dates, attachments, and custom fields. The OpenClaw Direct API integration brings this functionality into OpenClaw's configuration-driven workflow layer, enabling automated task creation, status updates, and project queries without manual interaction with the Asana web interface.

The most common integration pattern is creating tasks from OpenClaw workflow outputs — when a workflow identifies an action item, it creates the corresponding Asana task, assigns it to the right person, and sets a due date, all programmatically. Another common pattern is reading Asana projects as input data: loading a sprint backlog, checking task statuses, or pulling a team member's current workload before scheduling new work. Asana's API supports all of these read and write operations with a consistent REST interface.

Asana authentication uses personal access tokens for individual user access or OAuth for multi-user applications. For OpenClaw integrations, personal access tokens are the appropriate approach — they authenticate as your Asana user account and have access to all workspaces and projects your account can access. The token is set once in OpenClaw's config and reused for all subsequent Asana API calls.

## Before you start

- OpenClaw installed and running (see openclaw.ai for installation instructions)
- An Asana account with access to at least one workspace and project
- Access to Asana Developer Console (app.asana.com/-/developer_console) to create a personal access token
- Your Asana workspace GID and target project GID (found via the API or Asana URLs)
- Basic familiarity with REST APIs and JSON

## Step-by-step guide

### 1. Generate an Asana Personal Access Token

Asana personal access tokens (PATs) authenticate API requests as your Asana user. They grant access to all workspaces and projects your account can access — there is no per-token scope selection like Airtable's PAT system. Use a dedicated OpenClaw PAT rather than reusing tokens from other tools so you can revoke it independently if needed.

Navigate to app.asana.com/-/developer_console (or go to My Profile > Apps > Manage Developer Apps > Personal Access Tokens in the Asana app). Click 'New Access Token'. Give it a name like 'OpenClaw Integration'. Click 'Create Token'. Asana shows the token once — copy it immediately. The token is a long alphanumeric string starting with `1/`.

Store this token in OpenClaw's config as ASANA_ACCESS_TOKEN. It will be included as a Bearer token in all Asana API request headers.

```
# Set your Asana PAT in OpenClaw config
clawhub config set ASANA_ACCESS_TOKEN 1/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

# Verify it is set
clawhub config get ASANA_ACCESS_TOKEN

# Test the connection — should return your Asana user info
curl -H "Authorization: Bearer 1/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
  "https://app.asana.com/api/1.0/users/me"
```

**Expected result:** ASANA_ACCESS_TOKEN set in OpenClaw config. The test curl command returns a JSON object with your Asana username, email, and GID.

### 2. Find Your Workspace GID and Project GID

Asana uses numeric GIDs (globally unique identifiers) to reference all objects — workspaces, projects, tasks, users, sections, and custom fields. You need the workspace GID and project GID to make targeted API calls.

**Workspace GID:** Call the `/workspaces` endpoint to list all workspaces your token has access to. Each workspace has a `gid` field — note the one you want to use.

**Project GID:** You can find project GIDs in the Asana web URL. When you open a project in Asana, the URL contains the project GID: `https://app.asana.com/0/{PROJECT_GID}/...`. Or call the `/projects` endpoint filtered by workspace to list all projects.

Store these GIDs in your OpenClaw config so workflows can reference them by name rather than looking them up each time.

```
# List all workspaces
curl -H "Authorization: Bearer 1/YOUR_TOKEN" \
  "https://app.asana.com/api/1.0/workspaces"

# List projects in a workspace
curl -H "Authorization: Bearer 1/YOUR_TOKEN" \
  "https://app.asana.com/api/1.0/projects?workspace=YOUR_WORKSPACE_GID"

# Example: project GID from URL
# https://app.asana.com/0/1234567890123456/...
#                         ^^^^^^^^^^^^^^^^
#                         This is the project GID
```

**Expected result:** You have your workspace GID (a 16+ digit number) and the project GID(s) for the projects you want to access.

### 3. Configure Asana Integration in OpenClaw

Add the Asana integration configuration to your OpenClaw config file. Store the workspace GID and project GIDs you identified in Step 2 under named keys so workflows can reference them by descriptive names.

The ASANA_ACCESS_TOKEN is read automatically from your environment config — you do not need to repeat it in this file. The config below sets up named references to your most-used projects, making workflow configurations more readable.

```
# ~/.openclaw/config.yaml
integrations:
  asana:
    workspace_gid: "YOUR_WORKSPACE_GID"
    default_assignee: "YOUR_USER_GID"  # Your Asana user GID (from /users/me response)
    # Named project references
    projects:
      engineering_sprint: "PROJECT_GID_1"
      product_backlog: "PROJECT_GID_2"
      incoming_requests: "PROJECT_GID_3"
    # Default task settings
    defaults:
      due_days_ahead: 7   # Default due date offset when not specified
      notify_on_create: true
```

**Expected result:** Config file saved with Asana integration settings including workspace GID and project references. `clawhub reload` completes without errors.

### 4. Create and Query Tasks via the Asana API

Test the integration by creating a task and then querying it. The Asana API uses POST to `/tasks` for task creation. The request body must include the project GID and task name at minimum — due date, assignee, notes, and custom fields are all optional.

For reading tasks, GET `/tasks` with a `project` query parameter returns all tasks in that project. The response includes task GIDs, names, assignees, due dates, completion status, and custom field values. Asana's API paginates results at 100 items per page by default, returning an `offset` cursor for subsequent pages.

Asana's API also supports task search via `/tasks/search` with filtering on assignee, completion status, due date range, project membership, and custom field values — more flexible than listing all tasks in a project.

```
# Create a new task
curl -X POST \
  -H "Authorization: Bearer 1/YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  "https://app.asana.com/api/1.0/tasks" \
  -d '{
    "data": {
      "name": "Review Q2 budget proposal",
      "projects": ["PROJECT_GID"],
      "assignee": "YOUR_USER_GID",
      "due_on": "2026-04-15",
      "notes": "Deadline is end of April. Check with finance team first."
    }
  }'

# List tasks in a project
curl -H "Authorization: Bearer 1/YOUR_TOKEN" \
  "https://app.asana.com/api/1.0/tasks?project=PROJECT_GID&completed_since=now"

# Get a specific task by GID
curl -H "Authorization: Bearer 1/YOUR_TOKEN" \
  "https://app.asana.com/api/1.0/tasks/TASK_GID?opt_fields=name,due_on,assignee,completed,notes"
```

**Expected result:** POST creates a new task visible in the Asana project. GET returns a list of tasks with their GIDs, names, assignees, and due dates.

### 5. Update Tasks and Add Comments

Beyond creating tasks, the integration supports updating task fields and adding comments (stories in Asana terminology). Use PUT or PATCH to update task properties — completion status, due date, assignee, notes, and custom fields. Use POST to `/tasks/{task_gid}/stories` to add comments to a task.

For workflow-based integrations, the typical pattern is: create a task when work arrives, update it as it progresses, and mark it complete when done. This is achieved through three API calls at different stages of the workflow.

Bulk task operations are not natively supported in Asana's API — each task requires its own request. For batch processing, add appropriate delays between requests to respect Asana's rate limit of 1,500 requests per 60 seconds (roughly 25/second). RapidDev recommends queuing bulk operations with a configurable rate limiter in your OpenClaw workflow config to prevent 429 errors under load.

```
# Mark a task as complete
curl -X PUT \
  -H "Authorization: Bearer 1/YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  "https://app.asana.com/api/1.0/tasks/TASK_GID" \
  -d '{"data": {"completed": true}}'

# Update task fields
curl -X PUT \
  -H "Authorization: Bearer 1/YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  "https://app.asana.com/api/1.0/tasks/TASK_GID" \
  -d '{
    "data": {
      "due_on": "2026-04-20",
      "assignee": "NEW_ASSIGNEE_GID",
      "notes": "Updated: priority escalated"
    }
  }'

# Add a comment to a task
curl -X POST \
  -H "Authorization: Bearer 1/YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  "https://app.asana.com/api/1.0/tasks/TASK_GID/stories" \
  -d '{"data": {"text": "Automated update from OpenClaw: status changed to In Review"}}'
```

**Expected result:** Task marked as complete disappears from active task views in Asana. Comment appears in the task's activity feed with the timestamp and your account's name.

## Best practices

- Create a dedicated Asana personal access token for OpenClaw so it can be revoked independently if the integration is decommissioned or the token is compromised.
- Store workspace GID and project GIDs as named references in your OpenClaw config rather than hard-coding them in workflow scripts — this makes configuration changes easy without touching workflow logic.
- Use `opt_fields` in GET requests to return only the fields you need — this reduces response payload size and speeds up high-frequency polling queries.
- Add rate limiting delays between bulk API calls to stay within Asana's 1,500 requests/60 seconds limit — aim for 20 requests/second or lower for safety.
- Mark automated comments with a clear prefix like 'Automated:' or '[OpenClaw]' to distinguish them from human comments in task activity feeds.
- Always check the response status code and body after write operations — Asana returns detailed error messages in 4xx responses that identify exactly which field or value is invalid.
- For workflows that process Asana tasks regularly, cache project and user GID mappings locally rather than fetching them on every run — GIDs are stable and do not change.

## Use cases

### Automated Task Creation from Workflow Outputs

Create Asana tasks automatically when OpenClaw workflows identify action items — turning meeting notes into task lists, converting support tickets into engineering tasks, or creating follow-up tasks from customer conversations.

Prompt example:

```
Configure OpenClaw to create an Asana task in my 'Engineering Sprint' project with the title 'Fix login timeout bug', assigned to the backend developer, due in 3 days.
```

### Task Status Monitoring and Reporting

Query Asana projects to get a status overview — which tasks are overdue, how many are completed this week, which team members have the highest task load, and what is blocked. Use this as input to OpenClaw reporting or prioritization workflows.

Prompt example:

```
Build an OpenClaw config that reads all incomplete tasks from my 'Q2 Goals' Asana project that are past their due date and returns them sorted by oldest due date first.
```

### Cross-System Task Synchronization

Keep Asana tasks synchronized with data from other systems — creating Asana tasks from form submissions, updating task status based on external system events, or linking Asana tasks to records in other tools.

Prompt example:

```
Set up an OpenClaw workflow that reads new records from an external source and creates a corresponding Asana task for each one in the 'Incoming Requests' project.
```

## Troubleshooting

### API returns '401 Not Authorized' or 'No Authorization'

Cause: ASANA_ACCESS_TOKEN is not set in OpenClaw's config, was set incorrectly (truncated or with extra whitespace), or the token was revoked.

Solution: Run `clawhub config get ASANA_ACCESS_TOKEN` to check the current value. Test the token directly with `curl -H 'Authorization: Bearer YOUR_TOKEN' https://app.asana.com/api/1.0/users/me`. If the curl returns a 401, the token is invalid — generate a new one in the Asana Developer Console.

```
# Re-set the token
clawhub config set ASANA_ACCESS_TOKEN 1/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
clawhub reload
```

### Task creation returns '400 Bad Request' with 'Missing input'

Cause: Required fields are missing from the task creation request. At minimum, Asana requires a task name and at least one of: project, workspace, or parent task.

Solution: Ensure the request body includes both `name` and `projects` (or `workspace`) fields. Check that the project GID is correct — an invalid GID causes a 400 not a 404.

```
# Minimum valid task creation payload:
# {"data": {"name": "Task title", "projects": ["VALID_PROJECT_GID"]}}
```

### API returns '429 Too Many Requests'

Cause: Asana's rate limit of 1,500 requests per 60 seconds has been exceeded. This typically happens when processing many tasks in a tight loop.

Solution: Add a delay between API calls — staying under 20 requests/second gives a comfortable margin below the 25/second limit. Check the `Retry-After` header in the 429 response for the wait time before retrying.

```
# Add delay between requests
sleep 0.05  # 50ms = 20 requests/second, well within Asana's limit
```

### clawhub config set ASANA_ACCESS_TOKEN fails or token is rejected

Cause: The token may have been pasted with formatting characters, or the token value includes the 'Bearer ' prefix when it should not.

Solution: The token value should be only the token string (e.g., `1/XXXXXX...`) without the 'Bearer ' prefix — that prefix is added by the HTTP client. Verify there are no leading/trailing spaces in the configured value.

```
# Verify exact token value with no extra characters
clawhub config get ASANA_ACCESS_TOKEN
```

## Frequently asked questions

### How do I set up Asana integration in OpenClaw?

Generate a personal access token at app.asana.com/-/developer_console. Set it in OpenClaw with `clawhub config set ASANA_ACCESS_TOKEN 1/your-token`. Find your workspace GID by calling `/workspaces` with the token. Add your workspace GID and project GIDs to `~/.openclaw/config.yaml` under `integrations.asana`. Test the connection by calling the `/users/me` endpoint.

### What is the ASANA_ACCESS_TOKEN for OpenClaw?

It is an Asana personal access token (PAT) generated in the Asana Developer Console at app.asana.com/-/developer_console. The token authenticates all Asana API calls as your user account. It starts with `1/` followed by a long alphanumeric string. Unlike some other services, Asana PATs do not have configurable scopes — they grant access to everything your Asana account can access.

### How do I find my Asana project ID for the OpenClaw integration?

Open your Asana project in a browser. The project GID is visible in the URL: `https://app.asana.com/0/{PROJECT_GID}/...`. It is a 16-digit number. You can also call the Asana API at `/projects?workspace=YOUR_WORKSPACE_GID` to list all projects and their GIDs programmatically.

### Why is my Asana OpenClaw integration returning 400 Bad Request?

A 400 on task creation usually means a required field is missing. Asana requires at minimum a task `name` and at least one of `projects`, `workspace`, or `parent` in the request body. Check that your project GID is correct and appears as an array value: `'projects': ['GID']` not `'project': 'GID'`.

### Does RapidDev offer help with Asana OpenClaw integration?

Yes — RapidDev can assist with configuring Asana integration for complex workflow automation, including multi-project synchronization, custom field mapping, and building automated task lifecycle management. The self-serve guide covers standard CRUD operations; teams with advanced project management automation needs can reach out to RapidDev.

### Can OpenClaw create subtasks in Asana?

Yes — Asana subtasks are created using the same `/tasks` endpoint with a `parent` field set to the parent task's GID. The request body includes `parent: 'PARENT_TASK_GID'` instead of (or in addition to) a project GID. Subtasks can also have their own assignees, due dates, and notes just like top-level tasks.

---

Source: https://www.rapidevelopers.com/openclaw-integrations/asana
© RapidDev — https://www.rapidevelopers.com/openclaw-integrations/asana
