Extension pointers for integrating Zoho CRM with Zoho products #4: Handle and keep track of your Zoho Mail for deals within Zoho CRM

Extension pointers for integrating Zoho CRM with Zoho products #4: Handle and keep track of your Zoho Mail for deals within Zoho CRM

Regular email communication with Zoho CRM contacts, before or after signing or closing a deal, is a key component of effective customer relationship management. Having a separate section within the record page in Zoho CRM for emails associated with a specific deal makes it simple and easy to check the respective email data and set up further follow-ups.

In this post, we'll take a look at how to integrate Zoho Mail with Zoho CRM.

Consider the following scenario: A sales representative successfully closes and wins a deal. For the deal to close successfully, multiple emails will have been exchanged, along with several other emails in the future. Having all of the emails received from the deal's contact in your Zoho CRM as a related list in your deal's record can help you manage this data better.

Creating a connector for Zoho Mail and adding connector APIs
  • Create a new connector in your extension for Zoho Mail using the Connectors feature under Utilities in the left panel of the Zoho Developer console. 
Note: Zoho Mail follows OAuth2.0 protocols for authentication. You can refer to this post to better understand the steps to register Zoho Desk and retrieve your client credentials.

                                    

The connector details for our example are:
  • Add the necessary connector APIs for your functionality. Please refer to the Zoho Mail API guide for details. 
                                    
The Zoho Mail APIs added for our example are mentioned below.

Note: You can refer to this post to learn about the detailed steps involved in creating a connector, adding the connector APIs, and associating it with the extension.

Creating a related list and associating a function to it

Create a related list called "Related mails" using the Related details option present in the Components feature available in the Build section of the Zoho Developer console, then associate a function to perform the desired action.

Related mails - Related list code snippet

//Retrieving the deal record and fetching the deal name, contact name and contact ID
response = zoho.crm.getRecordById("Deals",deal.get("Deals.ID").toLong());
dealname = response.get("Deal_Name");
dealname = dealname.trim().toUpperCase();
dealname = replaceAll(dealname," ","_");
contact = response.get("Contact_Name");
id = contact.get("id");
// Retrieving the email ID of the contact associated with the deal by passing the id retrieved
response1 = zoho.crm.getRecordById("Contacts",id);
email = response1.get("Email");
dynamic_map = Map();
// Invoking the get account details API to fetch the account ID
response2 = zoho.crm.invokeConnector("jssdkextension.zohomail.getaccountsdetails",dynamic_map);
resp = response2.get("response");
data = resp.get("data");
for each item in data
{
zuid = item.get("zuid");
info zuid;
accountid = item.get("accountId");
info accountid;
}
dynamic_map = Map();
dynamic_map.put("accountId",accountid);
dynamic_map.put("emailid",email);
dynamic_map.put("dealname",dealname);
// Invoking the search results API to get the emails associated with the deal and contact of the deal
response3 = zoho.crm.invokeConnector("jssdkextension.zohomail.searchresults",dynamic_map);
info response3;
responsedata1 = response3.get("response");
data1 = responsedata1.get("data");
info data1;
// Constructing the related list
resp = "";
count = 1;
recordsXmlStr = "<record>";
for each value in data1
{
recordsXmlStr = recordsXmlStr + "<row no='" + count + "'>";

recordsXmlStr = recordsXmlStr + "<FL val='Subject'>" + value.get("subject") + "</FL>";
recordsXmlStr = recordsXmlStr + "<FL val='Summary'>" + value.get("summary") + "</FL>";
recordsXmlStr = recordsXmlStr + "<FL val='Sender'>" + value.get("sender") + "</FL>";
recordsXmlStr = recordsXmlStr + "</row>";
count = count + 1;
}
recordsXmlStr = recordsXmlStr + "</record>";
resp = resp + recordsXmlStr;
return resp;

  • The deal record details are fetched using the getRecord API and the deal name along with the contact name is retrieved from it. Similarly, the contact ID is passed to the getRecord API for the contacts module from which the contact's email ID is retrieved.
  • The account ID is also retrieved by invoking the get account details API.
  • This account ID is passed to the search results API along with the deal name and the email ID retrieved which are the search criteria for the mails to be filtered and displayed as a related list.
