Bulk assign all tasks in a project using Asana API

Hi there, I need to perform a bulk assign of all tasks under a project to a specific user and am currently fetching all tasks for a project and then assigning a user to each task individually. Is there an efficient way to perform the same using the API?

1 Like

Hi @Saurabh_Deshmukh and welcome to the forum!

You could do that via the API, but if you’re just wanting to bulk-assign tasks, do you know that you can do it by multi-selecting multiple tasks (using Shift-click) and then from the small widget at the bottom of the screen, click the 3-dots menu and select “Assign”? Will that get you what you’re wanting?

Hi @Phil_Seeman , thanks for your quick response. Yes I tried using multi-select to perform the assignment, but need to do it for many projects and hence needed an automated way, like using the API

OK, no problem, just wanted to make sure you knew about that UI capability.

When you say “am currently fetching all tasks for a project” I’ll assume you mean you’re fetching them programmatically via the API. Then you’re looping through them all, updating the assignee on each one and then writing that task back.

If that’s a correct interpretation (let me know if it’s not, of course), there’s no way to update a set of tasks with one API call; you have to update each one individually.

The one thing you could do is use the Batch API to batch a set of those updates together, since I doubt one update is dependent on another one. So you might want to check that out.

Yes, your understanding of the above is correct. Will check out the Batch API as well.

1 Like