Gravity Forms Integrate Google Drive Plugin
Gravity Forms Integrate Google Drive Plugin
Connects Gravity Forms to Google Drive. Automatically upload form submissions, files, and organize folders.
1. Overview & System Architecture
Gravity Forms Integrate Google Drive Plugin connects WordPress forms directly to Google Drive storage, providing automated, background file synchronization without requiring third-party middleware such as Zapier or Make.
When form submissions contain file uploads, client contracts, resumes, or multimedia attachments, files are uploaded directly to specified Google Drive folders (including My Drive and Shared Team Drives) using Google Drive API v3.
Core Architectural Capabilities:
• Native Direct-to-Google Architecture: Uploads transfer directly between your WordPress hosting server and Google Drive over encrypted TLS 1.3 connections, eliminating per-task webhook fees, third-party data inspection, and middleware payload limits.
• Dynamic Folder Path Routing: Create folder hierarchies on-the-fly inside Google Drive using standard Gravity Forms Merge Tags (e.g., /{form_title}/{date_created:Y-m}/{Client Name:1}).
• Dual Authentication Models: Choose between seamless 1-Click GravityHive OAuth or custom Enterprise Google Cloud Console App credentials (Client ID and Client Secret).
• Multi-Field & Selective Upload Targeting: Choose whether to sync all form upload fields or isolate specific single/multi-file upload fields to separate Google Drive destinations.
System Requirements:
• WordPress: Version 6.0 or higher (fully tested up to WordPress 6.7+).
• Gravity Forms: Version 2.7 or higher (tested through Gravity Forms 2.8 and 2.9).
• PHP Runtime: PHP 8.0, 8.1, 8.2, or 8.3 with the cURL, OpenSSL, and JSON extensions enabled.
• SSL / HTTPS: A valid TLS 1.2+ certificate is required for OAuth2 callback authorization.
2. Installation & License Activation
You can install the plugin via the standard WordPress administration panel or programmatically via WP-CLI.
Standard WordPress Installation:
1. Download the signed distribution ZIP file (gravity-forms-integrate-googledrive-v1.0.0.zip) from your GravityHive customer account dashboard.
2. Log into your WordPress administrative panel and navigate to Plugins → Add New → Upload Plugin.
3. Select the downloaded ZIP package, click Install Now, and then click Activate Plugin.
License Key Activation:
To enable automatic 1-click security patches, background updates, and support verification, activate your product license:
1. In your WordPress admin sidebar, navigate to Forms → Settings → GravityHive Licenses.
2. Paste your 32-character license key into the Gravity Forms Integrate Google Drive Plugin field.
3. Click Activate License. When verified, the status indicator turns green, activating automatic updates from the WordPress Plugins screen.
# Alternative WP-CLI installation & license activation
wp plugin install /path/to/gravity-forms-integrate-googledrive-v1.0.0.zip --activate
wp option set gravityhive_gravity_forms_integrate_googledrive_plugin_license_key "YOUR_32_CHAR_LICENSE_KEY"3. Connecting Your Google Drive Account
Before configuring forms, authorize your WordPress site to interact with Google Drive via OAuth2.
Step-by-Step Connection Guide:
1. In your WordPress dashboard, navigate to Forms → Settings → Google Drive.
2. Select your preferred Connection Mode:
• Automatic (Recommended): Click Connect with Google to authenticate instantly via the pre-verified GravityHive Google App. Ready in under 15 seconds without setting up a Google Cloud project.
• Manual (Enterprise): Select Manual to use your own custom Google Cloud Console project. Enter your OAuth Client ID and Client Secret. Ensure your authorized redirect URI in Google Cloud Console is configured to:
https://yourdomain.com/wp-admin/admin.php?page=gf_settings&subview=gravityhivegoogledriveaddon
3. Configure Subfolder Depth Limit: Set the maximum folder nesting depth (e.g. Level 2 or Level 3) that the plugin queries when listing existing Drive destination directories.
4. Click Save Settings. The status badge will display "Connected to GoogleDrive" in green.

4. Form Settings & Dynamic Folder Routing
After establishing the global Google Drive connection, you can configure upload rules for any specific Gravity Form.
Configuring Form Settings:
1. Navigate to Forms → hover over your target form → click Settings → Google Drive.
2. Enable Integration: Check the "Google Drive Enabled" checkbox to activate syncing for this form.
3. Send Link To Email: Toggle this option if you want the generated Google Drive direct access links included automatically in notification emails.
4. Destination Folder (Root): Select your target parent folder from the interactive dropdown. The plugin automatically fetches available root folders from My Drive and Shared Drives.
5. Dynamic Subfolder Routing (Merge Tags): Check "Enable Sub Folder" and select "Folder Merge Tags". In the Sub Folder Name field, construct dynamic nested subdirectories using Gravity Forms Merge Tags. For example:
{form_title}/{date_created:Y-m}/{entry_id} - {Client Full Name:1}
When a submission occurs, the plugin automatically inspects Google Drive, creates any missing subfolders in the hierarchy, and deposits the uploaded files into the exact destination path.
6. File Upload Field Targeting: Choose "All File Upload Fields" to sync all attachments across the form, or select a specific upload field.
7. Click Save Settings to activate the configuration.

