Title: Integration with Google Sheets for Contact Form 7
Author: Alex Agranov
Published: <strong>16 de gener de 2024</strong>
Last modified: 16 de gener de 2024

---

Cerca extensions

![](https://ps.w.org/cf7-google-sheets/assets/banner-772x250.png?rev=3022217)

Aquesta extensió **no s’ha provat en les darreres 3 versions majors del WordPress**.
Segurament no està mantinguda o suportada, i pot tenir problemes de compatibilitat
quan s’usa en versions recents del WordPress.

![](https://ps.w.org/cf7-google-sheets/assets/icon-128x128.png?rev=3022217)

# Integration with Google Sheets for Contact Form 7

 Per [Alex Agranov](https://profiles.wordpress.org/alexagr/)

[Baixa](https://downloads.wordpress.org/plugin/cf7-google-sheets.zip)

 * [Detalls](https://ca.wordpress.org/plugins/cf7-google-sheets/#description)
 * [Ressenyes](https://ca.wordpress.org/plugins/cf7-google-sheets/#reviews)
 *  [Instal·lació](https://ca.wordpress.org/plugins/cf7-google-sheets/#installation)
 * [Desenvolupament](https://ca.wordpress.org/plugins/cf7-google-sheets/#developers)

 [Suport](https://wordpress.org/support/plugin/cf7-google-sheets/)

## Descripció

This plugin provides integration between [Contact Form 7](https://wordpress.org/plugins/contact-form-7/)
and [Google Sheets](https://www.google.com/sheets/).
 It adds new processor to Contact
Form 7 that enables sending of submitted forms to Google Sheets.

#### Connecting the Plugin to Google Sheets

After installing the plugin you must go to it’s **Settings** screen and create application
credentials needed to establish connection with Google Sheets. All instructions 
are provided in the **Settings** screen.

After successfully creating application credentials and uploading them (i.e. completing
steps 1 and 2), you will see _Client ID_ and _Client Email_ that represent your 
instance of “Google Sheets for Contact Form 7” plugin. You will need to share your
sheets with _Client Email_ (as _Editor_ role) to grant “Google Sheets for Contact
Form 7” plugin permissions to edit them.

#### Using the Plugin

After successfully connecting the plugin to Google Sheets, do the following to configure
your Contact Form 7 to send data to Google Sheets on form submission.

_In Google Sheets_

 * Create a new Google Sheet
 * Switch to the tab where you want to capture the data
 * Determine _Sheet ID_ and _Tab ID_ from the sheet’s URL that looks as follows:
   https://docs.google.com/spreadsheets/d/_sheet-id_/edit#gid=_tab-id_
 * For example, for URL https://docs.google.com/spreadsheets/d/142XLjqRCpr7iWldfARhSS_GiFoy4l5RqZfSD6RHXM64/
   edit#gid=0 _Sheet ID_ is “142XLjqRCpr7iWldfARhSS_GiFoy4l5RqZfSD6RHXM64” and _Tab
   ID_ is “0”
 * Enter “datetime” in the the first column if you want to capture time and date
   of submission
 * There is no need to enter names for other columns – they will be automatically
   added upon form submission
 * Share the sheet with _Client Email_ that represents your instance of “Google 
   Sheets for Contact Form 7” plugin – as _Editor_ role

_In Contact Form 7_

 * Open your contact form
 * Switch to **Google Sheets** tab
 * Configure _Sheet ID_ and _Tab ID_ and click _Save_
 * Submit a test form and verify that the data shows up in your Google Sheet

#### Automatic Header Generation

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.

#### Capturing Submission Metadata

In addition to the _datetime_ and regular form fields, you may also capture Contact
Form 7 [special mail-tags](https://contactform7.com/special-mail-tags). In order
to do so, add _manually_ corresponding headers to your spreadsheet. Remove square
brackets and first underscore from the tag name, and replace remaining underscores
with dashes. For example, add _remote-ip_ header to capture _[\_remote\_ip]_ mail-
tag.

#### Integration with “Contact Form 7 Database Addon – CFDB7”

If you use [Contact Form 7 Database Addon – CFDB7](https://wordpress.org/plugins/contact-form-cfdb7/)
to save your submissions, you will also be able to resend already submitted forms
to Google Sheets. This may be useful if something went wrong during initial form
submission and/or someone deleted data in Google Sheets by mistake. In order to 
do so, in CFDB7 plugin, choose your form, open specific submission and click _Send
to Google Sheets_ button.

#### Acknowledgements

Initial version of this plugin was inspired by [CF7 Google Sheets Connector](https://wordpress.org/plugins/cf7-google-sheets-connector/)
plugin.

However it’s implementation is quite different:

 * it uses service principle for authentication with Google Sheets
 * it has completely different and much more reliable sheets update logic
 * it implements automatic header generation, to ensure that no submission data 
   is lost
 * it supports capturing submission meta-data
 * it provides integration with CFDB7 plugin for forms re-submission

## Captures

 * [[
 * Connecting plugin to Google Sheets
 * [[
 * Configuring Google Sheets processor in Contact Form 7
 * [[
 * Integration with “Contact Form 7 Database Addon – CFDB7” plugin

## Instal·lació

 1. Upload “cf7-google-sheets” to the “/wp-content/plugins/” directory
 2. Activate the plugin through the **Plugins** screen in WordPress

## PMF

### Why isn’t the data sent to spreadsheet? Contact Form 7 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 Google Sheet use the following checklist:

 * Check that plugin can access your sheet by entering it’s _Sheet ID_ in **Settings**
   screen and clicking _Test_
 * In Google Sheets processor configuration screen for your form:
    - Check that you entered correct _Sheet ID_ and _Tab ID_ (obtained from the 
      sheet’s URL – and NOT the Sheet/Tab Name)
 * Check _View Log_ in plugin **Settings** screen for detailed error trace

## Ressenyes

![](https://secure.gravatar.com/avatar/45c6516ea01fce9286d6eab690106be1dc4c93a7f9152e2af320b076d7a9189a?
s=60&d=retro&r=g)

### 󠀁[Finally working google sheets connector](https://wordpress.org/support/topic/finally-working-google-sheets-connector/)󠁿

 [s4d4m](https://profiles.wordpress.org/s4d4m/) 19 de juny de 2025

I had been long frustrated by the failure to log records with the CF7 Google Sheets
Connector – but with this plugin, it finally seems like everything is working. Thanks!

![](https://secure.gravatar.com/avatar/a33bdd39af675102e72d187e2e50d5fce6a19ef3c5bc3464b3f97fc67922550f?
s=60&d=retro&r=g)

### 󠀁[Very usefull plugin](https://wordpress.org/support/topic/very-usefull-plugin-170/)󠁿

 [pavulon5](https://profiles.wordpress.org/pavulon5/) 9 de gener de 2025

It’s not easy to config but work well! And you don’t have missing data. Great job!

![](https://secure.gravatar.com/avatar/e9a70ef9ef167b0ec459be47b990e7b7f4b2cebc80137bd737e0d342db606651?
s=60&d=retro&r=g)

### 󠀁[Doesn’t work](https://wordpress.org/support/topic/doesnt-work-3093/)󠁿

 [hellothereuk](https://profiles.wordpress.org/hellothereuk/) 13 de març de 2024
1 resposta

Following setup/auth instructions but they dont work. “Step 2: upload credentials.
json file” – nothing happens – the fields Client ID or Client email never populate
with anything after adding the .json file, so unable to continue.

 [ Llegiu totes les 2 ressenyes ](https://wordpress.org/support/plugin/cf7-google-sheets/reviews/)

## Col·laboradors i desenvolupadors

«Integration with Google Sheets for Contact Form 7» és programari de codi obert.
La següent gent ha col·laborat en aquesta extensió.

Col·laboradors

 *   [ Alex Agranov ](https://profiles.wordpress.org/alexagr/)

[Traduïu «Integration with Google Sheets for Contact Form 7» a la vostra llengua.](https://translate.wordpress.org/projects/wp-plugins/cf7-google-sheets)

### Interessats en el desenvolupament?

[Navegueu pel codi](https://plugins.trac.wordpress.org/browser/cf7-google-sheets/),
baixeu-vos el [repositori SVN](https://plugins.svn.wordpress.org/cf7-google-sheets/),
o subscriviu-vos al [registre de desenvolupament](https://plugins.trac.wordpress.org/log/cf7-google-sheets/)
per [fisl de subscripció RSS](https://plugins.trac.wordpress.org/log/cf7-google-sheets/?limit=100&mode=stop_on_copy&format=rss).

## Registre de canvis

#### 1.3

 * Refactor and clean-up the code for publishing to wordpress.org

#### 1.2

 * Refactor credentials upload for compliance with “Plugin Check”
    - After upgrade, please re-upload credentials.json in Settings screen

#### 1.1

 * Add integration with “Contact Form 7 Database Addon – CFDB7”
 * Fix uploaded file name

#### 1.0

 * Initial version

## Meta

 *  Versió **1.3**
 *  Darrera actualització **fa 2 anys**
 *  Instal·lacions actives **300+**
 *  Versió del WordPress ** 3.6 o posterior **
 *  Provada fins a **6.4.8**
 *  Idioma
 * [English (US)](https://wordpress.org/plugins/cf7-google-sheets/)
 * Etiquetes
 * [contact form 7](https://ca.wordpress.org/plugins/tags/contact-form-7/)[google](https://ca.wordpress.org/plugins/tags/google/)
   [Google Sheets](https://ca.wordpress.org/plugins/tags/google-sheets/)[sheets](https://ca.wordpress.org/plugins/tags/sheets/)
 *  [Vista avançada](https://ca.wordpress.org/plugins/cf7-google-sheets/advanced/)

## Valoracions

 3.7 sobre 5 estrelles.

 *  [  2 valoracions de 5 estrelles     ](https://wordpress.org/support/plugin/cf7-google-sheets/reviews/?filter=5)
 *  [  0 valoracions de 4 estrelles     ](https://wordpress.org/support/plugin/cf7-google-sheets/reviews/?filter=4)
 *  [  0 valoracions de 3 estrelles     ](https://wordpress.org/support/plugin/cf7-google-sheets/reviews/?filter=3)
 *  [  0 valoracions de 2 estrelles     ](https://wordpress.org/support/plugin/cf7-google-sheets/reviews/?filter=2)
 *  [  1 valoració de 1 estrelles     ](https://wordpress.org/support/plugin/cf7-google-sheets/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/cf7-google-sheets/reviews/#new-post)

[Visualitzeu totes les ressenyes](https://wordpress.org/support/plugin/cf7-google-sheets/reviews/)

## Col·laboradors

 *   [ Alex Agranov ](https://profiles.wordpress.org/alexagr/)

## Suport

Teniu quelcom a dir? Necessiteu ajuda?

 [Visualitza els fòrums de suport](https://wordpress.org/support/plugin/cf7-google-sheets/)

## Feu una donació

Voleu ajudar a què l’extensió millori?

 [ Feu una donació a aquesta extensió ](https://paypal.me/alexagr)