How to Store Contact Form 7 Data to Google Sheets

Contact us page is necessary for every blog, websites, and services which allows visitors to contact you regarding any issue or information. When it comes to WordPress, there are dozens of Contact plugins available but only a few works as per the expectations. Contact Form 7 plugin is one of the most simple and smart WordPress plugins for contact us page.

The only negative part about the Contact Form 7 plugin is that it does not store the form data. You need to do other arrangements in order to store Contact Form 7 data.

In this post, I will be writing about storing the Contact Form 7 data in Google Sheet using another plugin called CF7 Google Sheets Connector. Let’s get started…

Installing “Contact Form 7”

Contact Form 7 - WordPress PluginFirst of all, you will need to install the contact plugin which is called Contact Form 7.

After installing the plugin you need to create one form as per your requirements by going to Contact Form 7 plugin you just installed and clicking on the Add New button as shown in the image below. After creating the form copy the shortcode and paste where you want to show this form on your website. You can either paste this shortcode to a text widget in the sidebar, a post/page or in any popup plugin.

Edit Contact Form - digiTechnolog - WordPress

Since you have created a contact form, now comes the second part of this tutorial; integrating the Contact Form 7 with Google Sheet.

Integrating Contact Form 7 with Google Sheet

To integrate you’ll need to install a plugin called CF7 Google Sheets Connector. Go to CF7 Google Sheets Connector settings and click on the Get Code which will take you to CF7 authorization with Google sheet page and ask you to login and authorize with your Google account where your form data will be saved.

Authorize CF7 with Google Sheet

After login with your Google ID, it will ask you for permission to view and manage your spreadsheets in Google Drives, allow by clicking the allow button.

Since you have logged in and authorized the CF7 Google Sheets Connector plugin to view and manage your spreadsheets, here comes the last and main step.

Setting Up CF7 and Google Sheet

  • Steps to do in the Google Spreadsheet

  1. Open https://docs.google.com/spreadsheets in your browser which will ask you to login with the Google account you just verified CF7 with, if not already logged in.
  2. Create a new sheet and name it anything you want.
  3. Rename the tab below on which you want to capture the data.
  4. In Google Sheets, provide the Columns name in Row 1. Name the first column as Date if you want to keep the record of date. For further columns, name it as the form tags from the Contact Form 7. (For eg. “your-name”, “your-email”, “your-subject”, “your-message”, etc).

CF7 to Google Sheet Integration

Steps to do in the WordPress Admin

  1. Go to Contact Form 7 dashboard click on the form you had created in the first step and go to the Google Sheets tab inside the dashboard.
  2. There should be two fields asking “Google Sheet Name” and “Google Sheet Tab Name”. Fill out both the details. In the field, Google Sheet Name, fill the name of the spreadsheet name you just created and in the Google Sheet Tab Name, write the name of the tab you just created in the Google Sheets.

You can understand better with the image below.

CF7 to Google Sheet Integration Tab Name

After this, you’re done.

You should be very careful while naming. This plugin may not save your data if names in the Google Sheets and CF7 (Contact Form 7) do not match with each other. Note that naming is NOT case sensitive.

 

You can now test the setup by filling and submitting the contact form you created. When you fill the form with required details, the data will immediately appear in the Google Sheet of your Google account.

Update: 11 April 2019

Does this CF7 to Google Sheets Setup Work with the Check-boxes and Radio Buttons?

And, the answer is YES. It works perfectly with the checkboxes and the radio buttons.

Let me break this step-by-step.

How to Create a Check-box in Contact Form 7?

You know the initial process of creating a new form already, so let me skip right to the checkbox part.

In order to insert check-box, click on the checkboxes option which will open a new popup where you will have to enter all the details including Name and the Options, as shown below.

Create a New Checkbox

Please note that the text you write in the Name field will be the column name in the Google Sheets.

Click on the Insert Tag and the checkbox will be inserted in the form.

How to Create a Radio Button in Contact Form 7?

Like the checkboxes, you will have to click on the radio buttons and it will open a popup where you will have to fill out the Name and the Options field as shown below.

Create a New Radio Button

And, the text you enter in the Name field will be the column name in the Google Sheets as I explained in the checkboxes option.

