Google Drive is a cloud-based storage service for organizations of all sizes, with a focus on G Suite document (Google Docs, Sheets, Slides, etc) storage and collaboration. The Google Drive connector provided with Workplace Search automatically captures, syncs and indexes the following items:
G Suite Documents
Including ID, File Metadata, File Content, Collaborators, and Timestamps
Including ID, File Metadata, File Content, Updated by, and Timestamps
Configuring the Google Drive Connectoredit
Configuring the Google Drive connector is the first step prior to connecting the Google Drive service to Workplace Search, and requires that you create an OAuth App from the Google Drive platform.
Step 1. To get started, log in to the Google Developer Console.
Make sure that you create this project with a trusted and stable Google account. We recommend using a team-owned account.
Step 2. We must first create a project, add access to the Google Drive API to it. Click Create when prompted:
If you already have active projects, you can create a new project from the Project Dropdown menu:
Fill in the project information in a way that best suits your organization.
Step 3. Using the search bar located at the top of the console, navigate to the Google Drive API:
Step 4. Enable access to the Google Drive API for this project:
Step 5. You will be prompted to Create Credentials:
Step 6. Select Google Drive API as the API you are using. You will call it from Web browser to access User data:
Step 7. Click What credentials do I need?, and select the Set up consent screen option:
Step 8. Select Internal as User Type.
Step 9. Fill out the information in the OAuth Consent Screen form.
Step 10. In the Scopes for Google APIs section, click Add scope and select the following scopes for the Google Drive API:
Save the changes.
Step 11. We must now create credentials for the OAuth application. Locate the Credentials menu item in the left sidebar, click Create Credentials and select OAuth Client ID.
Step 12. Fill out the OAuth form:
- Application type: Web application.
- Name: Whichever feels best for you. Workplace Search makes sense, keeps things clear.
# Deployment using a custom domain name https://www.example.com # Deployment using a default Elastic Cloud domain name https://c3397e558e404195a982cb68e84fbb42.ent-search.us-east-1.aws.found.io # Unsecured local development environment http://localhost:3002
Authorized redirect URIs: The following two URLs, substituting
<WS_BASE_URL>with the base URL at which Workplace Search is hosted (scheme + host, no path).
# Deployment using a custom domain name https://www.example.com/ws/org/sources/google_drive/create https://www.example.com/ws/sources/google_drive/create # Deployment using a default Elastic Cloud domain name https://c3397e558e404195a982cb68e84fbb42.ent-search.us-east-1.aws.found.io/ws/org/sources/google_drive/create https://c3397e558e404195a982cb68e84fbb42.ent-search.us-east-1.aws.found.io/ws/sources/google_drive/create # Unsecured local development environment http://localhost:3002/ws/org/sources/google_drive/create http://localhost:3002/ws/sources/google_drive/create
Step 13. Upon submission, you will be presented with a Client ID and Client Secret. Keep them handy, as we’ll need them in a moment.
Step 14. From the Workplace Search administrative dashboard’s Sources area, locate Google Drive, click Configure and provide both the Client ID and Client Secret.
Voilà! The Google Drive connector is now configured, and ready to be used to synchronize content. In order to capture data, you must now connect a Google Drive instance with the adequate authentication credentials.
Connecting Google Drive to Workplace Searchedit
Once the Google Drive connector has been configured, you may connect a Google Drive instance to your organization.
Step 1. Head to your organization’s Workplace Search administrative dashboard, and locate the Sources tab.
Step 2. Click Add a new source.
Step 3. Select Google Drive in the Configured Sources list, and follow the Google Drive authentication flow as presented.
Step 4. Upon the successful authentication flow, you will be redirected to Workplace Search.
Google Drive content will now be captured and will be ready for search gradually as it is synced. Once successfully configured and connected, the Google Drive synchronization automatically occurs every 2 hours.