Thanks @abass, very kind of you. I have used APIs with other platforms for years, but yes… the Asana API use seems to be “next level” from a technical perspective. I can now see all the options I should be seeing, and have added all the fields as per the screenshots - but have hit a snag now at the Authorisation Header, and researching how to create my own specific API
Ok I’m SO close. I created a PAT (first time, go me), added it to the Authorized header, but now getting an error message “The app returned schedule_dates requires including dates in the duplication”.
I figured this was like what paulminors was experiencing… so I added both a Due Date and a Start Date to a task, but I’m getting the same error. Not sure what the problem is now, unless it’s just a timing issue.
What you can do is simply delete the “schedule_date” field from the webhook itself. It’s not a field that you exactly need unless you’re heavily using dates in the template
Thanks for putting this together. I keep getting this error and I can’t find any documentation to explain it. Do you know what this means / how to fix it?
Not sure, sorry – I haven’t used Asana’s API for individual task duplication before. Maybe just have a “search task” step and then a “create task” step and then map in all of the variable fields from the task you’re looking to duplicate? While not efficient, should be a less technical solution.
Although when adding “Assignee” with the user GID it does not assign it to said user.
Perhaps it’s not possible to add certain fields during creation and instead the task must be updated…
No, that’s not what that post was saying. You can set the Assignee when you create a new task, so something else is going on in your case.
EDIT:
Ah, wait, I see you’re talking specifically about the “duplicate task” functionality. Hmm, not sure about that. @Ross_Grambo, can you not set assignee when duplicating a task? (That would seem like an odd omission if you cannot…)
Not in a single call per se, but you can use the Batch API to essentially accomplish what you want. It’s technically multiple calls but you’re submitting them all at once as one request and they can run in parallel.
Hey Man, your solution is perfect for me. But I seem to be stuck getting the API key that you have blurred out. how to I get the API key. or that URL?
Cheers
The blurred-out part of the URL is just the gid (unique id) of the project or task you’re wanting to duplicate.
(Side note to folks in general: it’s actually not necessary to blur out gids here in the forum, because without the proper authorization, they can’t be accessed by anyone else reading the post.)