Download Log in

32. Google Sheets Integration

Developer Guide

Appends a row to a spreadsheet for every submission. Uses OAuth 2.0 via Forge API. PRO feature.

The Google Picker access-token endpoint is additionally bound to the connected WordPress site. The plugin sends site_url plus a Worker-signed site_token, and the Forge API only returns a short-lived Google access token if that token matches the same product, license, user, and normalized site key. If a site was activated by pasting a key manually and Google Picker returns a site-connection error, reconnect the plugin through Connect to Avakode once so the site token can be minted. Current builds force-refresh the site token before starting OAuth and the Worker repairs missing license_site:* KV bindings from current Freemius installs when the normalized site URL still belongs to the license.

Form Settings

json
{
  "settings": {
    "gsheets_enabled": true,
    "gsheets_spreadsheet_id": "1aBcDeFgHiJkLmNoPqRsTuVwXyZ",
    "gsheets_sheet_name": "Sheet1"
  }
}

Row Format

Column AColumn BColumn CColumn D
Submission IDTimestampField 1 ValueField 2 Value

Row Building

php
$values = [];
$values[] = (string) $submission_id;
$values[] = current_time( 'Y-m-d H:i:s' );
foreach ( $data as $field_id => $field ) {
    if ( strpos( $field_id, '_' ) === 0 ) continue;
    $values[] = FORMFORGE_Value_Formatter::text( $field['value'] ?? '' );
}

Forge AI Assistant Online

Hi! I'm the Form Forge AI assistant. Ask me anything about the plugin — setup, features, troubleshooting, or development.

Just now
Powered by Forge AI · Browse docs