WP Manifestindependent plugin directory
manifest / forms / wpforms-google-sheets

WPForms Google Sheets Integration

Send WPForms submissions to Google Sheets via Apps Script webhook

★ 0stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/heysaminu/wpforms-google-sheets/archive/refs/heads/main.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

Version: 1.0.0
Type: WPForms Marketing Provider

Send WPForms submissions directly to Google Sheets via Apps Script - no API keys, no authentication hassle!


🎯 Features

  • ✅ Native WPForms Integration - Appears in Marketing tab
  • ✅ Per-Form Configuration - Each form can have different spreadsheet
  • ✅ Multiple Connections - One form can send to multiple sheets
  • ✅ Conditional Logic Support - Works with WPForms conditional logic
  • ✅ Metadata Toggle - Include/exclude timestamp, form name, entry ID
  • ✅ Auto-Create Sheets - Sheet tabs created automatically
  • ✅ Auto-Add Headers - Column headers added on first submission
  • ✅ Global Default Webhook - Set once, use everywhere
  • ✅ Activity Logging - Optional logging for debugging

📦 Installation

Method 1: WordPress Admin

  1. Download the ZIP file
  2. Go to Plugins → Add New → Upload Plugin
  3. Upload wpforms-google-sheets.zip
  4. Click Install Now
  5. Click Activate

Method 2: Manual

  1. Extract the ZIP
  2. Upload wpforms-google-sheets folder to /wp-content/plugins/
  3. Activate in WordPress admin

🚀 Quick Setup (5 Minutes)

Step 1: Google Apps Script (One Time)

  1. Open your Google Spreadsheet
  2. Click Extensions → Apps Script
  3. Delete default code, paste this:
function doPost(e) {
  try {
    var data = JSON.parse(e.postData.contents);
    var ss = SpreadsheetApp.getActiveSpreadsheet();
    var sheetName = data.sheetName || 'Sheet1';
    var sheet = ss.getSheetByName(sheetName);

    if (!sheet) {
      sheet = ss.insertSheet(sheetName);
    }

    var lastRow = sheet.getLastRow();
    if (lastRow === 0 && data.headers) {
      sheet.appendRow(data.headers);
    }

    if (data.values) {
      sheet.appendRow(data.values);
    }

    return ContentService.createTextOutput(JSON.stringify({
      'status': 'success',
      'message': 'Data added successfully',
      'row': sheet.getLastRow()
    })).setMimeType(ContentService.MimeType.JSON);

  } catch (error) {
    return ContentService.createTextOutput(JSON.stringify({
      'status': 'error',
      'message': error.toString()
    })).setMimeType(ContentService.MimeType.JSON);
  }
}
  1. Click Deploy → New deployment
  2. Type: Web app
  3. Execute as: Me
  4. Who has access: Anyone
  5. Click Deploy and authorize
  6. Copy the Web app URL

Step 2: WordPress (Optional - Set Default)

  1. Go to Settings → WPForms Sheets
  2. Paste your webhook URL as default
  3. Save

Step 3: Configure a Form

  1. Edit a form in WPForms
  2. Go to Marketing tab
  3. Click Add New Connection
  4. Select Google Sheets
  5. Configure:
    • Connection Name: e.g., "Main Spreadsheet"
    • Enable Connection: ✓
    • Webhook URL: (leave empty to use default)
    • Sheet Tab Name: e.g., "Contact"
    • Include Metadata: ✓
  6. Save form
  7. Test it!

🎨 User Experience

In WPForms Builder:

Form Settings
├── General
├── Notifications
├── Confirmations
├── Marketing
│   ├── Constant Contact
│   ├── Mailchimp
│   ├── Google Sheets ← NEW!
│   └── Add New Connection
└── Payments

When you click "Add New Connection" → Select "Google Sheets":

✅ Enable Connection

Webhook URL: [___________________] (optional - uses default)
Sheet Tab Name: [___Sheet1____]
☑ Include metadata

[How it works:]
1. User submits this form
2. Data sent to Google Sheet
3. Headers added automatically
4. New row per submission

💡 Usage Examples

Example 1: Simple Contact Form

Setup:

  • Default webhook in plugin settings
  • Contact form with Google Sheets connection
  • Webhook URL: (empty - uses default)
  • Sheet Tab: "Contact"
  • Metadata: ✓

