(Zapier) API Request to add a Taskbundle into a project

Hello everyone,
currenctly i am working on a workaround for creating a task with subtasks. Unfortunally there is no way to create that in Zapier, only with checklist-items (actually thats too isn´t possible with custom content)

So in the first place i decided to create a taskbundle in awork to just add this bundle to a project. I am not a coder or something so its very difficult for me to understand how to work with API. Trough another entry i was able to use GET /taskbundles

so he return me this list:

Now i wanted to know
A: how to just search for this explicit taskbundle and make the output clearer and
B: to add this taskbundle to the project i just created

Also i dont know what to put in the Query String Parameters and Additional Request Headers. It would be nice if someone could help me to implement my plan.

Thanks!

I am now a step further and find the taskbundle ID. With GET /taskbundles/{taskBundleId}/tasktemplates i could output only this specific taskbundle

Now, how can i add this taskbundle to a project?

In my next step i added another API Request in Zapier and add the bundle with POST /projects/(projectID)/addtaskbundle/(taskbundleID) . But the Request only shows the code 405, which is, i think, a permission issue.

Hey @gustav.klaus

while I will try to help you in a second, could you please continue posting in English (see post „Über die Kategorie“). It ensures you’ll get an answer quickly and allows everyone to follow along, especially those who aren’t fluent in German. Thanks for your understanding!

1 Like

Sure, i also can explain what i did already.

My problem is that Zapier dont support to create a project task with subtasks. So, i created a taskbundle in awork to create a workaround and only add this taskbundle into the project that just was created.

In the first step i was able to search for the taskbundle ID by GET /taskbundles/(taskBundleId)/tasktemplates

In the next step i created another API Request with POST /projects/(projectID)/addtaskbundle/(taskbundleID) but the request just show the code 405 which is, i think, a permission issue.

Thank you.

The /projects/(projectID)/addtaskbundle endpoint requires the TaskBundleId in the request body, not the URL.

I hope this helps.

Okay, i understand, but where and how should i input the TaskBundleId in Zapier?

In the Request Body as a JSON object. It is the last field in your screenshot.

I am sorry if i am just too stupid or smth :smiley: i tried to input it in different ways but it still shows code 405 or 415. Here is how i put it. (i changed the taskbundleId and the projectTemplateId - doesn´t make it more sense if i only put the taskBundleId in? Or are they necessary?


I saw this in the changelog from awork, but cant find it in the list.

Maybe this could help or is it not ready yet?

Hi, in this screenshot the response seems to be cut off. Http Status Code 415 means unsupported media type, so you have to instruct Zapier to send the body as JSON. So you need to add a Request Header with Content-Type and application/json.

I also noticed that you are using the project id as the project template id in the body. I recommend trying only with the taskBundleId and omitting the other ids.

1 Like

The subtasks have been available for over a year now. You can add both subtasks and checklists. But I don’t understand how this is related to your issue.

I just want to find a way to create a project task with subtasks. And adding a taskbundle will do it - because i didnt saw a method to add a subtask natively. The screenshot i posted is from the changelog, but in the awork API List it doesnt show up so i cant look up the codes. If it works with subtasks it also would solve my problem. But i´ll try your last suggestion first. Thank you for your help! I am just not familiar with coding oder APIs so it will take a while for me to understand.

Subtasks can be created like any other task, but with the parent id set to the task it should be shown under. For top-level tasks, the parent id is null.

If i select „Create Project Task in awork“ in Zapier there is no field for parent ID or something like „create subtask“. Thats what i meant. I just can link the task to a specific project not another task. And so i figured i have to use API to do this action.

Anyways, with your suggestion it now worked! :blush:

One last thing: the taskbundle is named generally (XXXX - Neues STARTERPAKET für (Vorname) (Nachname) erstellen). I want it to be individual from the form they filled. Which steps are necessary to change the name of this task?

I think the Zapier Action to create tasks integration has no option to set the parent id, but a custom request can do this.

Glad it worked now!
You would now have to fetch the task that was created by name and use a PUT request to update the name.

I cant find the code in the list, could you please send a screenshot where i can find it what i need? The search doesnt work after i put more than 2 letters…

Not sure I understand the question. Do you want to update the task’s name automatically via Zapier as well? Then you need to fetch the created tasks from the project via a GET /projects/{projectId}/projectTasks, find the task you need in some script or a query param, then get the task id to make a PUT /tasks/{taskId} request with the new name.

Does this help?

I am sure it will work how you say but i think i am just not able to do it … D:
I know what you mean but dont know how to do it. It just output everything and its so much… For now it will work if its just put the bundle in there. Everything else will be edited in awork. I hope someday the feature with adding multiple subtasks will be available in zapier. This would make it much more easier ^^

Anyways thank you very much!

I understand. I think what you’re trying to do can be achieved in Zapier but with custom requests. But it is a bit more complex and might require some scripting, so we typically recommend a custom script for those more complex cases.