SugarCRM SupportHelp ArticlesConnectors and IntegrationsIntegrating With Google for Admins

Integrating With Google for Admins

Overview

Sugar's Google connector allows users to import their Google contacts to Sugar® and link documents in Sugar to documents stored on the Google Drive™ online storage service. Beginning with versions 10.2.0, 10.0.3, and 9.0.5, the connector also allows Sugar to connect to Google mail via OAuth2 when the system email settings, outgoing user email accounts, and inbound mail accounts are configured.

This article will cover the administrator's configuration of the Google connector which must be completed before users can enable and use the connector and/or configure Sugar's system email settings/outgoing user email accounts using Google mail. Information on enabling the connector for user accounts and utilizing the Google connector is available in the Integrating With Google for End Users article. For information on configuring the system's outbound email settings, system inbound email accounts, and the outgoing user email accounts, refer to the Email and Emails documentations. 

Prerequisites

  • You must be an administrator user to enable the Google connector for your instance.
  • You must have an active Google or Google Apps account to configure the Google connector for your instance.

Steps to Complete

Before users may connect their Google accounts to Sugar, an admin user must complete the initial, system-wide Google connector configuration. The following sections explain how the administrator can acquire the proper API credentials from Google and use those credentials to set up the connector in Sugar. For information on how users can then connect their individual Google accounts to their Sugar user profiles, please refer to the Integrating With Google for End Users article.

Enabling Google APIs and Creating Credentials

To set up the Sugar Google connector, you must first enable the appropriate Google APIs and create credentials to obtain a Client ID and Client Secret. To allow users to import their Google contacts to Sugar, you will need to enable the "Google Drive API" and "Contacts API", as covered in step 5 of the instructions below. Beginning with versions 10.2.0, 10.0.3, and 9.0.5, you can enable the "Gmail API", as covered in step 6 below, which will allow you to configure Sugar's system email settings (outbound, inbound) and outgoing user email accounts using Google mail once the connector has been configured.

  1. Navigate to the Google Developers site in your web browser.
  2. Sign in using the Google account under which you would like to register the application.
  3. Create a new project using one of the following methods:
    • Click the Create Project button, enter a project name of your choice (e.g. Sugar Google Connector), and then click "Create".
      GoogleConnector CreateProject
    • If you do not see the Create Project button, then click "Select a project" in the navigation bar. Click "New Project" in the Select a project window, enter a project name of your choice (e.g. Sugar Google Connector), and then click "Create".

    Google SelectAProject NewProject</p>

  4. Next, click the Google APIs logo in the navigation bar and the APIs & Services page will open with your newly created project selected (e.g. Sugar Google Connector). Click "Enable APIs And Services".
    GoogleConnector EnableAPISAndServices
  5. If you wish to allow users to import their Google contacts to Sugar, perform the following actions:
    • Locate "Google Drive API" on the API Library page and click on it. Then click the Enable button. 
    • Navigate back to the API Library then locate "Contacts API" and click on it. Then click the Enable button.
  6. If you wish to configure the email settings in Sugar using Google mail via OAuth2, locate "Gmail API" on the API Library page and click on it. Then click the Enable button. 
  7. Click the Google APIs logo in the navigation bar then select "Credentials" on the left tree menu.
  8. On the Credentials page, click "Create Credentials" and then select "OAuth client ID" for the credential type.
    Note: If this is your first API project, Google will prompt you to configure the OAuth consent screen first. Users will see this screen when your application requests access to their private data. Click on the "Configure consent screen" option and then proceed to step 9. 
    GoogleConnector OauthClientID
  9. On the OAuth consent screen, select "External" as the user type then click "Create". Enter the application name of your choice (e.g. Sugar Google Connector) then enter in your domain in the Authorized Domains field (e.g. sugarondemand.com) and click "Save". Now, click "Credentials" on the left tree menu then click "Create Credentials" and select "OAuth client ID".
    Note: Skip this step if you have already configured the OAuth consent screen.
  10. Select "Web application" on the Create OAuth client ID screen then enter this URL as an Authorized Redirect URI: 
    https://myinstance.sugarondemand.com/index.php?module=EAPM&action=GoogleOauth2Redirect (replace the bold text with your instance's URL).  
    IntegratingWithGoogle CreateOAuthClientID
  11. Click "Create" to generate your unique credentials. The Client ID and Client Secret information will display in a pop-up window. Record both of these values as they are required when configuring the connector in Sugar.
  12. Finally, on the OAuth Consent Screen settings, you must either click the Publish App button under "Publishing Status" or, if you prefer to leave the app in testing mode, add the Google account(s) that you want to be able to authenticate in Sugar under "Test Users".

Configuring Sugar's Google Connector

Once you have obtained the Client ID and Client Secret, use the following steps to set up the Google connector in Sugar:

  1. Log into your Sugar instance and navigate to Admin > Connectors > Set Connector Properties.
  2. Click the Google tab and fill in the Client ID and Client Secret values obtained in step 11 of the section above. Click "Save".
    ConnectorSettings GoogleTab
  3. Next, navigate to Admin > Connectors > Enable Connectors.
  4. Click the Google tab and ensure that there is a checkmark in the box next to "Enable...".
    ConnectorSettings Google

Configuring Sugar Email Settings

Once the Google connector has been configured in Sugar, you can then configure Sugar's email settings using Google mail. Admin users can configure the system's outbound email settings via Admin > System Email Settings and the system inbound email accounts via Admin > Inbound Email. For more information, refer to the Email documentation. Sugar users can also create outgoing email accounts by clicking on the Emails module tab and selecting "Email Settings". For more information, refer to the Emails documentation.

Steps for End Users

Information about enabling the connector for user accounts and utilizing the Google connector is available in the Integrating With Google for End Users article.

Last modified: 2021-09-20 18:52:37