void automation.Send_Ack_Letter_Mail_Merge(Int pop_id) { pop_details = zoho.crm.getRecordById("POP_Requests",pop_id); info "pop_details ==>" + pop_details; Customer_Name = pop_details.get("Customer_Name"); info "Customer_Name ==>" + Customer_Name; Project_owner = pop_details.get("Project"); info "Project_owner ==>" + Project_owner; Project_name = Project_owner.get("name"); info "Project_name ==>" + Project_name; mail_merge_template = Map(); mail_merge_template.put("name","POP Request Template"); from_address = Map(); from_address.put("type","email"); from_address.put("value",zoho.loginuserid); to1 = Map(); to1.put("type","email"); to1.put("value","mumammad.kaleem@leosops.com"); to_address = list(); to_address.add(to1); mail_merge_entry = Map(); mail_merge_entry.put("mail_merge_template",mail_merge_template); mail_merge_entry.put("from_address",from_address); mail_merge_entry.put("to_address",to_address); mail_merge_entry.put("subject","Proof of Payment" + Customer_Name + "-" + Project_name); mail_merge_entry.put("type","attachment"); mail_merge_entry.put("attachment_name","Proof of Payment" + Customer_Name + "-" + Project_name); mail_merge_entry.put("message","Dear Team, Please find attached the Proof of Payment submitted for your reference.The details are as follows"); send_mail_merge = list(); send_mail_merge.add(mail_merge_entry); input_payload = Map(); input_payload.put("send_mail_merge",send_mail_merge); SendEmail = invokeurl [ url :"https://www.zohoapis.com/crm/v8/POP_Requests/" + pop_id + "/actions/send_mail_merge" type :POST parameters:input_payload.toString() connection:"mail_merge" ]; info SendEmail; }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter