Trying to add a new task to more than one project, anyone see what I’m doing wrong here? This is with Google Script (JavaScript)
var payload =
{
"team" : "team_ID",
"projects" : ["proj_ID", "proj_ID"],
"assignee" : assignee,
"name" : preTitle + title, // Task title
"html_notes" : "<body>" + body + "</body>",
"due_on" : d.format("Y-m-d"),
"followers" : assignee,
};
var options = { "method" : "post", "payload" : payload, "muteHttpExceptions": true};
options.headers = AuthData();
var response = UrlFetchApp.fetch("https://app.asana.com/api/1.0/tasks/?opt_pretty", options);
I get this error: projects: Not a Long: [Ljava.lang.Object;@48…
Thank you!