Building a Google Drive - Related List Widget

Building a Google Drive - Related List Widget

Embedding a Google Drive widget inside Zoho CRM as a Related list allows a user to accomplish three tasks,
  1. Fetch files from Google Drive and show them as a related list in the record's detail page in CRM.
  2. Upload any document from Zoho CRM to a Google Drive folder.
  3. Retrieve file information from the Google Drive.
This guide will help you with the following:
  1. Create and Authenticate an Extension
  2. Create Custom Components
  3. Set up a Connected App
  4. Test your Application

Import the Zoho JS SDK

To import the Zoho JS SDK,visit https://github.com/ZohoDevelopers/GoogleDriveWidget, download and extract it to your path.

Register the Event Listeners

Registering an event means defining a function that will be executed when certain event is triggered by your application.

  1. The code for event listener for this application is,
  2. ZOHO.embeddedApp.on("PageLoad",function(data){
  3.         console.log("Page Loaded with data");
  4.         console.log(data);
  5. })

The code to initialize SDK is,
  1. ZOHO.embeddedApp.init()

The code to invoke an API is
  1. ZOHO.CRM.CONNECTOR.invokeAPI().then(function(data){
  2. console.log(data);
  3. });

Authentication using OAuth2

This extension is authenticated using OAuth2.0 protocol. The Google Drive connector is created with the necessary APIs associated with this extension and published.

Create and Authenticate an Extension

  1. Log in to Zoho Developer Console and click Extensions for Zoho CRM.
  2. Create an extension and name it 'Google Drive'.
  3. Click Connectors in the left pane and go to All Connectors tab.
  4. Click the Create Connector button, and provide the details to create the connector. Add the necessary API's to the connectors. Refer this page for details of how to create a Connector.

Refer below table for details of the APIs:


      5. Add the connector to your extension.

Create Custom Components

  1. Create a custom field named DriveFolderID in the Leads Module to store an auto-generated folder ID whenever a lead record is created.

     
      2. Create a Related List titled Google Drive in the Leads module to fetch the files from Google Drive.


Set up a Connected App

  1. Click Connected Apps in the left pane of the Extension details page.
  2. Enter the following information:
    1. Connected App Name : Google Drive
    2. Description : A short description about the connected app.
    3. Choose Hosting : select the Server side application.
    4. Specify Base URL : https://live.zwidgets.com/GoogleDriveRL/v1/html/
  3. Click Save.
  4. A Connected App is now created.


Test your Application

  1. Click Test Your Extension located in the top right corner of the Zoho Developer Console.
  2. Create a new lead record in the Sand Box with the mandatory input information.
  3. Click Save. You can view the DriveFolderID value getting auto-generated.

  4. Click the Google Drive related list in lead's detail page. No files have been uploaded to the list yet.
  5. Add however many files to the list that you want upload.
  6. Your Google Drive related list is now updated!

    Zoho CRM Training Programs

    Learn how to use the best tools for sales force automation and better customer engagement from Zoho's implementation specialists.

    Zoho CRM Training
      Redefine the way you work
      with Zoho Workplace

        Zoho DataPrep Personalized Demo

        If you'd like a personalized walk-through of our data preparation tool, please request a demo and we'll be happy to show you how to get the best out of Zoho DataPrep.

        Zoho CRM Training

          Create, share, and deliver

          beautiful slides from anywhere.

          Get Started Now


            Zoho Sign now offers specialized one-on-one training for both administrators and developers.

            BOOK A SESSION








                                    You are currently viewing the help pages of Qntrl’s earlier version. Click here to view our latest version—Qntrl 3.0's help articles.




                                        Manage your brands on social media

                                          Zoho Desk Resources

                                          • Desk Community Learning Series


                                          • Digest


                                          • Functions


                                          • Meetups


                                          • Kbase


                                          • Resources


                                          • Glossary


                                          • Desk Marketplace


                                          • MVP Corner


                                          • Word of the Day


                                            Zoho Marketing Automation

                                              Zoho Sheet Resources

                                               

                                                  Zoho Forms Resources


                                                    Secure your business
                                                    communication with Zoho Mail


                                                    Mail on the move with
                                                    Zoho Mail mobile application

                                                      Stay on top of your schedule
                                                      at all times


                                                      Carry your calendar with you
                                                      Anytime, anywhere




                                                            Zoho Sign Resources

                                                              Sign, Paperless!

                                                              Sign and send business documents on the go!

                                                              Get Started Now




                                                                      Zoho TeamInbox Resources



                                                                              Zoho DataPrep Resources



                                                                                Zoho DataPrep Demo

                                                                                Get a personalized demo or POC

                                                                                REGISTER NOW


                                                                                  Design. Discuss. Deliver.

                                                                                  Create visually engaging stories with Zoho Show.

                                                                                  Get Started Now









                                                                                                      • Related Articles

                                                                                                      • Building a Zillow - Related List Widget

                                                                                                        A Zillow widget embedded inside Zoho CRM allows users to obtain various pieces of information about properties in the US. With a Zillow widget, a CRM user can: Get complete property details by entering the property address as input information. View ...
                                                                                                      • Building a Ring Central Telephony Widget

                                                                                                        A RingCentral widget embedded inside Zoho CRM allows users to perform various activities. A CRM user can: Load the telephony dial pad as an iframe in the Zoho CRM interface by using the telephone icon at the bottom right corner of the screen. Make a ...
                                                                                                      • Widget Support

                                                                                                        This guide will help you with the following: Embed a Telephony Widget  Create a Web Tab‌  Create a Related List  Create a Custom Button  Create a Getting Started Widget  Create a Business Card Widget  Sometimes, you may want to include features in ...
                                                                                                      • Widget Support

                                                                                                        This guide helps you with the following: Embed a Telephony Widget  Create a Web Tab‌  Create a Related List  Create a Custom Button  Create a Settings Widget  Create a Business Card Widget  Sometimes, you may want to include features in your Zoho CRM ...
                                                                                                      • Building a Twilio Extension

                                                                                                        Twilio is a cloud communication platform that allows developers to integrate their application programmatically to make and receive voice calls and text messages using its Web service API. The following core topics will assist developers in ...
                                                                                                        Wherever you are is as good as
                                                                                                        your workplace

                                                                                                          Resources

                                                                                                          Videos

                                                                                                          Watch comprehensive videos on features and other important topics that will help you master Zoho CRM.



                                                                                                          eBooks

                                                                                                          Download free eBooks and access a range of topics to get deeper insight on successfully using Zoho CRM.



                                                                                                          Webinars

                                                                                                          Sign up for our webinars and learn the Zoho CRM basics, from customization to sales force automation and more.



                                                                                                          CRM Tips

                                                                                                          Make the most of Zoho CRM with these useful tips.



                                                                                                            Zoho Show Resources