Click on the Insert Tag and the radio button will be inserted in your form.

Sending Checkbox and Radio Button Data to the Google Sheets

As I mentioned previously, the text you enter in the Name fields of the checkbox and radio button will have to be put as the column name in the Google Sheets.

Checkbox and Radio Buttons in the Contact Form 7 to Google Sheets Setup

Create new columns in your existing Google Sheets where the first row of the columns will be the Name field of the checkbox and radio button as shown in the above screenshot.

Here’s how it will look in the Google Sheets,

Checkbox and Radio Buttons in Google Sheets

And, as soon you complete the setup, all the Contact Form 7 data will start reflecting in the Google Sheets after someone fills in the form.

Update: 13 October 2019

Add Date and Time Automatically

Some people asked me in the comments, is this possible to add time and date to the Google Sheets entries automatically?

In other words, if someone fills up the form, along with the form details it should automatically add a time-date cell in that row so that you can know at what time the form was submitted.

And, there’s a very simple way to do that.

Just open up your Google Sheets where you’re collecting the data and add two columns with names “date” and “time” (without quotes). You can add these columns in the left side, right side, or anywhere in the same spreadsheet.

Take a look at the below screenshot for better understanding:

Automatically Add Time and Date to the CF7 Entries in Google Sheets

And, after adding these 2 columns, as soon as someone submits the form, all the form entries along with the submission date and time will be reflected in your Google Sheets immediately.

That’s it.

If you have any related query or doubt, feel free to let me know in the comments right now.

Also, share this trick with the people who you think might be interested in reading it.

Deepak

Founder, digiTechnolog | Blogger, Digital Marketer, and a WordPress Expert. Writes about Blogging, Productivity Tips, SEO & a few other Internet related Tips-tricks.

