Create task comment with the Asana API
Adds a comment to a task, authored by the connected user, and returns it. The text goes inside data.
- Identifier
- asana_create_task_comment
The request
POST https://connect.reportei.com/api/tools/asana_create_task_comment/execute
Authorization: Bearer <merchant token>
x-customer-token: <customer token>
Content-Type: application/json
Accept: application/json
{
"customer_toolkit": "<connection UUID>",
"arguments": {
"task_gid": "<task_gid>",
"data": {}
}
}Your system sends your customer's connection id and the tool arguments. The headers are the same as the rest of the Connect API: your product's token and your customer's token.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| task_gid | string | Yes | Gid of the task, from List tasks. |
| data | object | Yes | The comment. |
Supported connections
Your customer connects their Asana account once, with one of the modes below. The same connection serves every tool of the toolkit.
API key
Your customer pastes the app's key on a Connect screen, or your system sends the key with POST /api/customer-toolkits, with no screen.
OAuth with your product's app
You register your product's OAuth app once, with POST /api/merchants/credentials/asana, and your customer authorizes the account on a consent screen. Connect renews the token when it is about to expire.
The response
On success, Connect preserves the app's response status and body. HTTP errors returned by the app use the {error, api_error} envelope; authentication or validation can fail before execution. The X-Toolkit-Execution-Id header identifies the recorded execution, available at GET /api/tools/executions/{uuid}.
Ready for AI agents
This tool's input is a JSON Schema, available at GET /api/tools/asana_create_task_comment. It becomes your agent's tool definition with no conversion.
Other Asana tools
- List workspacesGETLists the workspaces and organizations the user can see. Use the gid of an item as workspace in the other tools. Send limit to page; the next_page.offset of the response goes in offset.
- List teamsGETLists the teams of an organization that the user can see. A project created in an organization needs the gid of one of them as team.
- List projectsGETLists the projects of a workspace. Only gid and name come back unless opt_fields lists more. Send limit to page; the next_page.offset of the response goes in offset.
- Create projectPOSTCreates a project and returns it. The fields go inside data, which needs name and workspace, plus team when the workspace is an organization.
- Update projectPUTUpdates a project and returns it. Only the fields sent inside data change.
- List tasksGETLists the tasks of a project or section, or the tasks assigned to someone in a workspace. Send project, or section, or assignee together with workspace. Only gid and name come back unless opt_fields lists more. Send limit to page; the next_page.offset of the response goes in offset.
- Get taskGETReturns the full record of one task: name, notes, assignee, dates, completion, projects and custom fields.
- Create taskPOSTCreates a task and returns it. The fields go inside data, which needs workspace, projects or parent; projects and parent already set the workspace. Use due_on for a date or due_at for a date and time, never both.
See Connect applied to your product.
Try it for 15 days with no card, or walk our team through your use case.
