Asana
Read and create Asana tasks, projects, and workspaces from
InTouch jobs and the AI assistant. Wraps the Asana REST API
(https://app.asana.com/api/1.0) using the Python standard library only — no
external dependencies.
Operations
| operation | What it does | Asana endpoint | Required inputs |
|---|---|---|---|
me |
Get the authenticated user | GET /users/me |
apiKey |
list-workspaces |
List your workspaces/organizations | GET /workspaces |
apiKey |
list-projects |
List projects in a workspace | GET /projects?workspace=… |
apiKey, workspace |
list-tasks |
List tasks | GET /tasks?project=… or ?assignee=…&workspace=… |
apiKey, then project or (assignee + workspace) |
get-task |
Get one task by gid | GET /tasks/{task_gid} |
apiKey, task |
create-task |
Create a task | POST /tasks with {"data": {...}} |
apiKey, name, and project or workspace |
All Asana responses are wrapped in a {"data": ...} envelope; this tool
unwraps that and returns the inner payload as the result output (a JSON
string). status carries the HTTP status code. On a 4xx/5xx the raw error
body is returned in result and an error key is added.
Inputs
| input | required | notes |
|---|---|---|
apiKey |
yes | Personal Access Token, sent as Authorization: Bearer <token>. |
operation |
yes | One of the operations above. |
workspace |
depends | Workspace/organization gid. |
project |
depends | Project gid (filter tasks / place a new task). |
assignee |
no | Assignee gid or me (filter tasks / assign a new task). |
task |
depends | Task gid (for get-task). |
name |
depends | Task title (for create-task). |
notes |
no | Task description (for create-task). |
limit |
no | Page size, 1–100, for list operations. |
Getting the apiKey
- Sign in to Asana and open My Settings → Apps (or go to https://app.asana.com/0/my-apps).
- Under Personal access tokens, click Create new token.
- Name the token and copy the value — it is shown only once.
- Use it as the
apiKeyinput. It authenticates as your Asana user with your full access, so treat it like a password.
Usage examples
1. List the tasks in a project
operation: list-tasks
apiKey: 1/1234567890:abcdef0123456789abcdef0123456789
project: 1209876543210987
limit: 50
Returns the compact task records (gid + name) for that project as the result
JSON string.
2. Create a task assigned to yourself in a workspace
operation: create-task
apiKey: 1/1234567890:abcdef0123456789abcdef0123456789
workspace: 1122334455667788
name: Follow up with the design vendor
notes: Confirm revised quote and lead time before Friday.
assignee: me
Returns the newly created task record (including its gid) as the result.
Notes
- Standard library only (
urllib,json,urllib.parse). Never importsrequests. - Response bodies are capped at ~5 MB.
- Transport failures (DNS, connection refused, timeout) exit non-zero so the job step is marked FAILED; HTTP 4xx/5xx are returned with the status so the caller can inspect them.