An authorized Google Console account is required to use Google Drive.
Creating and Selecting Projects
- On the Google Cloud Console page, access the APIs & Services screen.
- Create a new project or select an existing project.
- If the resource to be added belongs to an organization account, the project must be derived from that organization.
Google Drive API Activation
- Access the APIs & Services screen.
- Enable the Google Drive API.
Service Account Creation and Access
- Access the IAM & Admin screen.
- Create a new Service Account if necessary.
- Select “Viewer” from the role list.
Key Creation
- Go to Manage Keys in the Service Account section.
- Click on Create New Key and create a key in JSON format.
- Get the following information from the downloaded JSON file:
- private_key
- client_email
- token_uri
The private_key information should be added to include the BEGIN and END PRIVATE KEY fields.
Getting FileID and FolderID
- Copy the sharing link of your file in Google Drive.
- Save the fileID and folderID information in the link.
Example link:
https://drive.google.com/file/d/1vNG371Q2ZAkC0X7e8AHm2lftTMRSqWO_/view?usp=sharing
Here 1vNG371Q2ZAkC0X7e8AHm2lftTMRSqWO_ is the fileID.
Defining Save Source
- Source Type: Google Drive
- Name: File name
- Update Interval in Hour: Determines how often the resource will be synchronized.
- Client Email, Private Key, Token Uri, Folder Id and File Id must be retrieved from the JSON file of the Google Drive service account.