Asana ACTION
Create Subtask
Creates a new subtask and adds it to the parent task. See the documentation
- Action
- Writes data
- OAuth
- SDK
- MCP
IMPLEMENTATION
Call this tool
Connect a user's Asana account once, then configure and run Create Subtask from your backend or agent.
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-create-subtask",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
asana: { authProvisionId: "apn_xxxxxxx" },
workspace: "Workspace",
project: "Project",
},
})
console.log(result)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-create-subtask",
"configured_props": {
"asana": { "authProvisionId": "apn_xxxxxxx" },
"workspace": "Workspace",
"project": "Project"
}
}'// 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()
// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
name: "asana-create-subtask",
arguments: {
workspace: "Workspace",
project: "Project",
},
})SCHEMA
Inputs
Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.
| Property | Type | Description |
|---|---|---|
workspace Workspace | string | Gid of a workspace. Required Dynamic |
project Project | string | List of projects. This field uses the project GID. Required Dynamic |
task_gid Task GID | string | The task GID to operate on. Required Dynamic |
name Name | string | Name of the subtask. This is generally a short sentence fragment that fits on a line in the UI for maximum readability. However, it can be longer. Required |
assignee Assignee | string | Gid of a user. Optional Dynamic |
assignee_section Assignee Section | string | The assignee section is a subdivision of a project that groups tasks together in the assignee's "My Tasks" list. Optional Dynamic |
completed Completed | boolean | True if the task is currently marked complete, false if not. Optional |
due_at Due At | string | The UTC date and time on which this task is due, or null if the task has no due time. This takes an ISO 8601 date string in UTC and should not be used together with due_on. Optional |
due_on Due On | string | The localized date on which this task is due, or null if the task has no due date. This takes a date with YYYY-MM-DD format and should not be used together with due_at. Optional |
followers Followers | string[] | An array of strings identifying users. These can either be the string "me", an email, or the gid of a user. Optional Dynamic |
html_notes HTML Notes | string | The notes of the text with formatting as HTML. Optional |
notes Notes | string | Free-form textual information associated with the task (i.e. its description). Optional |
start_on Start On | string | The day on which work begins for the task , or null if the task has no start date. This takes a date with YYYY-MM-DD format. Optional |
tags Tags | string[] | List of tags. This field uses the tag GID. Optional Dynamic |
REFERENCE
Tool details
Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.
- Registry key
- asana-create-subtask
- Version
- 0.4.8
- App
- Asana
- Authentication
- OAuth
- Read-only
- No
- Destructive
- No
- Open world
- Yes
- Source
- View on GitHub ↗