Now let's see a sample output of how this functionality works.

When a deal record is opened, the emails in the Zoho Mail account having the sender as the deal's contact's email address, and the deal name as a part of the mail are fetched and displayed as a related list.



This way you can integrate Zoho CRM with Zoho Mail, and the functionality can be enhanced based on your business requirements.

We hope you find this information useful. Keep following this space for more tips and recommendations!


SEE ALSO

    Access your files securely from anywhere

        All-in-one knowledge management and training platform for your employees and customers.







                              Zoho Developer Community




                                                    • Desk Community Learning Series


                                                    • Digest


                                                    • Functions


                                                    • Meetups


                                                    • Kbase


                                                    • Resources


                                                    • Glossary


                                                    • Desk Marketplace


                                                    • MVP Corner


                                                    • Word of the Day


                                                    • Ask the Experts



                                                              • Sticky Posts

                                                              • Kaizen #198: Using Client Script for Custom Validation in Blueprint

                                                                Nearing 200th Kaizen Post – 1 More to the Big Two-Oh-Oh! Do you have any questions, suggestions, or topics you would like us to cover in future posts? Your insights and suggestions help us shape future content and make this series better for everyone.
                                                              • Kaizen #226: Using ZRC in Client Script

                                                                Hello everyone! Welcome to another week of Kaizen. In today's post, lets see what is ZRC (Zoho Request Client) and how we can use ZRC methods in Client Script to get inputs from a Salesperson and update the Lead status with a single button click. In this
                                                              • Kaizen #222 - Client Script Support for Notes Related List

                                                                Hello everyone! Welcome to another week of Kaizen. The final Kaizen post of the year 2025 is here! With the new Client Script support for the Notes Related List, you can validate, enrich, and manage notes across modules. In this post, we’ll explore how
                                                              • Kaizen #217 - Actions APIs : Tasks

                                                                Welcome to another week of Kaizen! In last week's post we discussed Email Notifications APIs which act as the link between your Workflow automations and you. We have discussed how Zylker Cloud Services uses Email Notifications API in their custom dashboard.
                                                              • Kaizen #216 - Actions APIs : Email Notifications

                                                                Welcome to another week of Kaizen! For the last three weeks, we have been discussing Zylker's workflows. We successfully updated a dormant workflow, built a new one from the ground up and more. But our work is not finished—these automated processes are


                                                              Manage your brands on social media



                                                                    Zoho TeamInbox Resources



                                                                        Zoho CRM Plus Resources

                                                                          Zoho Books Resources


                                                                            Zoho Subscriptions Resources

                                                                              Zoho Projects Resources


                                                                                Zoho Sprints Resources


                                                                                  Qntrl Resources


                                                                                    Zoho Creator Resources



                                                                                        Zoho CRM Resources

                                                                                        • CRM Community Learning Series

                                                                                          CRM Community Learning Series


                                                                                        • Kaizen

                                                                                          Kaizen

                                                                                        • Functions

                                                                                          Functions

                                                                                        • Meetups

                                                                                          Meetups

                                                                                        • Kbase

                                                                                          Kbase

                                                                                        • Resources

                                                                                          Resources

                                                                                        • Digest

                                                                                          Digest

                                                                                        • CRM Marketplace

                                                                                          CRM Marketplace

                                                                                        • MVP Corner

                                                                                          MVP Corner









                                                                                            Design. Discuss. Deliver.

                                                                                            Create visually engaging stories with Zoho Show.

                                                                                            Get Started Now


                                                                                              Zoho Show Resources

                                                                                                Zoho Writer

                                                                                                Get Started. Write Away!

                                                                                                Writer is a powerful online word processor, designed for collaborative work.

                                                                                                  Zoho CRM コンテンツ




                                                                                                    Nederlandse Hulpbronnen


                                                                                                        ご検討中の方




                                                                                                                • Recent Topics

                                                                                                                • CRM Cadences recognise auto-responses

                                                                                                                  I have leads in a Cadence. I get an auto-responder reply "I'm out of the office..." Normally Cadences seems to know that isn't a real reply and keeps the lead enrolled in the cadence. However, today, Cadences has UNENROLLED a Lead who sent an auto-reponse
                                                                                                                • I need to Record Vatable amount and non vatable amount separately in zoho books in a single line

                                                                                                                  I need to Record Vatable amount and non vatable amount separately in zoho books in a single line give me the customisation option and in invoice copy to customer the total amount should be inclusive 5%vat and no need to show the vatable and non vatable
                                                                                                                • Sort Legend & stacked bar chart by value

                                                                                                                  I'd love to see an option added to sort the legend of graphs by the value that is being represented. This way the items with the largest value in the graph are displayed top down in the legend. For example, let's say I have a large sales team and I create
                                                                                                                • Scanned Doc - selecting Item overwrites Rate

                                                                                                                  I have a Vendor Invoice which was uploaded to Documents. I select Add To > New Bill. The OCR is actually quite good, but it is reading an Item Description instead of an Item Number. I remove the description and select the correct Item Number... and it
                                                                                                                • Timesheet invalid data error

                                                                                                                  Getting the "Invalid Date" error when trying to add a time sheet to an appointment in a work order. I initially though the work order was corrupt or something so I deleted the work order and recreated it. I added the first time sheet to the AP and saved
                                                                                                                • Convert invoice from zoho to xml with all details

                                                                                                                  How to convert an Invoice to XML format with all details
                                                                                                                • Any update on adding New Customer Payment Providers who support in store terminal devices?

                                                                                                                  Currently there is only one Customer payment provider listed for terminal devices in USA- Everyware. They charge a monthly fee of almost $149 minimum. Will you add other providers - like Zoho Payments or Stripe or Worldpay that would allow integrated
                                                                                                                • Dealing With One-Time Customers on Zoho Books

                                                                                                                  Hello there! I am trying to figure out a way to handle One-Time customers without having to create multiple accounts for every single one on Zoho Books. I understand that I can create a placeholder account called "Walk-In Customer", for example, but I
                                                                                                                • Customizing Helpcenter texts

                                                                                                                  I’m customizing the Zoho Desk Help Center and I’d like to change the wording of the standard widgets – for example, the text in the “Submit Ticket” banner that appears in the footer, or other built-in widget labels and messages. So far, I haven’t found
                                                                                                                • Passing the image/file uploaded in form to openai api

                                                                                                                  I'm trying to use the OpenAI's new vision feature where we can send image through Api. What I want is the user to upload an image in the form and send this image to OpenAI. But I can't access this image properly in deluge script. There are also some constraints
                                                                                                                • "Temporary" Field Value?

                                                                                                                  I have a custom action in Form A report Detail View that passes the Rec ID and updates a Temp Record ID lookup field in the Form B record via openURL (and opens the Form B report in popup) . The updated Temp Record ID field value in Form B is then used
                                                                                                                • File Upload field automatically replaces spaces with underscores – support experience

                                                                                                                  Hi everyone, I want to share my recent experience regarding the File Upload field behavior in Zoho Creator and my interaction with the Zoho support team. When a user uploads a file, the system automatically renames the document by replacing spaces in
                                                                                                                • We Asked, Zoho Delivered: The New Early Access Program is Here

                                                                                                                  For years, the Zoho Creator community has requested a more transparent and participatory approach to beta testing and feature previews. Today, I'm thrilled to highlight that Zoho has delivered exactly what we asked for with the launch of the Early Access
                                                                                                                • Queries on Project-Based Inventory Consumption and Proforma Invoice in Zoho ERP

                                                                                                                  We would appreciate your clarification on how Zoho ERP plans to handle the following: Project-based inventory consumption without itemized sales orders Accurate project cost tracking along with inventory reduction Proforma Invoice usage We look forward
                                                                                                                • Applying Excess Payments & Conflict Invoices Due to Cancelled Items

                                                                                                                  I’m running into several issues that appear to stem from deeper-than-expected overlap between Zoho Finance (Books/Inventory) and Zoho POS. The level of coupling between these systems seems greater than what was originally communicated, and it’s leading
                                                                                                                • Zoho Sprint Backlog View, filter by item status

                                                                                                                  Hello, In Zoho Sprints, it would be great to be able filter out specific items in the Backlog based on their status. We would like to track items that were Removed from our backlog without seeing them constantly in the Backlog view, as this view should
                                                                                                                • WATERFALL CHART IN ZOHO ANALYTICS

                                                                                                                  Hi Team, I would like to know whether Zoho Analytics currently supports a Waterfall Chart as a built-in visualization type. If yes, could you please share the steps to create one? If not, is there any workaround or recommended method to build a Waterfall
                                                                                                                • Export contacts from Bigin's mobile app to your Android device

                                                                                                                  Hello everyone! We're happy to announce that you can now export customer contacts from the Bigin mobile app to your device. Scenario A small-scale business owner has two pipelines in Bigin—one for procuring raw materials and the other for selling his
                                                                                                                • Passing Info from Function to Client Script

                                                                                                                  Hello, I have recently started making use of client script for buttons, allowing me to give the user information or warnings before they proceed. This is great. However, I have never quite managed to pass back any extra information from the function to
                                                                                                                • ASAP iOS SDK – Xcode Compatibility Update

                                                                                                                  Hello everyone, We have been delivering the ASAP iOS SDK developed using Xcode 16.1 to provide Help Center support within mobile applications. Thus, ASAP iOS SDK versions upto 4.5.8 are compatible with development environments running in Xcode 16.1 and
                                                                                                                • Sub form auto field population based on parent form

                                                                                                                  I have a parent form called "Sites" with a text field called "Site". I have a subform called "Design Comments" (actual form name "Review Comments") with a lookup field name "Sites1" that looks up from the Sites form. I want the Sites1 lookup field to
                                                                                                                • A note-taking app right inside your project management space

                                                                                                                  How do you feel when you check off the last task from your to-do list after a long day at work? Euphoric, blissful, satisfied? Now, imagine completing the same checklist from your PM platform, without juggling tools. Sounds simple and handy? That’s exactly
                                                                                                                • Email Forwarding: Maintain business continuity

                                                                                                                  As an administrator, ensuring uninterrupted email communication is critical when a role-based employee is unavailable due to extended leave or a temporary role change. Emails from customers, partners, and internal teams must continue to be received and
                                                                                                                • Tip #61- Collaborate live with Invite Technician- 'Insider Insights'

                                                                                                                  We’ve all been there: you’re deep into a complex remote session, and you realize you need a second pair of eyes. Instead of ending the call or rescheduling, why not just bring the expert to you? With Zoho Assist, you can invite internal colleagues or
                                                                                                                • How to integrate Zoho CRM, Zoho Forms and a WIX Web Site

                                                                                                                  Attached video demonstrates how to use Zoho Forms included in Zoho One, to design a Contact Us form to be embedded into a WIX web site and integrated into Zoho CRM.
                                                                                                                • Bug Causing Major Sync & SO Access Failures in Zoho POS

                                                                                                                  We are experiencing critical and recurring issues in Zoho POS that all trace back to role-permission handling defects in the latest POS app version. These issues directly affect syncing, login ability, and Sales Order access for role-restricted users
                                                                                                                • Change Last Name to not required in Leads

                                                                                                                  I would like to upload 500 target companies as leads but I don't yet have contact people for them. Can you enable the option for me to turn this requirement off to need a Second Name? Moderation update (10-Jun-23): As we explore potential solutions for
                                                                                                                • Zoho CRM for Everyone's NextGen UI Gets an Upgrade

                                                                                                                  Hello Everyone We've made improvements to Zoho CRM for Everyone's Nextgen UI. These changes are the result of valuable feedback from you where we’ve focused on improving usability, providing wider screen space, and making navigation smoother so everything
                                                                                                                • OAuth2 Scope Error - Incorrectly defaulting to CRM instead of Analytics.

                                                                                                                  Hello Zoho Team, I am trying to connect n8n to Zoho Analytics API V2 for a simple automation project. Despite using the correct Analytics-specific scopes, my OAuth handshake is failing with a CRM-related error. The Problem: The authorization screen shows:
                                                                                                                • Add Custom Reports To Dashboard or Home Tab

                                                                                                                  Hi there, I think it would be great to be able to add our custom reports to the Home Tab or Dashboards. Thanks! Chad Announcement: The feature is being rolled out across DC's and Edition in phases. To know more refer to the announcement post here.
                                                                                                                • Hiding Pre-defined Views

                                                                                                                  You can enhance Zoho with custom views - but you cannot hide the pre-defined views. Most users focus on 4 or 5 views. Right now for EVERY user EVERY time they want to move to one of their 4 or 5 views - they have to scroll down past a long list of pre-defined
                                                                                                                • why can't agent see accounts & contacts

                                                                                                                  My new user, with 'Agent' privileges, cannot see records that don't belong to them. How can I give them access? Why isn't this the default configuration in Zoho?
                                                                                                                • Sender Email Configuration Error.

                                                                                                                  Hello Team, Hope you are all doing well. We are in the process of creating the Zoho FSM environment in the UAE. When we try to add the sender email address “techsupportuae@stryker.com”, we receive the error message: “Error occurred while sending mail
                                                                                                                • 【Zoho CRM】フィルター機能のアップデート:ルックアップ項目を使ったデータフィルタリング

                                                                                                                  ユーザーの皆さま、こんにちは。コミュニティチームの藤澤です。 今回は「Zoho CRM アップデート情報」の中からフィルター機能のアップデートをご紹介します。 ルックアップ項目を使ったデータフィルタリングがより詳細に行えるようになりました。 この機能は詳細フィルターとカスタムビューで利用でき、必要な情報を正確に取得できます。 これにより、タブ間を移動することなく、より深く正確な方法でデータを絞り込むことが可能になります。 ◉できること 詳細フィルターとカスタムビューで、ルックアップ先タブの項目が選択可能
                                                                                                                • This will be long, Please bear with me - Next Gen Layout - Search

                                                                                                                  In general, I think that Zoho are going in the right direction with the Next Gen UI. The latest update brings some nice improvements and all-in-all from a user's perspective I think the improvements are generally very good. However, there are some areas
                                                                                                                • Zoho Books | Product updates | July 2025

                                                                                                                  Hello users, We’ve rolled out new features and enhancements in Zoho Books. From plan-based trials to the option to mark PDF templates as inactive, explore the updates designed to enhance your bookkeeping experience. Introducing Plan Based Trials in Zoho
                                                                                                                • Zoho Books | Product updates | August 2025

                                                                                                                  Hello users, We’ve rolled out new features and enhancements in Zoho Books. From the right sidebar where you can manage all your widgets, to integrating Zoho Payments feeds in Zoho Books, explore the updates designed to enhance your bookkeeping experience.
                                                                                                                • Quotes Approval

                                                                                                                  Hey all, Could you please help in the following: When creating quotes, how to configure it in a way, that its approval would work according to the quoted items description, not according to quote information. In my case, the quote should be sent to approval
                                                                                                                • Important Update: Facebook Pages API Deprecation

                                                                                                                  Dear Zoho Analytics users, As of January 26, 2026, Facebook has officially deprecated Facebook Pages API version 18. This update involves the removal of several metrics that were previously supported by the API. As a result, these changes will affect
                                                                                                                • Adding a Deal to and Existing Contact

                                                                                                                  I want to easily add a Deal to an existing Contact. If I click on New Deal on the Contact page this currently this is what happens: All of the mandatory field (and other field) information exists within the Contact. Is there a simple way for it to automatically
                                                                                                                • Next Page