Connectors

Connectors

Zoho offers integration support for a wide range of third-party applications, including core Google services (Contacts, Calendar and Google Ads) and Microsoft software (MS Office, MS Outlook, etc.). However, there are some services that cannot be integrated directly with Zoho FSM, such as Dropbox, PandaDoc, and Google Drive. In these cases, you can use a connector to expand FSM's third-party support. Connector uses OAuth 2.0 protocol to facilitate this integration.

Important Terminology

  1. Client: The application requesting access to data stored in an external system. When creating a connector, the client is Zoho FSM.
  2. Resource: The application or service that the client is trying to access. In our case, the resource is the third-party service (ex: Dropbox) you are trying to integrate.
  3. Request Token URL: This URL is used to send authorization requests to the resource server. The resource server prompts the resource owner (end-user) to authorize this request.
  4. Access Token URL: Once the request is authorized by the resource owner, the server sends an access token to the client. This token has to be exchanged every time the clients wants to access the resource data.
  5. Refresh Token URL: Some access tokens are valid only for a limited period of time. When an access token expires, the client has to get another access token from the resource, using the refresh token URL.
  6. Client ID: A unique identifier provided to every client application. This ID is provided by the resource owner, i.e. Zoho FSM.
  7. Client Secret: Every client application has a secret code mapped to it. This is done to prevent unauthorized access to the resource.
  8. Redirect URL: This is the URL to which the end user will be redirected, once data access has been authorized. The client application will generate a redirect URL automatically.

Registering a Zoho Client

Since Zoho FSM APIs are authenticated with OAuth2 standards, you should register your client app with Zoho FSM. To register your app:
  1. Visit this page https://accounts.zoho.com/developerconsole.
  2. Click on Add Client ID.
  3. Enter Client Name and Client Domain.
  4. Enter the Redirect URI as "https://deluge.zoho.com/delugeauth/callback".
  5. Select the Client Type as Web based.
  6. Click Create.
  7. Your Client app would have been created and displayed by now.
  8. The newly registered app's Client ID and Client Secret will be displayed.
You can view the Client ID and Client Secret details at https://accounts.zoho.com/developerconsole by selecting Edit from the more options [  ] icon.

Note: Please note that this step has to be followed for Apps which are not natively available in 'Connections' tab. For instance, this step is required if you want to add a "Custom Service" in Connections.

Creating a Connection

You can use the existing connections provided to set up a connection or create a connection from scratch. To create a connector:
  1. Go to Setup > Developer Space > Connectors.
  2. Click Get Started.
  3. Select the Custom Service tab.
  4. Provide a name for the service to be connected (ex: Google contacts).
  5. Select the type of Authentication that is supported by the third-party application or service.



  6. Provide the following details about the third-party server:
    1. Client ID and Client Secret.
    2. Request Token URL: This allow the connector to request authorization to access data on the resource server.
    3. Access Token URL: Once authorized, the Request Token and Token Key will be exchanged for the Access Token, allowing the connector to draw specific information from the third-party server.
    4. Refresh Token URL: Some applications increase security by limiting the duration of time a particular token is valid. In these cases, you will need to provide the Refresh Token URL to allow the connector to reauthorize access.



  7. Give a name of your choice for the Connection.
  8. Provide Scopes for the connection. Scope for each connection is given by the third-party service. Please check the help for the respective third-party service to know about their provided scopes.



  9. Click Create and Connect.
    Once the connection is created, it will be available in the Pick Your Service tab.

About Tokens  

Request Tokens, Access Tokens and Refresh Token URLs are provided by the web application. You can obtain these URLs from the developer space of the web app. For example, the URLs for Google applications can be obtained here.

For any service, the Request Token, Access Token and Refresh Token URLs will have multiple parameters, including scope, state, client id, and access type. These parameters can vary from service to service. However, three parameters are common to all the services: Redirect URL, Client ID and Response type. These parameters will be handled by Zoho. If there are any other mandatory parameters such as 'scope', 'state', or 'access type', the developer will have to supply them in the format specified by the third-party service.

Sample Google API: https://accounts.google.com/o/oauth2/v2/auth?scope=email%20profile&state=security_token%3D138r5719ru3e1%26url%3Dhttps://oa2cb.example.com/myHome&access_type=

