Task templates

📘

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

A Compact object reflects the default fields returned after a successful API request. See input/output options to include more fields in the response.

PropertyTypeDescription
gidstringGlobally unique identifier of the resource, as a string.
resource_typestringThe base type of this resource.
namestringThe name of the task template.
{
  "data": [
    {
      "gid": "12345",
      "resource_type": "task",
      "name": "Packing list"
    }
  ]
}

TaskTemplate

PropertyTypeDescription
gidstringGlobally unique identifier of the resource, as a string.
resource_typestringThe base type of this resource.
namestringThe name of the task template.
projectobject | nullThe project that this task template belongs to.
project.gidstringGlobally unique identifier of the resource, as a string.
project.resource_typestringThe base type of this resource.
project.namestringThe name of the project.
templateobjectA "recipe" or "blueprint" of the exact values that the created task will have.
template.namestringTasks instantiated with this template will have this name.
template.task_resource_subtypestringThe subtype of the task that will be created from this template.

default_task milestone_task approval_task
template.descriptionstringDescription of the task that will be created from this template.
template.html_descriptionstringHTML 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.
» {}.gidstringGlobally unique identifier of the resource, as a string.
» {}.resource_typestringThe base type of this resource.
» {}.namestringName 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_oninteger | nullThe number of days after the task has been instantiated on which the task will start.
template.relative_due_oninteger | nullThe number of days after the task has been instantiated on which the task will be due.
template.due_timestring | nullThe 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.
» {}.namestringName of the task that will be created from this template.
» {}.task_resource_subtypestringThe subtype of the task that will be created from this template.

default_task milestone_task approval_task
template.dependents[object]Array of task templates that will depend on the task created from this template.
» {}.namestringName of the task that will be created from this template.
» {}.task_resource_subtypestringThe subtype of the task that will be created from this template.

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
» {}.gidstringGlobally unique identifier of the resource, as a string.
» {}.resource_typestringThe base type of this resource.
» {}.namestringRead-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.
» {}.gidstringGlobally unique identifier of the resource, as a string.
» {}.resource_typestringThe base type of this resource.
» {}.namestringThe name of the file.
» {}.resource_subtypestringThe 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.
» {}.namestringName of the task that will be created from this template.
» {}.task_resource_subtypestringThe subtype of the task that will be created from this template.
template.custom_fields[object]Array of custom fields that will be added to the task created from this template.
template.custom_fields.gidstringGlobally unique identifier of the resource, as a string.
template.custom_fields.resource_typestringThe base type of this resource.
template.custom_fields.namestringThe name of the custom field.
template.custom_fields.resource_subtypestringThe type of the custom field. Must be one of the given values: text enum multi_enum number date people
template.custom_fields.typestringDeprecated: new integrations should prefer the resource_subtype field. The type of the custom field. Must be one of the given values: text enum multi_enum number date people
template.custom_fields.enum_options[object]Conditional. Only relevant for custom fields of type 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.
» {}.gidstringGlobally unique identifier of the resource, as a string.
» {}.resource_typestringThe base type of this resource.
» {}.namestringThe name of the enum option.
» {}.enabledbooleanWhether or not the enum option is a selectable value for the custom field.
» {}.colorstringThe color of the enum option. Defaults to none.
template.custom_fields.enabledbooleanConditional. Determines if the custom field is enabled or not.
template.custom_fields.is_formula_fieldbooleanConditional. This flag describes whether a custom field is a formula custom field.
template.custom_fields.date_valueobject | nullConditional. 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.datestringA string representing the date in YYYY-MM-DD format.
template.custom_fields.date_value.date_timestringA 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_valueobject | nullConditional. Only relevant for custom fields of type enum. This object is the chosen value of an enum custom field.
template.custom_fields.enum_value.gidstringGlobally unique identifier of the resource, as a string.
template.custom_fields.enum_value.resource_typestringThe base type of this resource.
template.custom_fields.enum_value.namestringThe name of the enum option.
template.custom_fields.enum_value.enabledbooleanWhether or not the enum option is a selectable value for the custom field.
template.custom_fields.enum_value.colorstringThe 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.
» {}.gidstringGlobally unique identifier of the resource, as a string.
» {}.resource_typestringThe base type of this resource.
» {}.namestringThe name of the enum option.
» {}.enabledbooleanWhether or not the enum option is a selectable value for the custom field.
» {}.colorstringThe color of the enum option. Defaults to none.
template.custom_fields.number_valuenumber | nullConditional. This number is the value of a number custom field.
template.custom_fields.text_valuestring | nullConditional. This string is the value of a text custom field.
template.custom_fields.display_valuestring | nullA 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_byobjectA user object represents an account in Asana that can be given access to various workspaces, projects, and tasks.
created_by.gidstringGlobally unique identifier of the resource, as a string.
created_by.resource_typestringThe base type of this resource.
created_by.namestringRead-only except when same user as requester. The user’s name.
created_atstringThe time at which this task template was created.
{
  "data": {
    "gid": "12345",
    "resource_type": "task",
    "name": "Packing list",
    "project": {
      "gid": "12345",
      "resource_type": "task",
      "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": "task",
          "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": "task",
          "name": "Greg Sanchez"
        }
      ],
      "attachments": [
        {
          "gid": "12345",
          "resource_type": "task",
          "name": "Screenshot.png",
          "resource_subtype": "dropbox"
        }
      ],
      "subtasks": [
        {
          "name": "Bug Report",
          "task_resource_subtype": "default_task"
        }
      ],
      "custom_fields": [
        {
          "gid": "12345",
          "resource_type": "task",
          "name": "Status",
          "resource_subtype": "text",
          "type": "text",
          "enum_options": [
            {
              "gid": "12345",
              "resource_type": "task",
              "name": "Low",
              "enabled": true,
              "color": "blue"
            }
          ],
          "enabled": true,
          "is_formula_field": false,
          "date_value": {
            "date": "2024-08-23",
            "date_time": "2024-08-23T22:00:00.000Z"
          },
          "enum_value": {
            "gid": "12345",
            "resource_type": "task",
            "name": "Low",
            "enabled": true,
            "color": "blue"
          },
          "multi_enum_values": [
            {
              "gid": "12345",
              "resource_type": "task",
              "name": "Low",
              "enabled": true,
              "color": "blue"
            }
          ],
          "number_value": 5.2,
          "text_value": "Some Value",
          "display_value": "blue"
        }
      ]
    },
    "created_by": {
      "gid": "12345",
      "resource_type": "task",
      "name": "Greg Sanchez"
    },
    "created_at": "2019-01-01T00:00:00.000Z"
  }
}
Asana Home
Asana helps you manage projects, focus on what's important, and organize work in one place for seamless collaboration.
© 2023 Asana, Inc.