Result:

Google Sheet: "Contact" tab
Columns: Timestamp | Form Name | Entry ID | Name | Email | Message

Example 2: Multiple Forms, Different Sheets

Contact Form:

Connection 1:
  Webhook: https://script.google.com/.../exec-1
  Sheet: "Leads"

Newsletter Form:

Connection 1:
  Webhook: https://script.google.com/.../exec-2
  Sheet: "Subscribers"

Quote Form:

Connection 1:
  Webhook: https://script.google.com/.../exec-3
  Sheet: "Quotes"

Example 3: Multiple Sheets for One Form

One form can send to multiple spreadsheets:

Sales Form:

Connection 1: Main CRM
  Webhook: https://script.google.com/.../crm
  Sheet: "Sales"

Connection 2: Marketing Analytics
  Webhook: https://script.google.com/.../analytics
  Sheet: "Conversions"

⚙️ Features in Detail

Per-Form Configuration

Each form can have:

  • Multiple Google Sheets connections
  • Custom webhook URL or use default
  • Custom sheet tab name
  • Metadata on/off

Global Settings

  • Default webhook URL (optional)
  • Activity logging enable/disable
  • Setup guide

Smart Features

  • Auto-creates sheet tabs if they don't exist
  • Auto-adds headers on first submission
  • Handles checkbox/multi-select fields (comma-separated)
  • Skips non-data fields (pagebreak, divider, HTML)
  • Handles 302/400 status codes from Apps Script
  • Silent failures (doesn't break form)

Conditional Logic

Works with WPForms conditional logic:

  • Show/hide Google Sheets connection based on conditions
  • Enable/disable based on field values
  • Full WPForms conditional logic support

🔐 Security

  • ✅ No API keys needed
  • ✅ No OAuth authentication
  • ✅ Webhook URLs are private
  • ✅ SSL verification can be disabled for some servers
  • ✅ Error logging (optional)
  • ✅ Silent failures (user doesn't see errors)

📊 File Structure

wpforms-google-sheets/
├── wpforms-google-sheets.php              # Main plugin file
├── includes/
│   └── class-google-sheets-provider.php   # WPForms provider class
├── assets/
│   └── icon-google-sheets.svg             # Provider icon
└── README.md                              # This file

🆚 Comparison with Other Solutions

Feature This Plugin Zapier Native API
Cost Free $20+/month Free but complex
Setup Time 5 minutes 10-15 minutes 30+ minutes
API Keys None None Required
Authentication None OAuth OAuth
Rate Limits None (Apps Script) Yes Yes
Form Updates Automatic Manual reconnect Manual
Offline No No No

🐛 Troubleshooting

Issue: Google Sheets not in Marketing tab

Check:

  1. Is WPForms installed and active?
  2. Is this plugin activated?
  3. Try deactivating and reactivating

Solution:

wp plugin deactivate wpforms-google-sheets
wp plugin activate wpforms-google-sheets

Issue: Data not appearing in sheet

Check:

  1. Is webhook URL correct?
  2. Did you authorize the Apps Script?
  3. Is connection enabled in form?
  4. Check WPForms entry was created

Test:

# Test webhook with curl
curl -X POST YOUR_WEBHOOK_URL \
  -H "Content-Type: application/json" \
  -d '{"sheetName":"Test","headers":["Test"],"values":["Working"]}'

Issue: Some fields not showing

Check:

  • Pagebreak, divider, HTML fields are skipped (intentional)
  • Empty fields still create columns
  • Arrays (checkboxes) are comma-separated

📝 Changelog

[1.0.0] - 2026-02-24

Initial Release:

  • WPForms Marketing provider integration
  • Per-form webhook configuration
  • Global default webhook option
  • Multiple connections per form
  • Metadata toggle
  • Activity logging
  • Auto-create sheets
  • Auto-add headers
  • Conditional logic support

🤝 Contributing

  1. Fork the repository
  2. Create feature branch
  3. Commit changes
  4. Push to branch
  5. Open Pull Request

📄 License

GPL v2 or later


🙏 Credits

  • Built for WPForms users
  • Uses Google Apps Script (free, unlimited)
  • No complex API authentication

🔗 Links


Seamless WPForms-to-Spreadsheet integration! 🚀