This Post Has 45 Comments

  1. Thanks for the clear description!
    Is it possible to save information from radio check or check boxes?
    Thanks

    1. Hi Marine,

      Yes, this technique does work with the Radio Buttons and Check Boxes.

  2. How does it work? I tried different ways and nothing goes in the sheet
    Thanks

    1. Hi Marine,

      I tried after reading your comment.

      It’s working fine.

      You will have to do the same way as you did for the name and email columns. While creating the Radio Buttons or Check Boxes, enter a name in the Name Field which you’ll have to put in a new column of the Google sheet.

      It should work that way.

      Let me know if that helps.

      Thanks.

  3. Hello Deepak,
    i tried several times, but nothing works, either for check boxes or radio buttons.
    Thanks

    1. Hi Marine,

      I have updated the post explaining everything on how to send Checkboxes and Radio Buttons data to the Google Sheets.

      Hope I addressed your issue.

      Thanks

  4. It works:)
    thanks

  5. It works, thank you.

  6. Redid everything and it works. Thanks

    1. Glad that you finally got it working.

  7. Is it possible to record information from several forms on one Google Sheet if you use a different tab for each form?

    1. Hi Amy!

      Yes, you can do so.

      Just create a new Tab in the same Google Spreadsheet and use that Tab name while setting up the new CF7 form as explained in the steps above.

      Let me know if that works.

      Thanks.

  8. Hi
    Is it possible to sending upload file to Google Drive?

    1. Hi Altan.

      No, currently, this is not supported by the CF7 to Google Sheets connector plugin.

      Thanks.

  9. I have had some issues. if you are using the mail divider – | – will it still work? Using a _raw_tag?

    Also, I am only getting the date to come through no other fields. I have copied the names of the columns exactly.

    1. Hi Taylor,

      Yes, it should work using that mail divider also. And, if it’s not working, try changing that.

      If you have copied all the column names correctly then there must be some problem with the CF7 to Sheets integration.

      Let me know if it works.

      Thanks.

  10. Thanks for your reply. The issue was that all fields need to be lowercase. Capital letters will force it not to work. I updated and it worked immediately.

    Thanks!

    1. Oh! Yes, fields are case sensitive.

      Glad that it worked, finally.

  11. I Deepak, looks great technique. I have a question, its possible to Save the DateTime record, and the post_url?

    Thanks for your support!

    1. Hi Gerry,

      Glad that you liked it.
      Yes, it is possible to save the Date-Time record – just add one column in the Google Sheets with the first row as “timestamp”.
      And, unfortunately, it’s not possible to store post_url data.

      Thanks.

      1. Hi Deepak,
        I’ve tried to add one column in the Google Sheets with the first row as “timestamp”, but it doesn’t work.

        1. Hi Umid,

          Yes, not sure why it doesn’t work sometimes. But, try using “date” and “time” instead of “timestamp”.

          Hope that helps.

          Thanks.

  12. Thanks for sharing your work. It’s there a way to just save the data into google sheets without sending any email?

    1. Glad you liked it.

      Do you mean to capture emails even if someone doesn’t submit the form?

      I don’t think that’s possible.

    2. In adittional settings

      skip_mail: on

  13. Let’s say you have multiple contact forms (say tens or hundreds), is there a way to distinguish one from another, for example showing from which url the contact form was on? Great post!

    1. Hi Mark,

      Yes, that can be done.

      Create a Spreadsheet and use different Tab names to store data from different contact forms. I mean: If the 1st contact form on your site is named CF1 then name the 1st Spreadsheet Tab as CF1 and if the 2nd contact form is CF2 then name your Tab CF2.

      Hope I’m making myself clear.

      If you don’t get then please let me know I’ll be updating this article addressing your concerns.

      Thanks.

  14. Hi Deepak,

    after installing the Google Sheets connector, CF7 doesn’t send any e-mails to our [email protected]… or customers. Any solutions?

    Thank you in advance

    1. Hi Allard,

      I’m using this CF7 Google Sheets Connector Plugin for a long time and there is no any problem so far.

      I think there must be some setup problem on this page, that’s why it’s not functioning correctly.

      Hope that answers your question.

      Thanks.

      1. Hi Deepak,

        Thank you for answering. I will investigate further. We had 300+ forms succesfully send to our [email protected]… over the last 24h and it stopped working after installing the above.

      2. Hi Deepak,

        found the problem. Our last campaign went a little too well and we have reached the limit of our servers with regard to spam and emails sent by our websites. So problem solved.

        Thank you again for responding.

        1. Hi Allard,

          Glad that it finally worked. ☺️

          Thanks.

  15. I don’t have the Google Sheets tab inside the dashboard . What is wrong and how can i solve it.

    1. Hi George,

      Once you install the CF7 Google Sheets Connector Plugin, you will find the required options inside the Contact Form 7 only.

      Click on the Contact Form 7 option from the left-side menu inside your WordPress dashboard & you should find the tab you’re looking for.

      Hope that helps.

      Thanks.

  16. Hi Deepak,

    Is it posible to automatically add the hour and minutes when the form is submitted?.

    I have looked all over the web, but it doesn´t seem to be clear.

    Best regards.

    Jose Galvis

    1. Hi José,

      Yes, this is possible.

      Just create 2 columns with names “date” & “time“.

      You can take a look at this screenshot to understand better.

      Also, I have updated the above article with this information.

      Hope that helps.

      Thanks.

  17. Hi Deepak,
    This works if the Google Sheet is in my own Drive. But it stopped working once move the Google Sheet to a company Shared Drive. Is there any way to fix this?

    1. Hi Shaun,

      Yes, it has to be in your Drive which you verified the CF7 Google Sheets Connector plugin from.

      Try connecting your company’s Google account with the plugin, and it should work.

      Hope that helps.

      Thanks.

  18. Hi, Is there a limit to how many form submissions can be accepted monthly?

    1. Hi Mason,

      No there isn’t any limit. An unlimited number of submissions can be accepted.

      Thanks.

  19. Hi Deepak,
    when i try other column on the sheet, with other data, the plugin not works. Why?

    1. Hi Esped,

      That has never happened to me, by the way.

      I think you must have committed some mistake in the setup. Do verify it again and it should work properly.

      And, if the problem is still there, please explain to me in detail.

      Thanks.

      1. Hi Deepak,
        i have the column A,B,C with the data imported with your plugin.
        Now if i try to add a column D, with my custom data, the plugin not works.
        Why?
        Try yourself.

Leave a Reply