5. Shared Drives & Folder Hierarchy Picker
The plugin includes an interactive Google Drive hierarchy explorer that seamlessly traverses deep folder trees in real time.
Key Hierarchy Features:
• My Drive & Shared Drives Support: Access personal Google Drive folders as well as enterprise Google Workspace Shared Drives (Team Drives).
• On-Demand Folder Tree Loading: Subfolder trees load dynamically to prevent browser memory slowdowns even on Google Drive accounts containing tens of thousands of folders.
• Automatic Permission Preservation: Uploaded files inherit the security and sharing permissions of the destination Google Drive parent folder, ensuring internal enterprise access controls are respected.

6. Developer Hooks & Customization Reference
For developer teams and agencies with specialized workflow requirements, the plugin provides native WordPress filter hooks to customize upload behaviors programmatically.
Supported Field Types Filter: Use gravityhivegravityhivegoogledriveaddon_fields_support to add custom or third-party file upload field types (such as advanced canvas signature pads or custom file uploaders) to the eligible sync roster.
Folder Choices Filter: Use gravityhive_googledrive_folder_choices to dynamically modify, filter, or inject custom folder IDs based on user roles or runtime conditions.
/**
* Example 1: Add custom file upload field types to Google Drive sync
* Place inside your theme's functions.php or a custom mu-plugin.
*/
add_filter( 'gravityhivegravityhivegoogledriveaddon_fields_support', function( $supported_types ) {
// Enable support for custom fileupload field types
$supported_types[] = 'signature';
$supported_types[] = 'custom_uploader';
return array_unique( $supported_types );
} );
/**
* Example 2: Dynamically filter or alter Google Drive destination folders
*/
add_filter( 'gravityhive_googledrive_folder_choices', function( $choices ) {
// Customize folder labels or filter restricted folders for specific WordPress roles
if ( ! current_user_can( 'administrator' ) ) {
$choices = array_filter( $choices, function( $item ) {
return strpos( $item['label'], 'Restricted' ) === false;
} );
}
return $choices;
} );7. Troubleshooting & Diagnostics
If an upload fails or credentials become invalid, use Gravity Forms' native Logging engine to view comprehensive diagnostic traces.
Enabling Debug Logs:
1. In your WordPress admin, navigate to Forms → Settings → Logging.
2. Toggle Logging to "Active" and find "Google Drive Integration for Gravity Forms" in the plugin list.
3. Set the Log Level to "All Messages" or "Log Warnings & Errors" and click Save Settings.
4. Submit a test form on your website with an attached file.
5. Return to Forms → Settings → Logging and click "View Log" next to Google Drive to inspect the exact Google API response.
Common Issues & Solutions:
• 401 Unauthorized / Invalid Credentials: Your OAuth refresh token has been revoked or expired. Navigate to Forms → Settings → Google Drive, click Disconnect, and reconnect your Google account.
• 403 Storage Quota Exceeded: Your Google Drive storage is full. Free up space on your Google account or upgrade storage via Google One / Google Workspace.
• File Upload Fails on Large Files: Check your hosting server's PHP configuration. Ensure upload_max_filesize and post_max_size in php.ini are configured larger than the file being uploaded (e.g. 64M or 128M).
• Redirect URI Mismatch (Error 400): If using Manual mode, verify that the Authorized Redirect URI in your Google Cloud Console Credentials tab matches your exact WordPress admin URL.
8. Enterprise Security & GDPR Compliance
GravityHive adheres to strict enterprise security standards and data governance best practices:
• Zero Data Proxying: Files stream directly from your WordPress server to Google APIs via encrypted HTTPS/TLS 1.3 endpoints. GravityHive servers never receive, proxy, or cache your form submission files or credentials.
• Encrypted Token Storage: Sensitive OAuth tokens, client secrets, and refresh credentials are encrypted at rest using WordPress cryptographic salts before being saved to the database.
• GDPR & Privacy Compliance: Integration records are tied directly to Gravity Forms entries. When an administrator processes a WordPress "Erase Personal Data" request, all associated Google Drive metadata and entry tokens are scrubbed automatically.
Features
- Secure Google OAuth Integration (Automatic Gravity Hive App or Custom Google Cloud Project)
- Automatic File & Attachment Upload directly to Google Drive
- Dynamic Subfolder Generation via Merge Tags (Entry ID, Date, Form Fields)
- Multiple Feeds with Advanced Conditional Logic
- Insert Google Drive File and Folder Links in Email Notifications
- 1 Year of Continuous Updates & Priority Support included
- Seamless integration with Gravity Forms
Deploy Gravity Forms Integrate Google Drive Plugin on Your Site Today
Includes instant ZIP download, license key, and 30-day 100% money-back guarantee.
Need more help with Gravity Forms Integrate Google Drive Plugin?
If you need assistance with installation, configuration, or have any technical questions, our support team is here to help.
Contact Support