Google Drive Upload

Description

The Google Drive Upload component allows you to upload files to Google Drive.

Transfer result data processed by Gravio to Google Drive

Upload and save device data to Google Drive as log data on a regular basis. This is for example useful to regularly upload CSV, Excel files, and image data acquired from cameras etc.

actioncomponent-google-drive-upload
Output PayloadDescription
cv.Payloadoutput payload of the previous component as is. (pass-through)

Component Properties

Property NameDescription
Inputpayload or filename
filenameFile name to be sent if "Input Properties" is a file name.
Content-TypeContent-Type of HTTP header
Designation MethodFolder path or folder ID
Drive folder pathGoogle Drive destination folder name
FileIDGoogle Drive destination folder ID
timeoutHTTP request response timeout value
OAuth2 Client IDClient ID of API 2.0 from GCP ※1
OAuth2 Client SecretSpecify Client Secret from GCP ※1
OAuth2 Redirect URLSpecify Redirect URL from GCP ※1
OAuth2 Access TokenPress the Get Token button to get the token. You can also update the token by pressing the Update button ※1 ※2

See Google Drive OAuth2 Setup for an example of OAuth2 configuration in GCP.

Component Variables

Component VariablesDescription
cv.ContentTypeContent-Type of HTTP header
cv.FileIDFile ID
cv.FolderIDFolder ID
cv.DriveFilenameGoogle Drive destination filename

How to get OAuth2 Access Token

Go to the settings and open the Base Property Profiles view, add your Google Authentication.

settings-base-property-profile-google

Once you have inserted your Client ID and and Secret, you can click on the "Obtain" button to retrieve your token using your web browser.

obtaining-google-oauth-token

OAuth2 access token button to display the Get OAuth 2.0 access token panel. Press the Open Browser button to obtain the token. Once the token is obtained, press the Set button to automatically set it to the OAuth2 access token property.

settings-oauth-authentication-popup

Follow the steps on your browser, and return to Gravio Studio to set the authentication.