[Zoho CRM] Send Email Template Using Deluge in Zoho CRM
This function is used to send email using Zoho CRM email templates. We would have to get the template id by going to the respective template and edit it. In the URL of the edit page, there is a long string of numbers. That is the template id. Please note that this function intends to send an email to the contacts module, but it is created in the deal module. Use case? for example, when a Deal is closed, we want to send an email to the contact. We can use it in workflow, blueprint, or even modify it slightly to be a button.
Also, "zcrm" is the connection name I am using. You can replace it with your own connection name that has the right permissions within Zoho CRM.
- //define template id here. replace it with your own
- templateId = "2700842021110819999";
- //get the contact id from the deal record
- contactId = ifnull(zoho.crm.getRecordById("Deals",dealId).get("Contact_Name").get("id"),"");
- //get the email from the contact record
- contactEmail = ifnull(zoho.crm.getRecordById("Contacts",contactId).get("Email"),"");
- //send mail if email is not null
- if(contactEmail != "")
- {
- data = List();
- datainformation = Map();
- datainformation.put("from",{"email":"youremailhere@domain.com,"username":"your username here"});
- datainformation.put("to",{{"email":contactEmail}});
- datainformation.put("org_email",true);
- datainformation.put("template",{"id":templateId});
- data.add(datainformation);
- mapdata = Map();
- mapdata.put("data",data);
- sendSurvey = invokeurl
- [
- url :"https://www.zohoapis.com/crm/v5/Contacts/" + contactId.toString() + "/actions/send_mail"
- type :POST
- parameters:mapdata.toString()
- connection:"zcrm"
- ];
- info sendSurvey;
- }
Good luck!
Related Articles
[Zoho Accounts] How to Change to a New Email Address
If you accepted an invitation to register a Zoho account using your personal email address and wish to change it to your specific business email address, you can do so by following the steps in this article. 1. Log in to https://accounts.zoho.com and ...
[Zoho CRM] How Do I Send An Email Automatically When A Lead Is Created?
Workflow rules help you automate the process of sending an email to a lead as soon as they are added to CRM. Before you set up the workflow rule, you must create the email template. To do this: Navigate to Setup > Customization > Templates > Email. ...
[Zoho CRM] Cannot receive portal invite in CRM when using same domain email address
Cannot receive portal invite in CRM when using same domain email address When the user tries to invite a contact to the customer portal with an email address sharing the same domain as the superadmin, the system will not allow it and throws this ...
[Zoho CRM] A Comprehensive Guide for Zoho CRM Wizards
Unleashing the Power of Zoho CRM Wizards: A Comprehensive Guide What is CRM Wizards? Zoho CRM Wizards are a powerful tool designed to simplify and enhance the data entry process in Zoho CRM. They enable users to break down lengthy forms into a series ...
[Zoho CRM] Creating A Lead
Leads in Zoho CRM can be created in several ways; Direct creation Import Social media connection (Facebook and Twitter) Zoho Mail integration Zoho Cliq (website ) integration To create directly, click on the '+' icon at the top right of the screen. ...