CONNECT APP
Build with Asana
Productivity
- OAuth
MCP
Give your agent Asana tools
Every Asana action is exposed as an MCP tool on Pipedream's remote server. Point a client at it with your end user's ID and Connect resolves that user's Asana account for each tool call — you store no tokens.
// accessToken: mint a short-lived token with the Connect SDK — see the MCP guide
const transport = new StreamableHTTPClientTransport(
new URL("https://remote.mcp.pipedream.net/v3"),
{
requestInit: {
headers: {
Authorization: `Bearer ${accessToken}`,
"x-pd-project-id": "{project_id}",
"x-pd-environment": "production",
"x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
"x-pd-app-slug": "asana",
},
},
},
)
const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)
const { tools } = await mcp.listTools()
// e.g. run Add Task To Section:
const result = await mcp.callTool({
name: "asana-add-task-to-section",
arguments: {
workspace: "Workspace",
project: "Project",
},
})# access_token: mint a short-lived token with the Connect SDK — see the MCP guide
headers = {
"Authorization": f"Bearer {access_token}",
"x-pd-project-id": "{project_id}",
"x-pd-environment": "production",
"x-pd-external-user-id": "{external_user_id}", # any stable ID for this user in your system
"x-pd-app-slug": "asana",
}
async with streamablehttp_client("https://remote.mcp.pipedream.net/v3", headers=headers) as (read, write, _):
async with ClientSession(read, write) as session:
await session.initialize()
tools = await session.list_tools()
# e.g. run Add Task To Section:
result = await session.call_tool("asana-add-task-to-section", {
"workspace": "Workspace",
"project": "Project",
})API PROXY
Call the Asana API directly
For an endpoint with no pre-built tool, the Connect proxy forwards your request to the Asana API with the connected user's credentials attached. You store no tokens and write no refresh logic.
const resp = await pd.proxy.get({
externalUserId: "{external_user_id}", // any stable ID for this user in your system
accountId: "apn_xxxxxxx",
url: "https://app.asana.com/api/1.0/users/me",
})
// Any allowed Asana endpoint works here. Pipedream attaches the
// connected account's credentials to the outgoing request.# The path segment is the target URL, URL-safe base64 encoded:
# https://app.asana.com/api/1.0/users/me
curl "https://api.pipedream.com/v1/connect/{project_id}/proxy/aHR0cHM6Ly9hcHAuYXNhbmEuY29tL2FwaS8xLjAvdXNlcnMvbWU?external_user_id={external_user_id}&account_id=apn_xxxxxxx" \
-H "Authorization: Bearer {access_token}" \
-H "x-pd-environment: production"SDK
Run Asana actions from your backend
Connect a user's Asana account once, then run Add Task To Section on their behalf from your own code — TypeScript, Python, or plain HTTP.
import { PipedreamClient } from "@pipedream/sdk"
const pd = new PipedreamClient({
projectId: process.env.PIPEDREAM_PROJECT_ID!,
clientId: process.env.PIPEDREAM_CLIENT_ID!,
clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
projectEnvironment: "production",
})
const result = await pd.actions.run({
id: "asana-add-task-to-section",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
asana: { authProvisionId: "apn_xxxxxxx" },
workspace: "Workspace",
project: "Project",
},
})from pipedream import Pipedream
pd = Pipedream(
client_id="{oauth_client_id}",
client_secret="{oauth_client_secret}",
project_id="{project_id}",
project_environment="production",
)
result = pd.actions.run(
id="asana-add-task-to-section",
external_user_id="{external_user_id}", # any stable ID for this user in your system
configured_props={
"asana": {"authProvisionId": "apn_xxxxxxx"},
"workspace": "Workspace",
"project": "Project",
},
)curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
-H "Content-Type: application/json" \
-H "X-PD-Environment: production" \
-H "Authorization: Bearer {access_token}" \
-d '{
"external_user_id": "{external_user_id}",
"id": "asana-add-task-to-section",
"configured_props": {
"asana": { "authProvisionId": "apn_xxxxxxx" },
"workspace": "Workspace",
"project": "Project"
}
}'TOOLS
Asana actions
On-demand operations your product or agent can configure and run on behalf of a connected user.
-
Add Task To Section
actionAdd a task to a specific, existing section. This will remove the task from other sections of the project. See the documentationWritev0.2.16 -
Create Project
actionCreate a new project in a workspace or team. See the documentationWritev0.10.9 -
Create Subtask
actionCreates a new subtask and adds it to the parent task. See the documentationWritev0.4.8 -
Create Task
actionCreates a new task. See the documentationWritev0.4.8 -
Create Task Comment
actionAdds a comment to a task. See the documentationWritev0.2.15 -
Create Task from Template
actionCreates a new task from a task template. See the documentationWritev0.0.10 -
Delete Task
actionDeletes a specific and existing task. See the documentationWritev0.0.16 -
Find Task by ID
actionSearches for a task by id. Returns the complete task record for a single task. See the documentationRead-onlyv0.3.0 -
Get list of user projects
actionReturn list of projects given the user and workspace gid. See the documentationRead-onlyv0.6.0 -
Get Portfolio
actionReturns the complete portfolio record for a single portfolio. Use this after List Portfolios to retrieve full portfolio details including custom fields, members, and owner; theoptFieldsprop requests specific properties (e.g.custom_field_settings,members,start_on,due_on). See the documentationRead-onlyv0.0.2 -
Get Tasks From Task List
actionReturns tasks from the user's personal My Tasks inbox — NOT a project task list. Use this when the user asks for 'my tasks', 'my task list', or 'My Tasks'. Only a workspace GID is needed; no project GID required. See the documentationRead-onlyv1.1.1 -
List Organizations Options
actionRetrieves available options for the Organizations field.Read-onlyv0.0.3 -
List Portfolio Items
actionReturns a list of the items (projects) in the given portfolio. Use this after List Portfolios to answer count, timing, and spend questions; the default Opt Fields includecreated_at,start_on,due_on, andcustom_fields. Archived filtering happens client-side because Asana has no server-side filter on this endpoint. See the documentationRead-onlyv0.0.2 -
List Portfolios
actionReturns a list of portfolios in the given workspace owned by the given user. Use this to discover portfolio GIDs before calling Get Portfolio or List Portfolio Items. Owner defaults to the authenticated user; regular API users can only list portfolios they own. See the documentationRead-onlyv0.0.2 -
List Task Stories
actionList stories (including comments) for a task. See the documentationRead-onlyv0.0.6 -
List Teams
actionRetrieves all teams in a specified Asana workspace. Use this action to discover available teams for creating projects, adding team members, or organizing work by department. Requires a workspace GID, which you can obtain from the List Workspaces action. The authenticated user must have access to the workspace; only teams visible to the user are returned. Results are paginated (default 25, max 100 per page); use the returned offset token to fetch additional pages. To include optional fields like description, visibility, or access levels, specify them in Opt Fields. Consider following up with Create Project to create a project under a team, or List Users to find team members. See the documentationRead-onlyv1.0.2 -
List Users
actionRetrieves all users in a specified Asana workspace. Use this action to populate assignee choices for tasks, verify workspace membership, or audit user access. Requires a workspace GID, which you can obtain from the List Workspaces action. The authenticated user must have access to the workspace. Results are paginated; use the returned offset token to fetch additional pages. To include optional fields like email or photo, specify them in Opt Fields. Consider following up with Create Task or Update Task to assign work to the retrieved users. See the documentationRead-onlyv1.0.2 -
List Workspaces
actionList workspaces available to the authenticated Asana account. Use this when you need a workspace GID before running List Teams or other workspace-scoped actions.optFieldscan include optional workspace properties such asemail_domainsandis_organization; leaveoffsetempty for the first page and pass a returned offset token (for example,3:0:abcdef123456) to fetch the next page. See the documentationRead-onlyv1.0.2 -
Search Projects
actionFinds an existing project. See the documentationRead-onlyv0.3.0 -
Search Sections
actionSearches for a section by name within a particular project. See the documentationRead-onlyv0.3.1 -
Search Tasks
actionSearches for a Task by name within a Project. See the documentationRead-onlyv0.5.0 -
Search Tasks Premium
actionSearches for a task by name, assignee, section, project, completed since, and modified since. Requires a Premium Asana account. See the documentationRead-onlyv0.0.5 -
Update Task
actionUpdates a specific and existing task. See the documentationWritev0.4.8
-
New Project Added To Workspace (Instant)
triggerEmit new event for each new project added to a workspace.Instantv0.1.14 -
New Story Added To Project (Instant)
triggerEmit new event for each story added to a project.Instantv0.1.14 -
New Subtask (Instant)
triggerEmit new event for each subtask added to a project.Instantv1.0.14 -
New Completed Task (Instant)
triggerEmit new event for each task completed in a project.Instantv0.1.14 -
New Tag
triggerEmit new event for each tag created in a workspace.v0.0.16 -
New Tag Added To Task (Instant)
triggerEmit new event for each new tag added to a task.Instantv0.1.14 -
New Tags added to any task (Instant)
triggerEmit new event each time a tag is added to any task, optionally filtering by a given set of tags.Instantv0.0.13 -
New Task (Instant)
triggerEmit new event for each task added to a project. See docs hereInstantv0.1.14 -
New Task Assigned in Project (Instant)
triggerEmit new event each time a task is assigned, reassigned or unassigned.Instantv0.1.7 -
New Task Field Updated In Project (Instant)
triggerEmit new event whenever given task fields are updated.Instantv0.0.13 -
New Task Updated In Project (Instant)
triggerEmit new event for each update to a task.Instantv1.1.13 -
New Team
triggerEmit new event for each team added to an organization.v0.1.15 -
New User (Instant)
triggerEmit new event for each user added to a workspace.Instantv0.1.14 -
New Workspace Added
triggerEmit new event each time you add a new workspace/organization.v0.1.15
MULTI-APP
Use Asana with other popular apps
Most products don't stop at one integration. Pair Asana with the other apps your users rely on, and ship use cases that span both.
- App slug
- asana
- Authentication
- OAuth
- Categories
- Productivity
- Actions
- 23
- Triggers
- 14
- API proxy
- Available