Google Sheets Integration for Caldera Forms

Description

This plugin provides integration between Caldera Forms and Google Sheets.
It adds new processor to Caldera Forms that enables sending of submitted forms to Google Sheets.

Important Note

Due to the changes in Google API policies, method for connecting plugin to Google Sheets was changed in version 1.7. From now on you have to use your own OAuth2 credentials, instead of shared ones as in the earler versions. If your plugin was connected to Google Sheets in earlier versions, it will continue working using shared credentials. However in order to guarantee seamless plugin operation in the future, it is recommended that you re-connect your plugin using the new method.

Connecting to Google Sheets

Generate OAuth2 credentials

  • Open the Google API Library
    • Connect to your Google account (enter credentials)
  • Click Select a project, then NEW PROJECT, enter a name for the project – e.g. “CalderaFormsGoogleSheets” – and click Create.
  • Make sure that created project is selected.
  • Search for “sheets” and click on Google Sheets API. Click ENABLE.
  • Open the Google API Console Credentials page
  • On the OAuth consent screen:
    • For Application Name enter “Google Sheets Integration for Caldera Forms”
    • For Scopes for Google APIs click Add Scope, select ../auth/spreadsheets scope and click ADD
    • For Authorised domains enter domain name of your site
    • Click Save
  • On the Credentials screen, select Create credentials, then OAuth client ID
    • For Application type select Other
    • For Name enter “Google Sheets Integration for Caldera Forms”
    • Click Create
  • On the page that appears, your OAuth2 “client ID” and “client secret” are displayed. Leave this page open, so that you can copy/paste values from it to the plugin configuration. Alternatively, copy the values to some clipboard.

Add credentials to the plugin

  • Open a new page and go to plugin Settings screen (or to Admin Panel > Caldera Forms > Google Sheets screen)
  • For Google OAuth2 Client ID paste “client ID” from Google OAuth2 Credentials page
  • For Google OAuth2 Secret paste “client secret” from Google OAuth2 Credentials page
  • Click Get Code button – you will be redirected to Google Sheets authorization page
    • Connect to your Google account (enter credentials)
  • You will see This app isn’t verified screen – this is OK, because you are authenticating your own site
    • Click Advanced and then click Go to Google Sheets Integration for Caldera Forms (unsafe)
  • In the Grant Google Sheets Integration for Caldera Forms permission screen click Allow
  • In the Confirm your choices screen click Allow
  • Copy generated “access code” to the clipboard
  • Paste “access code” into the Google Access Code in plugin Settings screen
  • Click Save

Using The Plugin

In Google Sheets

  • Create a new Sheet and name it
  • Rename the tab on which you want to capture the data

If you wish to record all of your Caldera Form fields, proceed to the next step and enable “Automatically generate header” option in processor settings.

If you wish to record only selected fields (or for some reason automatic header generation doesn’t work for you) manually enter column names in the first row as follows:

  • Enter “id” in the the first column name
  • Enter “date” in the the second column name
  • Enter slug names of your Caldera Form fields as the following column names

In Caldera Forms

  • Add Google Sheets processor to your form
  • Configure Google Sheets sheet and tab name
  • If you didn’t manually create spreadsheet header in the previous step, check “Automatically generate header” checkbox
  • Click ‘Save Form’ to save processor settings
  • Test your form submit and verify that the data shows up in your Google Sheet

Automatic Header Generation

When “automatic header generation” is enabled, the plugin verifies spreadsheet header on each new form submission and adds new fields to it if needed. Note that it never deletes fields from the header – as this would also delete some submission data – though you can do it manually. You may also manually reorder columns as you wish.

It should be noted that header verification takes some time and may slow down form submission for large forms. Therefore consider using it only for your “test submissions” – after initial form creation and/or modification – and turning it off afterwards.

Important Notes

  • Your slug names should be in english only (use only the following ASCII characters – [A-Za-z0-9])
  • Your slug names should be lowercase only (no capital letters)
  • If your slug names have underscores, replace them with dashes in Google Sheet column names (e.g. for ‘name_english’ slug use ‘name-english’ column name)

Acknowledgements

The plugin is heavily based on CF7 Google Sheets Connector

Screenshots

  • Connecting to Google Sheets account
  • Adding Google Sheets processor in Caldera Forms

Installation

  1. Upload ‘cf-google-sheets’ to the ‘/wp-content/plugins/’ directory
  2. Activate the plugin through the ‘Plugins’ screen in WordPress.

FAQ

Why isn’t the data send to spreadsheet? Caldera Forms Submit is just Spinning.

Sometimes it can take a while of spinning before it goes through. But if the entries never show up in your Sheet then one of these things might be the reason:

  1. Wrong access code (check debug log)
  2. Wrong Sheet name or tab name
  3. Wrong Column name mapping (column names are the Caldera Forms slugs; they cannot have underscore or any special characters)

Reviews

November 9, 2019
Exactly what I needed. Now my team can subscribe to updates on the Sheet instead of me having to produce a report every month. (And forgetting to produce said report.)
January 24, 2018
This plugin is awesome, very simple to setup an use. It do what is supposed to do without any hassle. It expands the functionality of Caldera Forms with a feature that is essential for my work, as I need to capture info using forms in my website and then process it with a team, something that is easier capturing the info in Google Sheets. It also allows me to skip using Google Forms, so I keep user on my site, no need to iframe the forms and I have a lot features that g forms lack thanks to Caldera Forms. Only thing is if you have more fields in a form than columns in your sheet, it will not be updated, so keep an eye on that (it was addressed in the forum, so I think will be solved in the next update). Thanks a lot Alex!!!!
April 26, 2017
Josh from Caldera Forms here. I'm super excited that you built this. Just tested it out and it works, and I think a lot of people are going to love this! Getting Caldera Forms data to Google Sheets, without having to do a CSV export and manual import is super useful. We will probably use this on our site soon. 5 Stars.
Read all 6 reviews

Contributors & Developers

“Google Sheets Integration for Caldera Forms” is open source software. The following people have contributed to this plugin.

Contributors

Changelog

1.8

  • Bug fixes

1.7

  • New plugin activation scheme using private OAuth2 credentials

1.6

  • Update tested WordPress version

1.5

  • Prevent fatal error when Caldera Forms is removed

1.4

  • Added support for automatic spreadsheet header generation

1.3

  • Added support for “id” column that records entry id

1.2

  • Refactor Google PHP API lib to prevent ‘clash’ with other plugins

1.1

  • Bug fixes

1.0

  • Initial version