Batch assign tasks to a designated "role" per project

I have preset project templates defined in a Google Sheet, and when I need to create a project, I have some script set up to pull those tasks, apply due dates, assignees, etc. accordingly and send the info to Asana. Some of these tasks are always assigned to the same user, but some need to be changed based on the project.

For example: I’m in real estate, and each project is representative of one property that we are selling. For each transaction, there’s always the same marketing person, admin, operations person, and so on. However, with each transaction the Real Estate Agent that is working the deal will differ. In my Google Sheet, I have the templates set up with a “Role” column as the assignee for each task. For the ones that are assigned to “Marketing” or “Operations” it’s as simple as cross referencing with an object storing the person assigned to each role and using their email to assign the tasks in Asana.

However, since the “Agent” assigned tasks can not just be sent to the same person every time, I need to figure out a way to make that flexible. One obvious way is to pass the agent’s email into the function as a parameter, but I don’t like that. Ideally, I want a “Role List” in my Asana project where I can change the user assigned to each role and assign tasks accordingly. I know in the Overview tab of projects there is a Project roles section where you can type in an open-ended role for each user assigned to the project, so my current thought is to initially set up all of my “Agent” tasks in the project with no assignee, but instead a custom field called “Role” that just shows “Agent.” From the overview screen, when somebody is given the role of “Agent” my script would then detect this and comb through each of those tasks, assigning anything with the “Agent” tag to the user specified on the overview screen.

This just seems rather convoluted with a lot of API calls back and forth, am I overlooking a simpler solution here?

You can’t access the roles given in the overview from the API, so you would need to find another way of giving this information to your script…

1 Like

Hi there!

Thanks for sharing your feedback with us. I’m happy to share we’re rolling out Variable Assignees in Templates!

With Variable Assignees in Templates, you’ll be able to create a project role in your template and assign tasks to a project role, giving your team guidance when they use the template.

How does it work?
To add a project role in templates, convert a project into a template/edit an existing template and you’ll see “Project roles” in the left hand side bar to add different project roles.

When you’re ready to kick off your project, you’ll be prompted to set an assignee for each project role

When?
This feature has already begun rolling out in stages!

Hi @Erfaan_Arif,

Can you tell us if this new feature will be supported in the API, and how? Thanks!