Set up Google Settings ​

Google Settings holds the credentials that ERPNext uses to talk to Google. Set it up once before you use any Google integration.

IntegrationCredentialGoogle API to enable
Google CalendarOAuth client IDCalendar API
Google ContactsOAuth client IDPeople API
Google indexing (in Website Settings)OAuth client IDIndexing API
Google Drive backupsOAuth client IDDrive API
Google Maps for Delivery TripAPI keyDirections API

INFO

Google Settings, Google Calendar, and Google Contacts are part of the Frappe Framework. Google Drive backups need the offsite_backups app.

Prerequisites ​

Create OAuth credentials ​

Do this for Google Calendar, Google Contacts, Google Drive, and Google indexing.

  1. In the Google Cloud console, open APIs & Services > Library. Enable the API for each integration that you plan to use (see the table above).
  2. Open APIs & Services > Credentials, and create an OAuth client ID.
  3. In Application type, select Web application.
  4. In Authorized JavaScript origins, add https://<your-site>.
  5. In Authorized redirect URIs, add both URIs:
    • For Google Calendar: https://<your-site>?cmd=frappe.integrations.doctype.google_calendar.google_calendar.google_callback
    • For the other services: https://<your-site>/api/method/frappe.integrations.google_oauth.callback
  6. Copy the client ID and the client secret.

Creating an OAuth client ID in the Google Cloud console

Create an API key ​

Do this only for Google Maps. Other features do not need an API key.

  1. In the Google Cloud console, enable the Directions API.
  2. In APIs & Services > Credentials, create an API key.
  3. Copy the key.

Enter the credentials in ERPNext ​

  1. Open Google Settings.
  2. Select Enable.
  3. Enter the Client ID and Client Secret.
  4. If you use Google Maps, enter the API Key.
  5. Save.