Start with the why
Trying to automate some of the support work, it would be useful to have an LLM automatically assign the incoming email to the person most suitable for it (eg. support request → support lead, purchase orders → business lead, etc.).
Move to what
For that, we would need to have API to assign a conversation to a specific user. In docs (Update or restore threads) it seems like you can only open/close thread or delete it, but not assign it to a specific person. I tried below but it doesn’t work.
def assign_thread_to(thread_id: str, asignee_id: str) :
dic = {
‘assignedTo’: asignee_id
}
return send_req(‘PATCH’, f’/conversations/v3/conversations/threads/{thread_id}', data=json.dumps(dic))
Returns
{“status”:“error”,“message”:“Failed to update object. The body of the request is empty.”,“correlationId”:“[some_id]”,“category”:“VALIDATION_ERROR”,“subCategory”:“ConversationsApiError.EMPTY_UPDATE_REQUEST_BODY”}
So this might be more of a feature request. It would be PITA to develop a selenium webdriver that scraps/interacts with the hubspot webapp, but it might be the only path if you want to have full access, which is unfortunate.