ClickUp API > Create a Task > Custom Field Related to a Task in Another List

Hi. I’m trying to use the Create a Task endpoint when one of the custom fields is related to a task in another list but I always get the same message error! Is it possible to do it like this or just with the Add Task Link endpoint? In this case, I believe the custom field would be useless.

I don’t fully understand what you are trying to do. If you can explain more. But it seems like you are trying to create a task with a custom field that does not exist in the list you are creating the task in. So it will not work.

I have 2 lists: Oportunidade and Pessoa.

I want to create a task in the Oportunidade list and fill in a custom field called Pessoa, a field related to the Pessoa list.

The Oportunidade list id is correct because I can create a task using a custom_field unrelated to any list. The custom field id doesn’t seem incorrect as well. The problem only occurs when the custom field is related to another list.


Screenshot 2024-07-24 112745

How is the field related to the Pessoa list. Does the field only exist in the Pessoa list?

The field exists in the Oportunidade list and its type is Relationship. The records that I can select are in the Pessoa list.

Screenshot 2024-07-24 121143


Screenshot 2024-07-24 121001

You are looking to relate a task yes? The end point you need to call is the custom field it self and the body needs to be only the task you want to relate there.

So this endpoint:

v2/task/{{TASK ID THAT OWNS THE RELATIONSHIP FIELD}}/field/{{FIELD ID}}

and this body:

{"value":{"add":["{{task id to be related}}"],"res":[]}}

3 Likes

Thank you! It works perfectly!!!

1 Like