Target Audience - Google Admin
How to create an OAuth2 Google Drive integration
- Click the Integrations to go to the existing Integrations:
- Click on +New Integration:
- Choose the system you want to integrate with (in our case Google Drive) and then click next:
- Select a name and click next:
- On the authentication page:
- Choose the following:
- Authorization URL= https://accounts.google.com/o/oauth2/auth?scope=<scope_url>&prompt=consent&access_type=offline. For <scope_url> please choose the one based on the level of access you want to offer. Here is the list: https://developers.google.com/identity/protocols/oauth2/scopes#drive
For instance:- If we need to crawl documents from GDrive we need the https://www.googleapis.com/auth/drive.readonly and the URL will be: https://accounts.google.com/o/oauth2/auth?scope=https://www.googleapis.com/auth/drive.readonly&prompt=consent&access_type=offline
- If we need to use AddFileCollaboratorAction we need the https://www.googleapis.com/auth/drive scope, and the link will be of the form: https://accounts.google.com/o/oauth2/auth?scope=https://www.googleapis.com/auth/drive&prompt=consent&access_type=offline
- For instance: Client ID, Client Secret the ones you have created
- Access Token URL = https://oauth2.googleapis.com/token
- Authorization URL= https://accounts.google.com/o/oauth2/auth?scope=<scope_url>&prompt=consent&access_type=offline. For <scope_url> please choose the one based on the level of access you want to offer. Here is the list: https://developers.google.com/identity/protocols/oauth2/scopes#drive
- You will be redirected and then grant access to our system. Also please note that you should have edited the URIs from the google drive page so as to point to our system, <aisera_url>/?id=aisera.oauth.oauthCommand where <aisera_url> is the one you are using to access our instance.
How to Set Up File Data with GDrive integration to Crawl Documents
- After creating the integration we will need to create the File Data data source that will crawl the documents from GDrive. For that you are going to choose “Data Sources'' option from the taskbar.
- Then we click the “+New Data Source” option.
- We choose the “Knowledge Systems" > “File Data” option:
- Afterwards we type into the data source configurations:
- For that we type into the “Name” of the DS. We also choose for “Files” the “Cloud Files” option. And there we select the integration we just created from the drop-down options and also the “Folder Path” where our data files we want to ingest are located in GDrive. Finally we click the “OK” option and our DS has been created:
- You can then access that from the data sources UI and can start ingestion:
How to Set Up File Data with GDrive integration for Reading CSV or JSON
After creating the integration we will need to create the File Data data source that will ingest the data from GDrive.
- For that, you are going to choose “Data Sources'' option from the task bar.
- Then we click the “+New Data Source” option.
- We choose the “File Data” option:
- Afterwards we type into the data source configurations:
- For that we type into the “Name” of the DS the “Data Type” of the data (e.g. Alerts, Incidents, etc.). We also choose for “Files” the “Cloud Files” option. And there we select the integration we just created from the drop-down options and also the “Folder Path” where our data files we want to ingest are located in gdrive. Finally, we choose the “File Format” of the data we are going to ingest (CSV, JSON, etc.). Please note that if we choose the data type of “Knowledge Base” we do not need to specify the type of documents we are going to ingest.
- Finally, after all of this are inserted:
- We click the “OK” option and our DS has been created:
You can then access that from the data sources UI, fix the mappings and start ingestion:
AISERA Inc. Confidential and Proprietary. Do not distribute. Copyright © 2021 All Rights Reserved. 1121 San Antonio Road, Suite C202, Palo Alto, CA 94303 | info@aisera.com |(650) 667 4308 This document is for authorized use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, or any other party. If you are not the intended recipient, then please promptly delete this message and any attachment and all copies and inform the sender.
Comments
0 comments
Please sign in to leave a comment.