This skill provides a dependency-free Node.js CLI that calls the Asana REST API (v1) using a Personal Access Token (PAT).
{baseDir}/scripts/asana.mjsASANA_PAT (preferred) or ASANA_TOKENASANA_PAT. export ASANA_PAT="..."
skills.entries.asana.apiKey (or env.ASANA_PAT) so the secret is injected only for the agent run.This is the safest way to set the PAT because it keeps secrets out of prompts and ad-hoc shell history.
Recommended (apiKey → ASANA_PAT):
openclaw config set skills.entries.asana.enabled true
openclaw config set skills.entries.asana.apiKey "ASANA_PAT_HERE"
skills.entries.asana.apiKey is a convenience field: for skills that declare metadata.openclaw.primaryEnv, OpenClaw injects apiKey into that env var for the agent run (this skill’s primary env is ASANA_PAT).
Alternative (explicit env):
openclaw config set skills.entries.asana.enabled true
openclaw config set skills.entries.asana.env.ASANA_PAT "ASANA_PAT_HERE"
Verify what is stored:
openclaw config get skills.entries.asana
openclaw config get skills.entries.asana.enabled
openclaw config get skills.entries.asana.apiKey
Remove a stored token:
openclaw config unset skills.entries.asana.apiKey
# or
openclaw config unset skills.entries.asana.env.ASANA_PAT
When a session is sandboxed, skill processes run inside Docker and do not inherit the host environment. In that case, skills.entries.*.env/apiKey applies to host runs only.
Set Docker env via:
agents.defaults.sandbox.docker.env (or per-agent agents.list[].sandbox.docker.env) node {baseDir}/scripts/asana.mjs me
node {baseDir}/scripts/asana.mjs workspaces
node {baseDir}/scripts/asana.mjs set-default-workspace --workspace
When the user provides names (project/task/user), resolve to GIDs using one of:
typeahead --workspace --resource_type project|task|user --query "..." (fast, best default)projects --workspace --all (enumerate)users --workspace --all (enumerate)Avoid guessing a GID when multiple matches exist.
node {baseDir}/scripts/asana.mjs tasks-assigned --assignee me --workspace
node {baseDir}/scripts/asana.mjs tasks-in-project --project
Canonical primitive: search-tasks (supports many filters; preferred over adding narrow “search helper” commands).
One-liner example (search within a project):
node {baseDir}/scripts/asana.mjs search-tasks --workspace
Useful filters:
--assignee me| (maps to assignee.any)--completed true|false--created_at.after / --modified_at.after --due_on.before YYYY-MM-DD / --due_at.before --is_blocked true|false / --is_blocking true|false node {baseDir}/scripts/asana.mjs create-task --workspace
node {baseDir}/scripts/asana.mjs update-task
node {baseDir}/scripts/asana.mjs complete-task
This skill supports the workflows commonly expected from a PM in Asana:
upsert-project-brief)create-status-update)project-blockers, dependencies, dependents) node {baseDir}/scripts/asana.mjs project-brief
node {baseDir}/scripts/asana.mjs upsert-project-brief
node {baseDir}/scripts/asana.mjs create-status-update --parent
node {baseDir}/scripts/asana.mjs status-updates --parent
node {baseDir}/scripts/asana.mjs sections --project
node {baseDir}/scripts/asana.mjs create-section --project
Command: add-task-to-project
Calls POST /tasks/{task_gid}/addProject and supports optional section placement and ordering.
Examples:
node {baseDir}/scripts/asana.mjs add-task-to-project
With section + ordering:
node {baseDir}/scripts/asana.mjs add-task-to-project
(--section, --insert_before, and --insert_after are optional; when provided they are passed through in the request body.)
Command: remove-task-from-project
Calls POST /tasks/{task_gid}/removeProject.
Example:
node {baseDir}/scripts/asana.mjs remove-task-from-project
Custom fields are critical for reliable PM automation.
node {baseDir}/scripts/asana.mjs project-custom-fields
node {baseDir}/scripts/asana.mjs custom-field
node {baseDir}/scripts/asana.mjs update-task
Notes:
Asana rich text fields are XML-valid HTML fragments wrapped in a root element. The API rejects invalid XML or unsupported tags.
Key points:
html_notes for task descriptions.html_text for comments/stories and status updates. and
; prefer literal newlines (\n) and
separators. (or a self-closing ).Creating a mention link does not guarantee notification delivery if the user is not already assigned or following.
For reliable pings, do one of:
This skill supports the “add follower + wait” pattern:
node {baseDir}/scripts/asana.mjs comment
Plain text comments (--text) do not create real @-mentions via the API; they remain plain text.
node {baseDir}/scripts/asana.mjs upload-attachment --parent
node {baseDir}/scripts/asana.mjs append-inline-image --attachment
Asana does not provide a single universal “inbox” API for all notifications. The closest stable primitive is the Events endpoint scoped to a specific resource (project, task, etc.).
Use:
events --resource to pull incremental changes on a project (or a user's "My Tasks" project) node {baseDir}/scripts/asana.mjs shift-task-dates
node {baseDir}/scripts/asana.mjs shift-project-tasks --project
Run with --dry_run true first, then re-run with --dry_run false.
共 1 个版本