Google Drive Integration
Automatically save a backup copy of every signed PDF to your Google Drive. WPsigner’s Google Drive integration uses a one-click OAuth connection — no API keys, no manual configuration, and no developer setup required.
How It Works
Section titled “How It Works”Document Signed → PDF Finalized → Backup Uploaded to Google Drive → Audit Trail LoggedWhen a document is fully signed and completed, WPsigner automatically:
- Generates the final signed PDF
- Creates a folder called “WPsigner Signed Backups” in your Google Drive (first time only)
- Uploads the signed PDF to that folder
- Logs the backup to the document’s audit trail
| Feature | Details |
|---|---|
| Connection | One-click OAuth — no API keys needed |
| Trigger | Automatic backup when a document is completed |
| Folder | WPsigner Signed Backups (created automatically) |
| File naming | {Document Title}_{Date}.pdf |
| Privacy | Files are private — only your Google account can access them |
| Encryption | OAuth tokens are encrypted using WordPress salts |
| Token refresh | Access tokens auto-refresh — no re-authentication needed |
Prerequisites
Section titled “Prerequisites”- WPsigner v2.0.0 or later
- A Google account (personal or Google Workspace)
- WordPress admin access (the
manage_optionscapability is required)
Step 1: Connect Google Drive
Section titled “Step 1: Connect Google Drive”Navigate to the Integration
Section titled “Navigate to the Integration”You can access the Google Drive settings in two ways:
Option A — From the Integrations page:
- Go to WPsigner → Integrations in your WordPress admin
- Find the Google Drive card under Cloud Storage
- Click Configure
Option B — From Settings:
- Go to WPsigner → Settings
- Click the Google Drive tab
Authorize WPsigner
Section titled “Authorize WPsigner”- On the Google Drive settings page, you’ll see the “Connect with Google Drive” button
- Click the button — you will be redirected to Google’s authorization page
- Sign in to your Google account (or select one if you’re logged into multiple accounts)
- Review the permissions — WPsigner requests access to:
- Create and manage files in Google Drive that WPsigner creates
- View your email address (to display which account is connected)
- Click Allow to grant access
- You’ll be redirected back to your WordPress admin with a “Successfully connected!” confirmation message
Step 2: Verify the Connection
Section titled “Step 2: Verify the Connection”After connecting, the settings page shows:
Connection Status
Section titled “Connection Status”- Green indicator: Connected to Google Drive
- Email address: The Google account connected (e.g.,
you@gmail.com)
Connection Details
Section titled “Connection Details”| Item | Value |
|---|---|
| Backup Folder | WPsigner Signed Backups |
| Privacy | Files are private (only you can access) |
| Auto-backup | PDFs are saved automatically after signing |
Test the Connection
Section titled “Test the Connection”Click the “Test Connection” button to verify everything works:
- WPsigner uploads a small test file to your Google Drive
- If successful, you’ll see a confirmation message: ”✓ Test file uploaded successfully”
- You can check your Google Drive → “WPsigner Signed Backups” folder to see the test file
Step 3: Use It
Section titled “Step 3: Use It”Once connected, there’s nothing else to do. The integration works automatically:
- Create and send documents for signing as you normally would
- Signers complete the signing process
- When all signers have signed, the document status changes to Completed
- WPsigner automatically uploads the signed PDF to your Google Drive
- The upload is logged in the audit trail for compliance tracking
Where to Find Your Backups
Section titled “Where to Find Your Backups”- Open Google Drive
- Navigate to “WPsigner Signed Backups” folder
- You’ll see all your signed PDFs organized by filename
File Naming Convention
Section titled “File Naming Convention”Backup files follow this naming pattern:
{Document_Title}_{Date}.pdfExamples:
Service_Agreement_2026-02-07.pdfNDA_John_Smith_2026-02-07.pdfEmployment_Contract_2026-02-07.pdf
Managing the Integration
Section titled “Managing the Integration”Disconnect Google Drive
Section titled “Disconnect Google Drive”If you need to disconnect:
- Go to WPsigner → Integrations → Google Drive (or Settings → Google Drive tab)
- Click the “Disconnect” button
- Confirm the disconnection
After disconnecting:
- No more backups will be uploaded to Google Drive
- Existing backups in Google Drive are not deleted — they remain in your Drive
- You can reconnect at any time by clicking “Connect with Google Drive” again
Reconnect with a Different Account
Section titled “Reconnect with a Different Account”To switch Google accounts:
- Disconnect the current account
- Connect again — you’ll be prompted to choose a Google account
- Select the new account and authorize
Security & Privacy
Section titled “Security & Privacy”Token Storage
Section titled “Token Storage”| Security Layer | Description |
|---|---|
| AES-256-CBC encryption | OAuth tokens are encrypted before storage |
| WordPress salts | Encryption keys derive from your wp-config.php salts |
| Random IV | Each encryption uses a unique initialization vector |
| No credentials stored | Your Google password is never stored — only OAuth tokens |
Permissions Scope
Section titled “Permissions Scope”WPsigner only requests the minimum necessary Google API scopes:
| Scope | Purpose |
|---|---|
drive.file | Create and manage files that WPsigner uploads (cannot access your other Drive files) |
userinfo.email | Display which Google account is connected |
WPsigner cannot read, modify, or delete any other files in your Google Drive. The drive.file scope only grants access to files that WPsigner itself has created.
Token Refresh
Section titled “Token Refresh”- Access tokens expire after 1 hour
- WPsigner automatically refreshes tokens using the stored refresh token
- This means you never need to re-authorize — the connection stays active
- If a refresh fails, a transient error is logged but no data is lost
Developer Hooks
Section titled “Developer Hooks”WPsigner provides WordPress hooks for developers who want to customize the Google Drive integration:
Filter: Customize Backup Filename
Section titled “Filter: Customize Backup Filename”// Change the filename format for Google Drive backupsadd_filter('wps_google_drive_filename', function($file_name, $document_id, $document) { // Example: Include document ID in filename return "WPS-{$document_id}_{$document->title}_" . wp_date('Y-m-d') . '.pdf';}, 10, 3);Action: After Successful Upload
Section titled “Action: After Successful Upload”// Perform actions after a PDF is backed up to Google Driveadd_action('wps_google_drive_uploaded', function($document_id, $file_id, $file_name) { // Example: Send a notification error_log("Document #{$document_id} backed up to Google Drive: {$file_name}");
// Example: Store the Google Drive file ID in document meta update_post_meta($document_id, '_gdrive_file_id', $file_id);}, 10, 3);Troubleshooting
Section titled “Troubleshooting”Common Issues
Section titled “Common Issues”| Issue | Cause | Solution |
|---|---|---|
| ”Connect with Google Drive” button doesn’t work | Authorization URL not generated | Refresh the page and try again |
| Redirect after authorization fails | Callback URL blocked | Ensure your site is accessible publicly (Google needs to redirect back) |
| Test upload fails | Outgoing HTTP requests blocked | Contact your hosting provider to allow requests to googleapis.com |
| PDFs not appearing in Google Drive | Integration disconnected or tokens expired | Check the connection in Settings → Google Drive |
| ”Failed to decode OAuth tokens” error | Corrupted callback data | Try disconnecting and reconnecting |
| Backup folder not found in Drive | Folder was manually deleted | WPsigner will recreate it on the next upload |
Checking the Audit Trail
Section titled “Checking the Audit Trail”Every Google Drive backup is logged in the document’s audit trail:
- Go to WPsigner → Documents
- Open the completed document
- Check the Audit Trail section
- Look for the entry: “PDF backed up to Google Drive: {filename}”
If this entry is missing, the upload may have failed silently. Check your WordPress debug log for more details.
Debug Logging
Section titled “Debug Logging”Enable WordPress debug logging to troubleshoot connection issues:
// In wp-config.phpdefine('WP_DEBUG', true);define('WP_DEBUG_LOG', true);Then check wp-content/debug.log for entries related to Google Drive.
Frequently Asked Questions
Section titled “Frequently Asked Questions”Does it work with Google Workspace (G Suite)?
Section titled “Does it work with Google Workspace (G Suite)?”Yes. The integration works with personal Google accounts and Google Workspace (formerly G Suite) accounts.
Does it count against my Google Drive storage?
Section titled “Does it count against my Google Drive storage?”Yes. Uploaded PDFs count against your Google Drive storage quota. Signed PDFs are typically small (100 KB–2 MB each), so this is unlikely to be an issue.
What happens if my Google Drive is full?
Section titled “What happens if my Google Drive is full?”The upload will fail, and an error will be logged. The signed PDF remains safely stored on your WordPress server. You can free up space in Google Drive and future uploads will resume automatically.
Can I backup to a specific folder?
Section titled “Can I backup to a specific folder?”The folder is automatically set to “WPsigner Signed Backups”. Currently, the folder name cannot be changed through the UI, but developers can modify the behavior using WordPress filters.
Do older documents get backed up retroactively?
Section titled “Do older documents get backed up retroactively?”No. Only documents completed after the integration is connected are backed up. If you need to backup older documents, you can download the signed PDFs manually and upload them to Google Drive.
Is the connection shared between WordPress users?
Section titled “Is the connection shared between WordPress users?”Yes. The Google Drive connection is site-wide. All WordPress administrators share the same connection. Documents completed by any user will be backed up to the same Google Drive account.
Next Steps
Section titled “Next Steps”- Creating Documents — Learn how to create and send documents
- Audit Trails — Track document activity
- Fluent Forms Integration — Auto-create documents from form submissions
- WhatsApp Integration — Send signing links via WhatsApp