How to Create Projects in Asana
This article describes how to create projects in Asana from the remote system during synchronization.
Projects in Asana: Projects can be created as empty projects or from existing templates. Template-based creation preserves custom fields, sections, and project structure.
Create basic project
To create a simple project without a template:
// Set entity type to project
entity.type = nodeHelper.getIssueType("project")
// Set basic project properties
entity.summary = replica.summary
entity.description = replica.description
Create project from template
To create a project based on an existing Asana template:
// Set entity type to project
entity.type = nodeHelper.getIssueType("project")
// Specify the template to use
def templateField = new com.exalate.basic.domain.hubobject.v1.BasicHubCustomField()
templateField.setName("asana_template_gid")
templateField.setUid("asana_template_gid")
templateField.setValue("1211146120132968") // Your template GID
entity.customFields["asana_template_gid"] = templateField
// Set project properties
entity.summary = replica.summary
entity.description = replica.description
Find template GID
To find the GID of a project template:
- Open the template in Asana
- Look at the URL in your browser
- The template GID is the long number in the URL
URL Format: Template URLs look like
https://app.asana.com/0/1211146120132968/overview
where 1211146120132968
is the template GID.Important: Template-based project creation is asynchronous and may take 5-25 seconds depending on template complexity.
More information
Have more questions? Ask the community