Custom Function: Create Task through Zoho Mail API

Custom Function: Create Task through Zoho Mail API

I thought it'd be really useful if I could create and manage tasks in Zoho Mail as job transition through Qntrl.

https://www.zoho.com/mail/help/api/post-add-new-task.html

I've setup the connection correctly because any GET requests work fine, but I'm having issues with JSON Parse errors when I try to POST.

  1. task_content = Map();
    task_content.put("title","Task Title");
    task_content.put("assignee","***user id***");

    postNewTask = invokeurl
    [
        url :"https://mail.zoho.com/api/tasks/me"
        type :POST
        parameters: task_content
        connection: "zoho_tasks"
    ];
    info postNewTask;
I get the error: {"data":{"errorCode":"JSON_PARSE_ERROR"},"status":{"code":404,"description":"Invalid Input"}}

But the JSON looks fine to me? ...

  1. {"title":"Task Title","assignee":"***user id***"}