I'm not able to create tasks from script. Neither of the below are working.
var newlist = Tasks.newTaskList().setTitle("This tasklist is created from script");
var newTask = Tasks.newTask().setTitle("This task has been created from script");
I'm new to Google apps script. What am I doing wrong? I've also added the OAuthApp library. But I'm always getting
ReferenceError: "Tasks" is not defined.
Can someone tell me what I'm doing wrong?