Accessing task template endpoints
Task templates are available to all Premium, Business and Enterprise customers. Guests within an organization cannot edit or create task templates.
Task templates make it easy to standardize tasks in your project so you can use those templates to quickly set up the same tasks over and over again. This enables you to create repeatable workflows and saves time, as you don’t have to start from scratch every time you create the same task.
TaskTemplateCompact
Property | Type | Description |
---|---|---|
gid | string | Globally unique identifier of the resource, as a string. |
resource_type | string | The base type of this resource. |
name | string | Name of the task template. |
Example JSON for TaskTemplateCompact
:
{
"gid": "12345",
"resource_type": "task_template",
"name": "Packing list"
}
TaskTemplate
Property | Type | Description |
---|---|---|
gid | string | Globally unique identifier of the resource, as a string. |
resource_type | string | The base type of this resource. |
name | string | Name of the task template. |
project | object | The project that this task template belongs to. |
project.gid | string | Globally unique identifier of the resource, as a string. |
project.resource_type | string | The base type of this resource. |
project.name | string | Name of the project. This is generally a short sentence fragment that fits on a line in the UI for maximum readability. However, it can be longer. |
template | object | The configuration for the task that will be created from this template. |
template.name | string | Name of the task that will be created from this template. |
template.task_resource_subtype | string | The subtype of the task that will be created from this template. Values can be: default_task , milestone_task , approval_task . |
template.description | string | Description of the task that will be created from this template. |
template.html_description | string | HTML description of the task that will be created from this template. |
template.memberships | [object] | Array of projects that the task created from this template will be added to |
template.memberships[] | object | A project represents a prioritized list of tasks in Asana or a board with columns of tasks represented as cards. It exists in a single workspace or organization and is accessible to a subset of users in that workspace or organization, depending on its permissions. |
template.memberships[].gid | string | Globally unique identifier of the resource, as a string. |
template.memberships[].resource_type | string | The base type of this resource. |
template.memberships[].name | string | Name of the project. This is generally a short sentence fragment that fits on a line in the UI for maximum readability. However, it can be longer. |
template.relative_start_on | integer | The number of days after the task has been instantiated on which that the task will start |
template.relative_due_on | integer | The number of days after the task has been instantiated on which that the task will be due |
template.due_time | string | The time of day that the task will be due |
template.dependencies | [object] | Array of task templates that the task created from this template will depend on |
template.dependencies[] | object | |
template.dependencies[].name | string | Name of the task that will be created from this template. |
template.dependencies[].task_resource_subtype | string | The subtype of the task that will be created from this template. Values can be: default_task , milestone_task , approval_task . |
template.dependents | [object] | Array of task templates that will depend on the task created from this template |
template.dependents[] | object | |
template.dependents[].name | string | Name of the task that will be created from this template. |
template.dependents[].task_resource_subtype | string | The subtype of the task that will be created from this template. Values can be: default_task , milestone_task , approval_task . |
template.followers | [object] | Array of users that will be added as followers to the task created from this template |
template.followers[] | object | A user object represents an account in Asana that can be given access to various workspaces, projects, and tasks. |
template.followers[].gid | string | Globally unique identifier of the resource, as a string. |
template.followers[].resource_type | string | The base type of this resource. |
template.followers[].name | string | Read-only except when same user as requester. The user’s name. |
template.attachments | [object] | Array of attachments that will be added to the task created from this template |
template.attachments[] | object | An attachment object represents any file attached to a task in Asana, whether it's an uploaded file or one associated via a third-party service such as Dropbox or Google Drive. |
template.attachments[].gid | string | Globally unique identifier of the resource, as a string. |
template.attachments[].resource_type | string | The base type of this resource. |
template.attachments[].name | string | The name of the file. |
template.attachments[].resource_subtype | string | The service hosting the attachment. Valid values are asana , dropbox , gdrive , onedrive , box , vimeo , and external . |
template.subtasks | [object] | Array of subtasks that will be added to the task created from this template |
template.subtasks[] | object | |
template.subtasks[].name | string | Name of the task that will be created from this template. |
template.subtasks[].task_resource_subtype | string | The subtype of the task that will be created from this template. Values can be: default_task , milestone_task , approval_task . |
template.custom_fields | [object] | Array of custom fields that will be added to the task created from this template |
template.custom_fields[] | object | Custom Fields store the metadata that is used in order to add user-specified information to tasks in Asana. Be sure to reference the custom fields developer documentation for more information about how custom fields relate to various resources in Asana. Users in Asana can lock custom fields, which will make them read-only when accessed by other users. Attempting to edit a locked custom field will return HTTP error code 403 Forbidden . |
template.custom_fields[].gid | string | Globally unique identifier of the resource, as a string. |
template.custom_fields[].resource_type | string | The base type of this resource. |
template.custom_fields[].name | string | The name of the custom field. |
template.custom_fields[].type | string | Deprecated: new integrations should prefer the resource_subtype field. The type of the custom field. Must be one of the given values. Values can be: text , enum , multi_enum , number , date , people . |
template.custom_fields[].enum_options | [object] | Conditional. Only relevant for custom fields of type enum or multi_enum . This array specifies the possible values which an enum custom field can adopt. To modify the enum options, refer to working with enum options. |
template.custom_fields[].enum_options[] | object | Enum options are the possible values which an enum custom field can adopt. An enum custom field must contain at least 1 enum option but no more than 500. You can add enum options to a custom field by using the POST /custom_fields/custom_field_gid/enum_options endpoint. It is not possible to remove or delete an enum option. Instead, enum options can be disabled by updating the enabled field to false with the PUT /enum_options/enum_option_gid endpoint. Other attributes can be updated similarly. On creation of an enum option, enabled is always set to true , meaning the enum option is a selectable value for the custom field. Setting enabled=false is equivalent to “trashing” the enum option in the Asana web app within the “Edit Fields” dialog. The enum option will no longer be selectable but, if the enum option value was previously set within a task, the task will retain the value. Enum options are an ordered list and by default new enum options are inserted at the end. Ordering in relation to existing enum options can be specified on creation by using insert_before or insert_after to reference an existing enum option. Only one of insert_before and insert_after can be provided when creating a new enum option. An enum options list can be reordered with the POST /custom_fields/custom_field_gid/enum_options/insert endpoint. |
template.custom_fields[].enum_options[].gid | string | Globally unique identifier of the resource, as a string. |
template.custom_fields[].enum_options[].resource_type | string | The base type of this resource. |
template.custom_fields[].enum_options[].name | string | The name of the enum option. |
template.custom_fields[].enum_options[].enabled | boolean | Whether or not the enum option is a selectable value for the custom field. |
template.custom_fields[].enum_options[].color | string | The color of the enum option. Defaults to none . |
template.custom_fields[].enabled | boolean | Conditional. Determines if the custom field is enabled or not. |
template.custom_fields[].representation_type | string | This field tells the type of the custom field. Values can be: text , enum , multi_enum , number , date , people , formula , custom_id . |
template.custom_fields[].id_prefix | string | This field is the unique custom ID string for the custom field. |
template.custom_fields[].is_formula_field | boolean | Conditional. This flag describes whether a custom field is a formula custom field. |
template.custom_fields[].date_value | object | Conditional. Only relevant for custom fields of type date . This object reflects the chosen date (and optionally, time) value of a date custom field. If no date is selected, the value of date_value will be null . |
template.custom_fields[].date_value.date | string | A string representing the date in YYYY-MM-DD format. |
template.custom_fields[].date_value.date_time | string | A string representing the date in ISO 8601 format. If no time value is selected, the value of date-time will be null . |
template.custom_fields[].enum_value | object | Conditional. Only relevant for custom fields of type enum . This object is the chosen value of an enum custom field. |
template.custom_fields[].enum_value.gid | string | Globally unique identifier of the resource, as a string. |
template.custom_fields[].enum_value.resource_type | string | The base type of this resource. |
template.custom_fields[].enum_value.name | string | The name of the enum option. |
template.custom_fields[].enum_value.enabled | boolean | Whether or not the enum option is a selectable value for the custom field. |
template.custom_fields[].enum_value.color | string | The color of the enum option. Defaults to none . |
template.custom_fields[].multi_enum_values | [object] | Conditional. Only relevant for custom fields of type multi_enum . This object is the chosen values of a multi_enum custom field. |
template.custom_fields[].multi_enum_values[] | object | Enum options are the possible values which an enum custom field can adopt. An enum custom field must contain at least 1 enum option but no more than 500. You can add enum options to a custom field by using the POST /custom_fields/custom_field_gid/enum_options endpoint. It is not possible to remove or delete an enum option. Instead, enum options can be disabled by updating the enabled field to false with the PUT /enum_options/enum_option_gid endpoint. Other attributes can be updated similarly. On creation of an enum option, enabled is always set to true , meaning the enum option is a selectable value for the custom field. Setting enabled=false is equivalent to “trashing” the enum option in the Asana web app within the “Edit Fields” dialog. The enum option will no longer be selectable but, if the enum option value was previously set within a task, the task will retain the value. Enum options are an ordered list and by default new enum options are inserted at the end. Ordering in relation to existing enum options can be specified on creation by using insert_before or insert_after to reference an existing enum option. Only one of insert_before and insert_after can be provided when creating a new enum option. An enum options list can be reordered with the POST /custom_fields/custom_field_gid/enum_options/insert endpoint. |
template.custom_fields[].multi_enum_values[].gid | string | Globally unique identifier of the resource, as a string. |
template.custom_fields[].multi_enum_values[].resource_type | string | The base type of this resource. |
template.custom_fields[].multi_enum_values[].name | string | The name of the enum option. |
template.custom_fields[].multi_enum_values[].enabled | boolean | Whether or not the enum option is a selectable value for the custom field. |
template.custom_fields[].multi_enum_values[].color | string | The color of the enum option. Defaults to none . |
template.custom_fields[].number_value | number | Conditional. This number is the value of a number custom field. |
template.custom_fields[].text_value | string | Conditional. This string is the value of a text custom field. |
template.custom_fields[].display_value | string | A string representation for the value of the custom field. Integrations that don't require the underlying type should use this field to read values. Using this field will future-proof an app against new custom field types. |
created_by | object | The user who created this task template. |
created_by.gid | string | Globally unique identifier of the resource, as a string. |
created_by.resource_type | string | The base type of this resource. |
created_by.name | string | Read-only except when same user as requester. The user’s name. |
created_at | string (date-time) | The time at which this task template was created. |
Example JSON for TaskTemplate
:
{
"gid": "12345",
"resource_type": "task_template",
"name": "Bug Report Template",
"project": {
"gid": "12345",
"resource_type": "project",
"name": "Stuff to buy"
},
"template": {
"name": "Bug Report",
"task_resource_subtype": "default_task",
"description": "Please describe the bug you found and how to reproduce it.",
"html_description": "Please describe the bug you found and how to reproduce it.",
"memberships": [
{
"gid": "12345",
"resource_type": "project",
"name": "Stuff to buy"
}
],
"relative_start_on": 1,
"relative_due_on": 2,
"due_time": "13:15:00.000Z",
"dependencies": [
{
"name": "Bug Report",
"task_resource_subtype": "default_task"
}
],
"dependents": [
{
"name": "Bug Report",
"task_resource_subtype": "default_task"
}
],
"followers": [
{
"gid": "12345",
"resource_type": "user",
"name": "Greg Sanchez"
}
],
"attachments": [
{
"gid": "12345",
"resource_type": "attachment",
"name": "Screenshot.png",
"resource_subtype": "dropbox"
}
],
"subtasks": [
{
"name": "Bug Report",
"task_resource_subtype": "default_task"
}
],
"custom_fields": [
{
"gid": "12345",
"resource_type": "custom_field",
"name": "Status",
"type": "example string",
"enum_options": [
{
"gid": "12345",
"resource_type": "enum_option",
"name": "Low",
"enabled": true,
"color": "blue"
}
],
"enabled": true,
"representation_type": "number",
"id_prefix": "ID",
"is_formula_field": false,
"date_value": {
"date": "2024-08-23",
"date_time": "2024-08-23T22:00:00.000Z"
},
"enum_value": {
"gid": "12345",
"resource_type": "enum_option",
"name": "Low",
"enabled": true,
"color": "blue"
},
"multi_enum_values": [
{
"gid": "12345",
"resource_type": "enum_option",
"name": "Low",
"enabled": true,
"color": "blue"
}
],
"number_value": 5.2,
"text_value": "Some Value",
"display_value": "blue"
}
]
},
"created_by": {
"gid": "12345",
"resource_type": "user",
"name": "Greg Sanchez"
},
"created_at": "2019-01-01T00:00:00.000Z"
}