Duplicate Custom Project Template with Zapier

Totally agree! This is desperately needed!

Hi @Billy_Rickman and welcome to the forum!

This is actually easy to do now with my Flowsana integration - see the Auto-create a new project from a template section of this forum post:

Basically what you would do is use Zapier to trigger any of the Flowsana rule conditions - creating a new task, or adding a particular tag to a task, for example - and then that rule condition will trigger the Auto-create a new project from a template rule action.

Hi All,

I need to have more than one form/template for the different projects/sections. Does anyone know if this is possible? For what I can see we can just have one Form within Asana.

With Flowsana is not possible either.

Thanks!

Asana currently doesn’t support more than one form per project. You can vote for an enhancement to allow multiple forms in a project here:

If I could do it in Flowsana (I’m the author), I would, but Asana’s programming interface doesn’t provide the means to get past the one-form-per-project limitation.

Thanks a lot Phil! And congrats for Flowsana! :clap:

1 Like

Agreed! Having the ability for Zapier to duplicate an existing Asana project would be amazing!

To our business, Asana’s value is derived from our ability to replicate projects that replicate actions consistently and without mistakes. We don’t need to “re-invent the wheel” each time.

Thanks!

We absolutely need this!!! We are using Zapier-> Asana to create projects and can’t use Asana unless templates are created automatically.

As far as I can tell there is nothing special about the template other than that it shows as option when creating a new project. Using the duplicate project API is more or less the same thing.

Therefore you can just use the ASANA api for duplicating a project (use the project Id of the template). We just write some basic code in Code by Zapier using input data from our trigger. Instead of choosing ASANA action choose Code by Zapier and write an API command in JavaScript or Python.

https://developers.asana.com/docs/duplicate-a-project

2 Likes

hey Michael would you be willing to share the custom code you have to duplicate a project in Zapier?

Sure. Note that you will need to add info where it says ‘your’. And the input_data is from the input data fields we created.

id=’{your project gid for template}’
due_on=input_data[‘dueOn’]
start_on=input_data[‘startOn’]
team=’{your team where project exists}’
token=’{your api token}’
name=input_data[‘projectname’]
false=‘false’
url=‘https://app.asana.com/api/1.0/projects/’+id+’/duplicate
zc='Bearer '+ token
data = {“data”:
{“include”: [
“members”,
“notes”,
“task_notes”,
“task_assignee”,
“task_subtasks”,
“task_attachments”,
“task_dates”,
“task_dependencies”,
“task_followers”,
“task_tags”,
“task_projects”
],
“name”:name,
“schedule_dates”: {
“should_skip_weekends”: false,
“due_on”: due_on
},
“team”:team
}
}
headers={‘Content Type’:‘application/json’,‘Accept’:‘application/json’,‘Authorization’: zc}
response=requests.post(url, json=data,headers=headers)
return response.json()

2 Likes

Is there any other code you included? I’m getting this error…

Traceback (most recent call last):
File “”, line 31, in the_function
NameError: name ‘false’ is not defined

Code below(token numbers changed):

id=’{11771254812342393}’
token=’{1/21234222307:e4194f808a11653c815c641af049ebb5}’
team=’{117526232307241}’
name=input_data[‘projectname’]
start_on=input_data[‘starton’]
url=‘https://app.asana.com/api/1.0/projects/’+id+’/duplicate
zc='Bearer '+ token
data={“data”:
{“include”: [
“members”,
“notes”,
“task_notes”,
“task_assignee”,
“task_subtasks”,
“task_attachments”,
“task_dates”,
“task_dependencies”,
“task_followers”,
“task_tags”,
“task_projects”
],
“name”: name,
“schedule_dates”: {
“should_skip_weekends”: false,
“start_on”: start_on
},
“team”:team
}
}

headers={‘Content Type’:‘application/json’,‘Accept’:‘application/json’,‘Authorization’: zc}
response=requests.post(url,json=data,headers=headers)
return response.json()

You probably need to remove {} from around input data. I didn’t mean to include those.

I’m trying to do this too, and here is my screenshot of the code:

I’m getting an error of ReferenceError: Invalid left-hand side in assignment when I test it.

@FreshyJon,

I’m sure that issue is coming from

false = 'false’

That has to be an typo in the previous code that you’re working off of.

Yeah, I just noticed that and took it out. It’d now giving me ReferenceError: id is not defined

Ouch, that’s a tougher one - @Michael_Andrew1 might know what’s causing that?

Was able to get this to work by using this method instead:

Though, I do wonder if all of those include are necessary, or which ones are even accurate/valid. I don’t see a full list of options within the API documentation.

1 Like

@FreshyJon, your code worked great! However I tried to amend it recently to include a value for “notes” and for “custom fields”, but neither passed to the duplicate project successfully. Do you know what I might be doing wrong

I still haven’t seen Duplicate Project as an option in Zapier.

Please let me know if this has been fixed as we’re about to switch software if not. Monday.com, Trello, pretty much all the other ones easily allow you to duplicate entire projects through Zapier. Never occurred to me this wasn’t available with Asana.

Hi @Michael_Kittinger and welcome to the forum!

It’s not a built-in option in Zapier; you have to use the Webhooks by Zapier capability to construct it yourself. See this sample Zap to see how to do it.

Or you can use my Flowsana integration to do it much more easily. :slight_smile: