Creating a Gmail integration using custom connectors

Creating a Gmail integration using custom connectors

Hello everyone!

Greetings from Deluge. Following up on our series aimed at exploring the capabilities of Deluge, today we'll take an in-depth look into the Deluge custom connections that can be created across Zoho services.

Deluge boasts an extensive range of over 260 built-in integrations spanning more than 35 Zoho services. These integrations streamline data access and modification with these services, from a single point in Zoho, without having to toggle between services. However, we understand that the needs of our users vary widely, and sometimes existing integrations may not cover every scenario.

That's where custom connections come in. Think of them as the Swiss Army Knife of integrations, enabling connections with hundreds of services—such as Gmail and Outlook—and seamlessly integrating them with your favorite Zoho services. With custom connections, you have the power to build your own integrations with virtually any third-party service and tailor them to meet your requirements. Moreover, since the custom connections use the OAuth 2.0 authentication mechanism, you're getting best-in-class security while integrating with third-party services.

What are connections? 
Before we dive into the details of custom connectors, let's take a glimpse at what connections are in Deluge. Connections are a means to connect your Zoho account and any third-party accounts you wish to integrate with. Once a connection is created and connected, you can use it in Deluge integration tasks or invokeURL scripts to perform REST operations on the target service from the required Zoho service. For more information, visit our Connections help doc.
  
Use case 
Assume the sales team of an organization uses Zoho CRM for managing leads, customer retention, and customer acquisition, and uses Gmail for communication purposes, like following up with potential clients via email.   While the system works as is, it's time-consuming and prone to error, so an integration between Gmail and Zoho CRM is necessary to improve efficiency.

A custom connection to your Google account will enable you to sync your Zoho CRM and Google accounts, allowing you to perform actions related to your Google account from Zoho CRM. For example, you can invoke the connection using the invokeURL task in Zoho CRM and send an email to your leads from your Gmail address.

Steps to configure the Google custom connection

Configuration video


Configuration steps
Creating Google OAuth credentials
  1. Visit https://console.cloud.google.com/.
  2. Click the dropdown and choose the required project.
  3. Navigate to the hamburger menu on the left and click APIs and services -> Library.
  4. You'll be taken to the API library page. Navigate to the Google Workspace section and click Gmail API.
  5. Next, click Enable on the Gmail API product details page.
  6. In order to use this API, you'll need to create credentials. Click CREATE CREDENTIALS.
  7. On the Create credentials page, choose Gmail API in the Select an API dropdown and User Data under the What data will you be accessing? section. Click Next.
  8. Next, on the OAuth consent screen, enter the App name, User support email, and Developer contact email address. Then click Save and Continue.
  9. Next, under the Scopes section, click the ADD OR REMOVE SCOPES button.
  10. In the Update selected scopes pane, search and select the gmail.readonly scope. Click Update, and then click Save and continue.


  11. Now, under the OAuth Client ID section, choose Web application in the Application type dropdown. Then name your app.


  12. Enter https://deluge.zoho.com/delugeauth/callback as the Authorized redirect URI.
  13. Click Create and download your credentials. This Client ID and others will be required later, while creating a connection in Zoho CRM.
  14. Navigate to the OAuth consent screen and click Add users under Test users. Enter the user's email address and click Save.
Creating a custom connector for Gmail
  1. Now the action shifts to Zoho CRM. Navigate to crm.zoho.com -> Settings -> Connections.
  2. Choose Custom Services and click Create Service.
  3. On the Create Service screen, choose OAuth 2.0 as the Authentication type and Header as the Parameter.
  4. Enter the Client ID, Client Secret, and Authorize URL generated from Google as shown in step 12 above.
    Tip: Having the Offline access type will allow your application to refresh tokens even when the user is not actively using the application.
  5. Then enter https://oauth2.googleapis.com/token as the Access token URL and Refresh token URL.
  6. Specify the necessary scopes like read and create, etc. and then click Create Service.
  7. On the next page, click Create Connection. Give the connection name and choose the scopes. Then click Create and Connect.
  8. Finally, authenticate the connection on the Google accounts page. Your custom connection will be created, and the two services can be integrated!
Now that the connection between Zoho CRM and Gmail has been established, you can use the invokeURL task to access and modify data in Gmail using the different APIs.

Sample
You can use the below code in invokeURL task to get the latest emails from Gmail.

userId = "emailaddress@gmail.com";
get_gmail = invokeurl
[
url: "https://gmail.googleapis.com/gmail/v1/users/"+userId+"/messages"
type: GET
connection : "connectionname"
];
messageID = get_gmail.get("messages").get(0).get("id");

get_gmail_withID = invokeurl
[
url: "https://gmail.googleapis.com/gmail/v1/users/"+userId+"/messages/"+messageID
type: GET
connection : "connectionname"
];

Content_of_the_mail = get_gmail_withID.get("snippet");
info "Mail Content : " + Content_of_the_mail;

gmail_values = get_gmail_withID.get("payload").get("headers");
for each headers in gmail_values
{
if ( headers.get("name") == "Subject" )
{
info "Subject of the Mail : " + headers.get("value");
}
if ( headers.get("name") == "From" )
{
info "From Address : " + headers.get("value");
}
}

References

----

And that's a wrap for today! We hope you found this post informative and start using custom connections to experience the full capabilities of Deluge and Zoho.

Kindly let us know if you have any questions, feedback, or suggestions in the comments, or write to us at support@zohodeluge.com!
 
