18 March, 2023

How to send Contact Form 7 data to Google Sheets

As you may know, when you install and configure the Contact Form 7 plugin you can set a recipient email, which receives every email users send through Contact Form 7. The problem is that some hosting services or VPS cannot send mail, so the site owner never receives the customer's request.

There are several ways to fix this in Contact Form 7. One is to send email through SMTP in WordPress, and Mona has a post on how to set up SMTP for WordPress. Besides SMTP, you can also send Contact Form 7 data to Google Sheets. If you would rather not use SMTP, Mona will show you how to set up CF7 to send submissions to Sheets.

How to send Contact Form 7 data to Google Sheets

Install the CF7 Google Sheets Connector plugin

To send data to Google Sheets, your site needs the Contact Form 7 Google Sheets Connector plugin.

Install Contact Form 7 Google Sheets Connector

Install Contact Form 7 Google Sheets Connector

Activate the plugin

Activate the Contact Form 7 Google Sheets Connector plugin

After installing the plugin, go to Contact > Google Sheets and get the code (choose Get Code) as shown:

Get code

Get code

After you choose Get Code, a new tab opens so you can sign in to your Google (Gmail) account and connect it to the Contact Form 7 Google Sheet plugin.

Once signed in, the plugin asks for permission to access and use the Google Drive data of the Gmail account. Choose Allow to continue.

Allow the plugin access

Allow the plugin to access Drive data

Next, Google gives you a code:

The code issued by Google

The code issued by Google

With the code from Google, go back to the WordPress admin, copy and paste it into the Google Access Code box, then choose Save to keep the settings.

Paste the Google code into the plugin

Copy and paste the Google code into the plugin

After saving, the setup is done and Google Sheets is connected to the CF7 Google Sheets Connector plugin.

Create a new spreadsheet (or use an existing one) in Google Sheets to store the data

To store what users submit through Contact Form 7, open Google Drive (make sure you use the same email you just connected to the Contact Form 7 Google Sheet Connector plugin) and create a spreadsheet.

Create a sheet

Create a sheet to store Contact Form 7 data

Two things to note: the spreadsheet name and the sheet (tab) name, which you will enter in the plugin

sheet name and spreadsheet name.

Note the sheet name and spreadsheet name.

In the sheet, enter the column headings as follows:

Enter the column headings

Enter the column headings matching the data fields

The matching data fields in Contact Form 7

The matching data fields in Contact Form 7

Note:

– Put these in the first row (row 1), so start with a completely empty spreadsheet.
– The content of the first column (A) MUST be Date.
– In the following columns, enter the names that match the fields in Contact Form 7.

Some default fields you can capture

date: the date the user submitted the form
time: the time the form was submitted
remote-ip: the sender's IP address
url: the link of the page containing the submitted form (the page on your site the user sent it from)

Other fields you can capture include:

Some other fields.

Some other fields.

Set up the form in Contact Form 7

Create a new contact form (or edit the default one) to place on your website for users to send requests to Google Sheets. Here Mona creates a brand-new form so it is easy to edit. The form contains:

Open the Google Sheets tab and enter the spreadsheet name and sheet name you just created:

Enter the Google Sheets details

Enter the Google Sheets details in the Contact Form plugin

Choose Save to keep the settings.

How to get the Sheet ID and Tab ID of the Google sheet.

Sheet ID

Sheet ID of the sheet.

Tab ID

Tab ID of the spreadsheet.

Wrapping up: connecting Contact Form 7 and Google Sheets

For the full process of creating the form and connecting it to a Google Sheet, Mona made a demo video so clients can set it up on their own websites:

Once finished, Contact Form 7 is connected to Google Sheets. Whenever a user submits information or a request, the data is filled in automatically in the Google Sheet you created.

The Contact Form 7 Google Sheets Connector plugin is completely free, and the steps to send data to Google Sheets are simple.

MONA has a podcast: listen instead of readingEpisodes on AI, automation & SEO for Vietnamese businesses
Nghe ngay
About the author

CEO & Founder · The MONA

Founder of The MONA, who built a services company of 200+ staff with 14,000+ projects delivered. Khánh Hùng shares how he thinks about building systems that run themselves, automating a business, and the real lessons from delivering projects at MONA.

Views 1,6K
Rate this article 4,7/5 · 12 ratings

Professional website
design services

Own a website with a beautiful, 100% exclusive design and a lifetime warranty, with the ability
to expand features flexibly as your business grows, starting today!

Contact Mona

    MONA có riêng một Người "Bạn Thân" cho bạn - Người Account sẽ đồng hành, hỗ trợ, hướng dẫn, đặt đồ ăn cho bạn mãi mãi, từ đây về sau!
    MONA will never sell your information or send you spam
    Đội MONA tư vấn hệ thống quản lý giáo dục trực tuyến
    Hỏi đáp giáo dục 4.0
    Tạo cuộc hẹn miễn phí với MONA để giải đáp và tư vấn mọi thắc mắc về giải pháp số hoá ngành giáo dục
    Thời lượng cuộc hẹn
    45 Phút
    Ngày và giờ
    Thứ 2, ngày 25 tháng 12, 2023
    [9:30 - 10:15]

      Chọn ngày và giờ
      Khung giờ
      Back
      Hãy cho MONA biết bạn là ai
      0:00