Using a Connection

The Pick your Service tab contains the list of available connections that are ready to use. You can select an existing connection or select the one that you created from the Custom Services tab. The connections are to be used by invoking them within functions.

Let's have a look at how to use a connection within the function:
  1. Go to Setup > Developer Space > Connections.
  2. Select the required Connection from the Pick Your Service tab.
  3. Provide a Connection name.



  4. Click Create and Connect.
  5. In the following page, the Link nameService name and Status of the Connection are shown.
  6. Additionally, the code to be used in a function to invoke the connection is also given in a box.



    1. The URL can be obatined form the third-party service.
    2. The Types POSTPUTGET and DELETE are the HTTP methods that determine the type of action that request performs.
    3. The Parameters are used by the function to replace dynamic values present in the API with user-specific values. For example, if the API must fetch the lead's details such as name, email address, contact number, etc., these values will be represented by a dynamic value in the API. This dynamic value can be replaced with the actual value from the Leads Details page using the parameter function. Examples given later in this document will give more detailed information about this function.
    4. The Connection in the code is the link name.
      You can use the above block of code to invoke the URL and integrate the third-party app with Zoho FSM.

Sample Connection

Suppose you want to add certain FSM customers (those matching a particular criteria) to your Google contacts list. To get the functionality you need, you'll have to create a connector that integrates your FSM system with Google contacts and then write a custom function that executes this connector whenever particular conditions are satisfied.

Step 1: Getting Request, Access and Refresh tokens

To get going, we need to get the request token, access token and refresh token URLs from Google server.
  1. Go to Setup > Developer Space > Connections
  2. Click the Custom Service tab
  3. Give the Service name as GoogleContacts
  4. Set the Authentication type as OAuth 2
  5. Provide the following information:
    1. Client ID: {your_client_id}
    2. Client Secret: {your_client_secret}
    3. Authorize URL: https://accounts.google.com/o/oauth2/v2/auth?scope=https://www.google.com/m8/feeds
    4. Access Token URL: https://www.googleapis.com/oauth2/v4/token
    5. Refresh Token URL: https://www.googleapis.com/oauth2/v4/token
  6. Give a name for the Connection.
  7. Provide the Scopes for the connection as specified by Google Contact.
  8. Click Create and Connect.

Step 2: Enabling the Connector

Once the connector is added, we need to enable it before using.
  1. Go to Setup > Developer Space > Connections.
  2. The GoogleContacts connector can be found in the Pick Your Service tab.
  3. In the GoogleContacts connection page, enter a name for the current connection.
  4. Click Create and Connect.
  5. The response gives you a code which can be used in a Custom Function.
  6. You can use that code to call the API using a custom function.

Step 3: Write a Custom Function to invoke a Connector

Once the connector has been published and associated with the extension, it can be invoked using a custom function. You can do either of these actions.
  1. Post data from Zoho FSM to GoogleContacts
  2. Get data from GoogleContacts to Zoho FSM

    • Related Articles

    • Add shapes, flowcharts, connectors, and more

      The Zoho Show app for Android comes with a useful and interesting set of shapes to create your diagrams in minutes. The app includes a collection of shape elements, such as flow charts, square, block arrows, and circles, to help visualize your ...
    • plugin-manifest.json

      locale   The language the extension supports. Currently, we support the locale "en" (English) only.  service  The product for which the extension is created. For example “ORCHESTLY”.  storage  Enable or disable data storage for the extension. By ...
    • About Sigma

      Sigma is an extension development platform where developers can build and host extensions for various Zoho applications. These extensions can be software add-ons focusing on feature enhancements, third-party integrations, or any other valuable ...
    • Integration Tasks - Python

      As you might already know, the update to Version 2.0 APIs played a major part in using custom functions, now named "Functions". This guide will help you how to use functions integration tasks which uses the new APIs. Getting Started For starters, the ...
    • Functions - Integration Tasks

      As you might already know, the update to Version 2.0 APIs played a major part in using custom functions, now named "Functions". This guide will help you how to use functions integration tasks which uses the new APIs. Getting Started For starters, the ...