Font Size:
Ask Joget AI

Google API Integration Service

Introduction

The Google API Integration Service plugin allows Google Drive integration using a Google service account. It provides app-level Google credential configuration plus a file upload field and store binder that upload submitted files directly to Google Drive. It includes:

  • Google API Configuration
  • Google Drive File Upload
  • Google Drive File Store Binder

Google API Configuration

App-level plugin default that stores the shared Google service account credentials: the service account's client_email (as Client ID) and PEM private key (as Client Secret) from its Google Cloud JSON key. Configured once per app; other Google Drive plugins read these credentials to authenticate all Drive API requests. Does not itself connect to Drive; it only holds the credentials.

Google Drive File Upload

Form Element (file upload field) that pairs the standard file upload UI with the Google Drive File Store Binder - Service Account, so files selected by users are stored in Google Drive instead of local/DB storage. Configured with Google Drive Email (optional, for Workspace impersonation), Google Drive Parent Folder ID (optional, target folder shared with the service account), and Google Drive Base Folder (display folder name for organizing uploads).

Google Drive File Store Binder

Works together with Google Drive File Upload; not able to configure as an independent plugin. Form Store Binder that uploads files attached via a Google Drive File Upload field to Google Drive, using the credentials from Google API Configuration - Service Account. On form submit, it creates a folder structure in Drive (Base Folder / Table Name / Record ID / filename), reusing existing folders where found. Requires either a Google Workspace user for domain-wide delegation impersonation (Google Drive Email) or a Drive folder shared with the service account (Google Drive Parent Folder ID). A bare service account cannot own files on its own due to Google's storage quota restrictions.

Plugin Info

Plugins Available in the Bundle:

  1. Google API Configuration
  2. Google Drive File Upload
  3. Google Drive File Store Binder

This plugin bundle is compatible with Joget DX 8 and onwards.

Expected Outcome

Able to upload form file attachments to Google Drive via a Google service account, with a shared credential configuration used across all Drive-enabled form elements.

Get Started

Prerequisites

Google Cloud Console

You need a Google account and access to the Google Cloud Console.

Step 1: Create a project

Open the Google Cloud Console and create a new project, or select an existing one. Note the project name shown in the selector at the top of the page so you can return to it later.

Step 2: Create a service account

Create a service account for the project. You can refer to Google Developers: Creating an account for more details.

Step 3: Add a key for the service account

Click on Keys > Add Key > Create New Key.

Choose JSON for the key type. Click Create, and the private key will download automatically. Store the file, as we will need to use it later.

Step 4: Enable the Google Drive API

From the main navigation menu, go to APIs & Services > Library, search for Google Drive API, and click Enable.

Steps

Where to get the plugin

You can download this plugin from the Joget Marketplace.

How to install

  1. Click Download on this plugin screen (It will be a .jar file).
  2. Go to your Joget localhost or server. In the Joget Console, go to Admin Bar > System Settings > Manage Plugins and click the Upload Plugins button.
  3. Under Upload Plugin, select the plugin .jar file you downloaded and click Upload.
  4. Depending on the plugin type, you can now view your new plugin in your form, List, or UI Builder.
  5. Remember to uninstall the old plugin before uploading a new version.
  6. The Joget Knowledge Base has more information on managing and developing plugins.

How to use it

Configuring Google API Configuration

Go to Plugins > Plugin Default Properties menu and click on the plugin to configure it.

Get the values from the JSON file retrieved in Step 3: Add a key for the service account. Retrieve only the values of client_email and private_key and input them in the respective fields as shown in the picture below.

Configuring Google Drive File Upload

Create a new form and drag the Google Drive File Upload element into the form. If you have not configured the Google API Configuration element, it will show the error below. If everything has been configured successfully with correct credentials, there will not be any error shown.

Google API Configuration Properties

Configure Google API Configuration

Fields to configure:

  • OAuth 2.0 Client ID: from Step 3
  • OAuth 2.0 Client Secret: from Step 3

Configure Google Drive File Upload

Configure File Upload

Fields to configure:

  • Label: Menu label.
  • ID: Menu element unique ID.
Configure Google Drive

Fields to configure:

  • Google Drive Parent Folder ID: ID of a Drive folder you own, shared with the service account's email as Editor. Found in the folder's URL: drive.google.com/drive/folders/THIS_PART. Leave blank to create folders in the service account's own (hidden) Drive.
  • Google Drive Email: Only needed for Google Workspace domain-wide delegation. Leave blank for a personal Google account; uploads will use the service account's own identity instead.
  • Google Drive Base Folder: Folder name to hold the file uploads. Files are organized under it as <Base Folder>/<table name>/<record ID>/<filename>. Defaults to "Joget Google Drive" if left blank.

Advanced Options

Data
  • Validator: Attach a Validator plugin to validate the input value.
    • When will validation take place?
      Validation will take place whenever a form is submitted, except when it is submitted as "Save as Draft".
  • Maximum File Size per File (KB): Maximum File Size (KB) in Integer. For example, if the maximum allowable file size is 10 megabytes, enter "10240" in this field, which represents 10,240 kilobytes.
  • Error Message (File size limit exceeded): Error Message when the submitted file size exceeds.
  • File Type (.pdf;.doc): Accepted file type extension(s). (Semicolon-separated values)
    • Example: .pdf, .doc
  • Error Message (File type mismatch): This error appears when the submitted file type does not match the allowed formats.
Permission
  • Permission: Manage who can access the uploaded file. Read more at Permission Control.
    • Available options:
      • Logged In Users
      • Public
      • Custom
UI
  • Size: Specifies the width, in characters, of an <input> element.
  • Enable multiple files upload: When checked, multiple files can be uploaded.
  • Write Permission: Determines if one can upload a file.
    • Readonly
    • Disabled
  • Download as Attachment: Determines the download behaviour.
Created by Miao Xuan Ng Last modified by Debanraj Ravindran on Sep 08, 2026