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

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
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 to access Drive data
Next, Google gives you a code:

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.

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 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

Note the sheet name and spreadsheet name.
In the sheet, enter the column headings as follows:

Enter the column headings matching the data fields

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.
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 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 of the sheet.

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.
Related articles
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!































Free AI courses
AI tools at work
VI
EN


