Adding a task in Connect using custom app

Adding a task in Connect using custom app

Hello, I am creating a custom app which, upon form submission, posts a message in a channel (working) and creates a task in a board (not working yet). I have created the following custom function to be run upon successful form submission:

  1. headerMap = Map();
  2. headerMap.put("Authorization","Zoho-oauthtoken d92d401c803988c5cb849d0b4215f52");

  3. parameterMap = Map();
  4. parameterMap.put("scopeID","6111000000002008");
  5. parameterMap.put("boardId","6111000000018075");
  6. parameterMap.put("title",input.Student_Name);
  7. parameterMap.put("desc","Year: " + input.Year_field1 + "\nStart Date: " + input.First_Session + "\nTutor: " + input.Tutor + "\nDuration: " + input.Duration + "\nFrequency: " + input.Frequency + "\nLocation: " + input.Location);
  8. parameterMap.put("sectionId","6111000000033433");
  9. parameterMap.put("priority","High");
  10. parameterMap.put("position","1");
  11. parameterMap.put("userIds","7003956628");
  12. parameterMap.put("checkList","Add resources and services fee\nCheck lesson type\nSend contract\nSet up invoicing\nSend contract and invoice message\nConfirm contract signed, card details on file, and invoice paid");

  13. createTask = invokeurl
  14. [
  15. url :"https://connect.zoho.com/pulse/api/addTask"
  16. type :POST
  17. parameters:parameterMap
  18. headers:headerMap
  19. connection:"taskcreation"
  20. ];
  21. info createTask;

Nothing seems to be happening and I'm not sure why as the info function doesn't seem to do anything so I can't see what the error might be. I have tried taking out the optional parameters and just keeping it simple but still no luck in getting a task created.

I am also not sure how to format the parameter for checkList, for now I've put a "\n" between each item, but there were no examples I could find on how to separate each item for the checklist.

Any help would be greatly appreciated. Thanks!