Send Email from the zoho crm By The API

Send Email from the zoho crm By The API


Send an Email with Zoho CRM API

 Benefits:-

1. Using this API We can log the Email Record with the respective module.

2. We can track the email status.

3. We can Apply the workflow on this email according to their status like (Open, Click, Sent)

Deluge Code…….

  1. finallist = List();
  2. frommp = Map();
  3. frommp.put("email", zoho.adminuserid);
  4. mp = Map();
  5. mp.put("from", frommp);
  6. tomaplist = List();
  7. tomap = Map();
  8. tomap.put("email", "zohodeveloper456@yopmail.com");
  9. tomaplist.add(tomap);
  10. //…….Multiple Receiver………
  11. tomap1 = Map();
  12. tomap1 .put("email", "Second_User_Email");
  13. tomaplist.add(tomap1 );
  14. mp.put("to", tomaplist);
  15. //..........Get Template Data............
  16. TemplateID = "4655606000009017348";
  17. templatemap = Map();
  18. templatemap.put("id", TemplateID);
  19. mp.put("template", templatemap);
  20. finallist.add(mp);
  21. finalmap = Map();
  22. finalmap.put("data", finallist);
  23. //..........Send Email Zoho CRM API......
  24. Lead_ID = "4655606000009014003";
  25. SendEmail = invokeurl
  26. [
  27. url: "https://www.zohoapis.com/crm/v5/Leads/"+Lead_ID+"/actions/send_mail"
  28. type: POST
  29. parameters: finalmap.toString()
  30. connection:"zcrm"
  31. ];
  32. info SendEmail;

 

Scope will be:- ZohoCRM.send_mail.{module_name}.CREATE
(or) scope=ZohoCRM.send_mail.all.CREATE

Output on Successful Response:-

{"data":[{"code":"SUCCESS","details":{"message_id":"0f9b4cb4b57ed85e6cd184d34a57da934e3c884f3f175bdd64f89291e16ec348"},"message":"Your mail has been sent successfully.","status":"success"}]}


Attach with CRM Record

 

 

Multiple Receipt Email Sample

 

Zoho CRM API Reference Document:-

https://www.zoho.com/crm/developer/docs/api/v5/send-mail.html

 

Thanks & Regards
Piyush Goyal
Zoho Developer || 3+ years Experience
+91-8619164837