try { board_id = "<Your board ID>"; //info work_order; evdate = ""; Due_Date = work_order.get("Due_Date"); if(!Due_Date.isNull() && !Due_Date.isEmpty()) { evdate = Due_Date; } else { predate1 = work_order.get("Preference").get("Preferred_Date_1"); if(!predate1.isNull() && !predate1.isEmpty()) { evdate = predate1; } else { predate2 = work_order.get("Preference").get("Preferred_Date_2"); if(!predate2.isNull() && !predate2.isEmpty()) { evdate = predate2; } else { evdate = ""; } } } info evdate; wo_name = work_order.get("Name"); summary_name = work_order.get("Summary"); header_data = Map(); header_data.put("Authorization","<API Token>"); header_data.put("Content-Type","application/json"); Territory_name = work_order.get("Territory").get("name").toString(); info Territory_name; if(evdate != "") { event = {"query":"mutation {create_item (board_id:" + board_id + "item_name: \"" + wo_name + "\", column_values: \"{\\\"date\\\":\\\"" + evdate + "\\\", \\\"text\\\":\\\"My Text\\\"}\") {id}}"}; info event; response = invokeurl [ url :"https://api.monday.com/v2" type :POST parameters:event headers:header_data ]; info response; item_id = response.toMap().get("data").toMap().get("create_item").get("id"); data = {"query":"mutation {change_multiple_column_values(item_id:" + item_id + ", board_id:" + board_id + ", column_values: \"{\\\"date\\\" : {\\\"date\\\" : \\\"" + evdate + "\\\", \\\"time\\\" : \\\"18:00:00\\\"}}\") {id}}"}; info data; response = invokeurl [ type :POST parameters:data headers:header_data ]; info response; } else { sendmail [ from :zoho.adminuserid to :zoho.adminuserid subject :"Event is Not created" message :" Date field is Mandatory for event creation" ] } } catch (e) { info e; sendmail [ from :zoho.adminuserid to :zoho.adminuserid subject :"Event is Not created" message :e ] } |
Learn how to use the best tools for sales force automation and better customer engagement from Zoho's implementation specialists.
If you'd like a personalized walk-through of our data preparation tool, please request a demo and we'll be happy to show you how to get the best out of Zoho DataPrep.
You are currently viewing the help pages of Qntrl’s earlier version. Click here to view our latest version—Qntrl 3.0's help articles.