Codebeamer X User Guide > Cloud Edit > Google Drive Integration
Google Drive Integration
You can integrate Google Drive in Codebeamer X to manage Google Docs, Google Sheets, or Google Slides office documents. This documentation provides information about the following:
Setup and configuration of the Google services, such as:
A Google account
Google Cloud Platform
Google Drive libraries in the Google Cloud Platform
Configuration in Codebeamer X using the application configuration
Configuring the Google Drive Service in the Google Cloud Platform
To set up and configure the Google Drive services, follow these steps:
1. Open the https://console.cloud.google.com/ address in your browser.
2. Sign in with an existing Google account or create a new one by clicking Create account.
3. Select an existing project or create a new one by following the steps in Create a Google Cloud project.
4. Enable the Google Drive API:
a. Click APIs & Services, then Enable APIs and services.
b. Type Drive API and press ENTER.
c. In the results, click Google Drive API.
d. Click ENABLE to enable the Google Drive API for your project.
5. Configure the Google Drive API:
a. From the left-side navigation menu, select OAuth consent screen.
b. Select the relevant user type > CREATE.
c. Provide the app information and click SAVE AND CONTINUE.
d. Click ADD OR REMOVE SCOPES.
e. In the Update selected scopes panel on the right, click Enter property name or value, type drive.file and click https://googleapis.com/auth/drive.file in the Values pop-up window.
f. Under Filter, select Select all rows to select ../auth/drive.file and then click UPDATE at the bottom of the panel.
g. Click ADD OR REMOVE SCOPES.
h. In the Update selected scopes panel on the right, click Enter property name or value, type googleapis.com/auth/drive.readonly and then click https://www.googleapis.com/auth/drive.readonly in the Values window.
i. Under Filter, select Select all rows to select .../auth/drive.readonly and then click UPDATE in the lower area of the panel.
* 
../auth/drive.file is listed as a non-sensitive scope because it has permissions to see, edit, create, and delete only the specific Google Drive files you use with the Google Drive API application.
.../auth/drive.readonly is listed as a restricted scope because it has permissions to see and download all your Google Drive files. This scope is required so you can import files from your Google Drive, and then create items in the document trackers using those files.
j. Click SAVE AND CONTINUE.
6. If the user type you have selected in the OAuth consent screen window is External, choose some test users by clicking + ADD USERS, and then click SAVE AND CONTINUE.
If the user type you have selected in the OAuth consent screen window is Internal, all users of the organization can access the application automatically.
7. Click BACK TO DASHBOARD.
8. Create the OAuth credentials for the Google Drive API:
a. From the left-side navigation menu, select Credentials and click + CREATE CREDENTIALS > OAuth client ID.
b. Application type—Select Web application.
c. Name—Provide a name for your OAuth client.
d. Under Authorized redirect URIs, click + ADD URI and add your redirect URI.
e. Click CREATE.
f. The OAuth client created window appears. Take note of the Client ID and Client secret.
9. To provide a file picker interface to select files from Google Drive, enable the Google Picker API:
a. Click Enabled APIs & Services > + ENABLE APIS AND SERVICES.
b. Type Google Picker API and press ENTER.
c. In the results, click Google Picker API.
d. Click ENABLE to enable the Google Picker API for your project.
10. Configure the Google Picker API:
a. Click CREATE CREDENTIALS.
b. Choose your data preference and click NEXT.
c. Take note of your API key and click DONE.
d. PTC recommends restricting the Google Picker API key. To do so, click Credentials in the left-side navigation menu and then click the API key created in the previous step.
e. Under API restrictions, select Restrict key > Select APIs > filter and then select Google Picker API > SAVE.
11. Locate the application ID of your project:
a. In the upper left corner, click the navigation menu > Cloud overview > Dashboard.
b. The application ID appears as Project number in the Project info section.
Configuring the Google Drive Properties in the Application Configuration
After setting up all the necessary secrets credentials and services in your Google Cloud project, you can add the appropriate application configuration properties to connect Codebeamer X and Google Drive. Follow these steps to finalize the configuration:
1. Sign in to Codebeamer X as a user with the system administrator rights.
2. In the upper toolbar, click System Administration > Application Configuration.
3. Add the following JSON properties:
"editInGoogleCloud": {
"enabled": true,
"clientId": "<The Google Drive OAuth 2.0 Client ID>",
"clientSecret": "<The Google Drive OAuth 2.0 Client secret>",
"parentFolderName": "<The folder name to be created in your Google Drive>",
"apiKey": "<The Google Picker API key>",
"appId": "<The Application ID of your Google Cloud project>",
"redirectURI": "<The Authorized redirect URI of your OAuth client>"
},
"editInMicrosoftCloud" : {
"enabled" : false
}
* 
"editInMicrosoftCloud": {"enabled": false} is necessary because the Codebeamer X cloud edit feature supports the integration with Google Drive or Microsoft OneDrive, but not with both simultaneously. When both integrations are enabled, the cloud edit feature does not work.
4. Replace the values in the angle brackets with the relevant data from your Google Drive project. Refer to "editInGoogleCloud" セクション for more details about this configuration.
5. Click Save at the top. The Google Drive integration is now fully configured in your Codebeamer X.
これは役に立ちましたか?