Add Comment
Adds a story to a task. This endpoint currently only allows for comment stories to be created. The comment will be authored by the currently authenticated user, and timestamped when the server receives the request.
Returns the full record for the new story added to the task.
Parameters
Parameter | Description |
---|---|
Pin Comment | When checked, the comment will be pinned on the task. |
Sticker Name | Adds the selected sticker to the comment. |
Task ID | The task to operate on. |
Text | The text of the comment to add. |
Example Output
{
"data": {
"assignee": {
"gid": "12345",
"name": "Greg Sanchez",
"resource_type": "task"
},
"created_at": "2012-02-22T02:06:58.147Z",
"created_by": {
"gid": "12345",
"name": "Greg Sanchez",
"resource_type": "task"
},
"custom_field": {
"date_value": {
"date": "2024-08-23",
"date_time": "2024-08-23T22:00:00.000Z"
},
"display_value": "blue",
"enabled": true,
"enum_options": [
{
"color": "blue",
"enabled": true,
"gid": "12345",
"name": "Low",
"resource_type": "task"
}
],
"enum_value": {
"color": "blue",
"enabled": true,
"gid": "12345",
"name": "Low",
"resource_type": "task"
},
"gid": "12345",
"multi_enum_values": [
{
"color": "blue",
"enabled": true,
"gid": "12345",
"name": "Low",
"resource_type": "task"
}
],
"name": "Status",
"number_value": 5.2,
"resource_subtype": "text",
"resource_type": "task",
"text_value": "Some Value",
"type": "*Deprecated: new integrations should prefer the resource_subtype field.* The type of the custom field. Must be one of the given values.\n"
},
"dependency": {
"gid": "12345",
"name": "Bug Task",
"resource_subtype": "default_task",
"resource_type": "task"
},
"duplicate_of": {
"gid": "12345",
"name": "Bug Task",
"resource_subtype": "default_task",
"resource_type": "task"
},
"duplicated_from": {
"gid": "12345",
"name": "Bug Task",
"resource_subtype": "default_task",
"resource_type": "task"
},
"follower": {
"gid": "12345",
"name": "Greg Sanchez",
"resource_type": "task"
},
"gid": "12345",
"hearted": false,
"hearts": [
{
"gid": "12345",
"user": {
"gid": "12345",
"name": "Greg Sanchez",
"resource_type": "task"
}
}
],
"html_text": "\u003cbody\u003eThis is a comment.\u003c/body\u003e",
"is_editable": false,
"is_edited": false,
"is_pinned": false,
"liked": false,
"likes": [
{
"gid": "12345",
"user": {
"gid": "12345",
"name": "Greg Sanchez",
"resource_type": "task"
}
}
],
"new_approval_status": "approved",
"new_dates": {
"due_at": "2019-09-15T02:06:58.158Z",
"due_on": "2019-09-15",
"start_on": "2019-09-14"
},
"new_enum_value": {
"color": "blue",
"enabled": true,
"gid": "12345",
"name": "Low",
"resource_type": "task"
},
"new_multi_enum_values": [
{
"color": "blue",
"enabled": true,
"gid": "12345",
"name": "Low",
"resource_type": "task"
}
],
"new_name": "This is the New Name",
"new_number_value": 2,
"new_resource_subtype": "milestone",
"new_section": {
"gid": "12345",
"name": "Next Actions",
"resource_type": "task"
},
"new_text_value": "This is the New Text",
"num_hearts": 5,
"num_likes": 5,
"old_approval_status": "pending",
"old_dates": {
"due_at": "2019-09-15T02:06:58.158Z",
"due_on": "2019-09-15",
"start_on": "2019-09-14"
},
"old_enum_value": {
"color": "blue",
"enabled": true,
"gid": "12345",
"name": "Low",
"resource_type": "task"
},
"old_multi_enum_values": [
{
"color": "blue",
"enabled": true,
"gid": "12345",
"name": "Low",
"resource_type": "task"
}
],
"old_name": "This was the Old Name",
"old_number_value": 1,
"old_resource_subtype": "default_task",
"old_section": {
"gid": "12345",
"name": "Next Actions",
"resource_type": "task"
},
"old_text_value": "This was the Old Text",
"previews": [
{
"fallback": "Greg: Great! I like this idea.\\n\\nhttps//a_company.slack.com/archives/ABCDEFG/12345678",
"footer": "Mar 17, 2019 1:25 PM",
"header": "Asana for Slack",
"header_link": "https://asana.comn/apps/slack",
"html_text": "\u003cbody\u003eGreat! I like this idea.\u003c/body\u003e",
"text": "Great! I like this idea.",
"title": "Greg",
"title_link": "https://asana.slack.com/archives/ABCDEFG/12345678"
}
],
"project": {
"gid": "12345",
"name": "Stuff to buy",
"resource_type": "task"
},
"resource_subtype": "comment_added",
"resource_type": "task",
"source": "web",
"sticker_name": "dancing_unicorn",
"story": {
"created_at": "2012-02-22T02:06:58.147Z",
"created_by": {
"gid": "12345",
"name": "Greg Sanchez",
"resource_type": "task"
},
"gid": "12345",
"resource_subtype": "comment_added",
"resource_type": "task",
"text": "marked today"
},
"tag": {
"gid": "12345",
"name": "Stuff to buy",
"resource_type": "task"
},
"target": {
"gid": "12345",
"name": "Bug Task",
"resource_subtype": "default_task",
"resource_type": "task"
},
"task": {
"gid": "12345",
"name": "Bug Task",
"resource_subtype": "default_task",
"resource_type": "task"
},
"text": "This is a comment.",
"type": "comment"
}
}
Workflow Library Example
Add Comment with Asana and Send Results Via Email
Preview this Workflow on desktop