Documentation

Setting Up Google Sheets Sync

Step-by-step tutorial on connecting WordPress forms directly to Google Sheets via secure Google Cloud Service Account API and visual column mapping.

OFFICIAL TUTORIAL

Connecting WordPress Forms to Google Sheets: Complete Setup Guide

Learn how to connect Diviniket WP Forms directly to your Google Sheets spreadsheet using native Google Cloud Service Account authentication. Eliminate recurring Zapier or Make subscriptions and achieve sub-second real-time lead sync.

Diviniket WP Forms Google Sheets Sync Interface

1. How Native Google Sheets Sync Works

Unlike outdated plugins that rely on fragile webhook scripts or third-party middleware that charge up to $299 per year, Diviniket WP Forms communicates directly with the official Google Sheets API via a secure Google Service Account. When a visitor submits your form, entry values stream directly into your spreadsheet columns within 1 to 2 seconds.

2. Step-by-Step Setup Walkthrough

Step 1: Configure Your Google Service Account

  1. Open the Google Cloud Console and create or select your project.
  2. In the APIs & Services library, search for and enable both the Google Sheets API and the Google Drive API.
  3. Navigate to IAM & Admin → Service Accounts and click Create Service Account. Name it wordpress-form-sync.
  4. In the created Service Account details, go to the Keys tab, click Add Key → Create new key, choose JSON format, and download the key file to your computer.
  5. Note the Service Account email address (e.g., wordpress-sync@your-project.iam.gserviceaccount.com).

Step 2: Add Service Account in Diviniket WP Forms Settings

  1. In your WordPress dashboard, navigate to Diviniket Forms → Settings.
  2. Click the Google Sheets tab.
  3. Paste the contents of your downloaded Service Account JSON key into the credentials field and click Save Settings.

Step 3: Prepare Your Target Google Sheet

  1. Open Google Sheets and create a new spreadsheet (or open an existing one).
  2. In Row 1, define your column headers (e.g., Timestamp, Full Name, Email Address, Phone Number, Message, Submission ID).
  3. Click the blue Share button in the top right corner.
  4. Paste your Service Account email address into the share box, set the role to Editor, uncheck "Notify people", and click Share.
  5. Copy the Spreadsheet ID from your browser address bar. The Spreadsheet ID is the long string of letters and numbers between /d/ and /edit in your URL:
    https://docs.google.com/spreadsheets/d/1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgVE2upms/edit

Step 4: Enable Sync & Column Mapping in Form Settings

  1. Go to Diviniket Forms → All Forms and edit your desired form.
  2. Scroll down below the form canvas to the Form Settings box and click the Google Sheets tab.
  3. Check the box labeled Enable Google Sheets sync.
  4. Set the Mode dropdown to Use existing sheet.
  5. Paste your Spreadsheet ID into the Spreadsheet ID input field.
  6. Confirm the Sheet Tab Name (defaults to Sheet1, or enter your custom tab title).
  7. Click Test Connection. The system will verify that your WordPress server can communicate with the Google Sheets API.
  8. Under Column Mapping, click Load Sheet Columns. The plugin will read your spreadsheet header row and provide dropdown selectors to map each sheet column to its corresponding form field.
  9. Click Save Form in the top right corner.

3. Verifying Your Live Data Pipeline

To verify the integration, visit the frontend page containing your form shortcode ([divismfo_form id="123"]), submit a test entry, and switch to your Google Sheet. You will see the new submission row appear instantly with formatted field values and precise timestamping.

4. Troubleshooting Common Google Sheets Issues

  • Error: "The caller does not have permission": Make sure you shared the Google Sheet with your Service Account client email as an Editor. View-only permission will fail.
  • Error: "Spreadsheet ID not found": Double-check the Spreadsheet ID string. Ensure no trailing spaces or URL segments were pasted.
  • Columns not loading: Ensure Row 1 of your spreadsheet contains text labels for each column and that your sheet is not completely empty.

Need More Help?

Explore our active community, YouTube video walkthroughs, or get in touch with our support team.