Regards,
The Deluge Team
    • Recent Topics

    • Zoho Reports Not Grouping from Subforms

      I have created reports from a subform. We have a budget from a standard field, and the bills added to a subform. I've summarised the bills in a field. In edit mode, the bills are joined per supplier, which is what we want. But then it converts and separates/duplicates
    • Introducing Assemblies and Kits in Zoho Inventory

      Hello customers, We’re excited to share a major revamp to Zoho Inventory that brings both clarity and flexibility to your inventory management experience! Presenting Assemblies and Kits We’re thrilled to introduce Assemblies and Kits, which replaces the
    • Is it possible to Bulk Update 'Product Name' in Zoho Desk?

      Is it possible to Bulk Update 'Product Name' in Zoho Desk? I cannot see that option now. Kindly help how we can do it.
    • Show item Cost value on Item screen

      The Item screen shows Accounting Stock and Physical Stock. It would be very helpful if value information could be displayed here as well, for instance Cost Price. Currently, to find the Cost Price (as used for inventory valuations) from inside the item
    • Kits: Option to Hide Associate Items on Documents

      The new Kit type of Composite Item is very helpful, and we're already using it in several different ways. One problem is that there seems to be no way to hide the components on some documents, including Package Slips. There is an option given in settings
    • Refund Form Can’t Reverse “Bank Charges” Line — Throws Off Reconciliation

      Zoho, When we pay a vendor, the Payment screen lets us add a “Bank Charges” amount (we post a $1 processing fee there). Perfect. But on the Refund popup there’s no matching field, so the refund can only return the net expense. If our processor sends back
    • Trial Extenstion/ 2nd Go!

      Hi, Recently trialed FSM bit didnt get a chance to try out the most recent features is it possible to get another trial to try the new features and see if I can make it work for me?
    • [Important announcement] Zoho Writer will mandate DKIM configuration for automation users

      Hi all, Effective Dec. 31, 2024, configuring DKIM for From addresses will be mandatory to send emails via Zoho Writer. DKIM configuration allows recipient email servers to identify your emails as valid and not spam. Emails sent from domains without DKIM
    • Unveiling Cadences: Redefining CRM interactions with automated sequential follow-ups

      Last modified on 01/04/2024: Cadences is now available for all Zoho CRM users in all data centres (DCs). Note that it was previously an early access feature, available only upon request, and was also known as Cadences Studio. As of April 1, 2024, it's
    • Client Script | Update - Introducing Subform Events and Actions

      Are you making the most of your subforms in Zoho CRM? Do you wish you could automate subform interactions and enhance user experience effortlessly? What if you had Client APIs and events specifically designed for subforms? We are thrilled to introduce
    • Change visable Subform fields

      I have a form with 4 subforms in it. I added another field to each of the subforms in my main form. Now, how do I update the subforms to show the new fields that I added?
    • Zoho Integration with UPS

      I have 2 questions: Firstly, is there a way to notify UPS that we have a package to collect once we have done the shipping label? Secondly, how do I get the tracking number and shipment method onto the Invoice and Package Slip for the customer? Than
    • Trigger action after workflow

      I would like to trigger a deluge function after the approval workflow is complete. Is this possible? The objective is to take the approved document and move it over to Zoho Contracts to send out to our customer for review and signature. The reason we
    • Why don't we have better integration with Mercado Pago or Pagseguro?

      Currently, the integration between Zoho Commerce and Mercado Pago for Brazil is very poor... Since it is old, it does not include the main payment method in Brazil today, which is PIX. Is there a date for this to finally be launched? There are numerous
    • Add a block or widget to Zoho Sites that allows users to create an interactive contact card with contact buttons (email, LinkedIn, website, etc)

      The proposed feature consists of a pre-designed, customizable block that displays a person's contact information (e.g., a speaker, sales representative, or independent professional) and offers quick access to: Email (icon with mailto: link) LinkedIn profile
    • Mapping a custom preferred date field in the estimate with the native field in the workorder

      Hi Zoho, I created a field in the estimate : "Preferred Date 1", to give the ability to my support agent to add a preferred date while viewing the client's estimate. However, in the conversion mapping (Estimate to Workorder), I'm unable to map my custom
    • Add the ability to view number of hours planned for a workorder while in the Dispatch Console

      Hi Zoho, When dispatching a work order through the Dispatch Console, there's currently no way to view the number of planned hours for the service tasks associated with that specific work order. Having to click into the details each time to check planned
    • Trigger for Validation Rules

      Currently in Zoho CRM we can set a trigger for workflows, blueprints etc in a custom deluge function But Validation Rules are missing For example if I run a custom function to update a record, it bypasses the validation rules It would be really beneficial
    • ZOHO Desk blocking emails from creating tickets

      Hi We have been noticing some issues since last week ZOHO Desk is not creating a ticket which is still in our affiliate mail box.
    • how to install desk

      how to install desk
    • How to turn off ability to share Knowledge-base article with social networks

      Is there a way to deactivate the link at the bottom of a Knowledge-base article so that it can not be shared via Facebook or Twitter?
    • Automatically Hide Unauthorized Sections from Agent Interface in Zoho Desk

      Hello Zoho Desk Team, We hope you're doing well. We’d like to submit a feature request regarding the user experience for agents in Zoho Desk who do not have permission to access certain sections of the system. 🎯 Current Behavior At present, when an agent
    • Is there a way to prevent a user from removing a payment method on a live, recurring subscription?

      As it stands, if you allow users to remove payment methods, they can do so on live subscriptions. This leaves the sub without a payment method. The user should be able to REPLACE the card with a new one, but not remove all payment methods. We have had
    • Assistance Required: Report Export to Excel and WorkDrive Upload via Deluge

      I'm working on automating a scheduled workflow in Zoho Creator that needs to run weekly. The goal is to: Export a report from Zoho Creator in Excel (.xls or .xlsx) format, and Upload the exported file to a specific folder in Zoho WorkDrive using a Deluge
    • Kanban View for Projects.

      At our organization, we describe active projects with various statuses like "In Proofing" or "Printing" or "Mailing". In the Projects view, one can set these project statuses by selecting from the appropriate drop-down. While this works, it's difficult to view and comprehend the progress of all of your projects relative to each other in a table. Creating a Kanban view for projects where I can move them from one status to another allows me to see where each project is in the order of our workflow.
    • Zoho Projects - Q2 Updates | 2025

      Hello Users, With this year's second quarter behind us, Zoho Projects is marching towards expanding its usability with a user-centered, more collaborative, customizable, and automated attribute. But before we chart out plans for what’s next, it’s worth
    • Useful enhancements to Mail Merge in Zoho CRM

      Dear Customers, We hope you're well! We're here with a set of highly anticipated enhancements to the Mail Merge feature in Zoho CRM. Let's go! Mail Merge in Zoho CRM integrates with Zoho Writer to simplify the process of customizing and sharing documents
    • Send Whatsapp with API including custom placeholders

      Is is possible to initiate a session on whatsapp IM channel with a template that includes params (placeholders) that are passed on the API call? This is very usefull to send a Utility message for a transactional notification including an order number
    • How can I see the actual copy sent to the specific contact?

      I have setup a journey in Marketing Automation and created addition of contact in a specific list as the trigger, emails are sending to the contacts, but I can't see the actual copy sent to any specific contact in the list. Please guide me, where can
    • Client Script for Task Module

      When do we expect the client script for the tasks module?
    • Automating Employee Birthday Notifications in Zoho Cliq

      Have you ever missed a birthday and felt like the office Grinch? Fear not, the Cliq Developer Platform has got your back! With Zoho Cliq's Schedulers, you can be the office party-cipant who never forgets a single cake, balloon, or awkward rendition of
    • Empowered Custom Views: Cross-Module Criteria Now Supported in Zoho CRM

      Hello everyone, We’re excited to introduce cross-module criteria support in custom views! Custom views provide personalized perspectives on your data and that you can save for future use. You can share these views with all users or specific individuals
    • Product and Service

      Hi guys, there is a difference between layout of product and service if Long Description field have some kind of text. Please see screenshot 1 for Service here: https://prnt.sc/7xWwPKd29nWP for Product here: https://prnt.sc/LGmtVd_U6H7q As you can see
    • Create Project while winning potentials - Projects v3 api updated code

      Hi all, I've been using the built in function to create a project while a deal is closed won and noticed it had some missing fields when trying to reference the zoho projects v3 api documentation. Specifically the project group had some issues when adding
    • Formula Fields inside of Blueprint Transitions

      We would like to have formula fields inside of blueprint transitions. We type in currency fields and would like to see the result inside of a formula field. Our use case: Send out a price for XY 1. Filling out cost fields 2. See gross profit
    • ZOHOBOOK Sales_QUOTE: To Add Discount At Each Line Item Table

      Hi, Our quote need to display with discount at each line item level as well. Try to edit template, >CUSTOMISE>EDIT TEMPLATE> Table, I can see template view with discount column, but when hit SAVE the template, view in PDF the discount column not shown.
    • inventory based on bills and not physical stock

      Hello, I have noticed a very annoying issue with zoho books/inventory. I use composite items. If I have an sub assembly item on back order, I am unable to make up the composite item, even when I have received the goods and it is in my stock. I have to convert the PO into a BILL in order for the item to show as 'Accounting Stock'. The problem is that the supplier Invoice is not shipped with the goods, but can follow even a week later. So I have to make the bill have a 'dummy name and number' until
    • Using Zoho Inventory for managing Item compatibilities

      Use case: Using Zoho Inventory for managing (as an example) aftermarket car parts, where a single part can suit many makes, models and years. How do most businesses assign and manage compatibility for each part? Do ZI users typically do this using multi-select
    • Quoting Subscriptions with one Time costs

      Hello all, We sell a subscription SaaS service for which we provide one-time services for implementation and customization. Using CRM quotes i was able to create customized total fields to show the total one-time costs, monthly cost, total subscription
    • Unable to enter manual journal entries in AR/AP.

      Hi there, i am facing some problem relating to AR/AP. I want to make some entries in AR/AP through manual journal. for example. some time I send cash 500 to Mr. A (Customer) for any purpose and then after 2 or 3 days Mr. A returned back 700 to me and
    • Next Page