WordPress is the leading CMS solution that powers a large portion of the internet, Contact Form 7 is the leading way to build forms for your WordPress website., and Google Sheets is perfect place to store from submissions, no matter if it’s simple data like Mailing Lists or Beta Signups to more complex data like Order Forms or File Uploads. But sending data from Contact Form 7 to Google Sheets from a form can be difficult and risky, especially if you’re running WordPress.
Here’s three ways to quickly and securely connect Contact Form 7 to Google Sheets:
Method 1: Use an App Script with a Contact Form 7 plugin
Follow the guide published here: GitHub - levinunnink/html-form-to-google-sheet: How to submit HTML forms to Google Sheets. (Updated for 2021 Script Editor). You will need to be familiar with JS coding and deploying apps using Google App Scripts.
After following the guide at that link you’ll have web app URL to post your Contact Form data to. In WordPress, install one of the following CF7 plugins that will allow you to post to that URL:
- Contact form 7 TO API + Basic Auth – WordPress plugin | WordPress.org
- https://www.dharmishi.com/blog/post-contact-form-7-cf7-data-to-any-api-with-simple-api-integration (Plugin link: https://drive.google.com/file/d/1gIo4aEU4CrGTyBEuokVoAWZD9yTdU9WZ/view?usp=sharing)
- This method is secure. It doesn’t store any Google Access tokens in your Wordpress database. If your WordPress site is compromised, an attacker won’t have access to other data in your Google Drive.
- Requires advanced development skills. There’s a lot of custom coding that goes into this method. If you aren’t a programmer, you might struggle to get it to work.
- Time-consuming. This method has a number of steps to get it working. It might take too much time if you’re looking to get something up and running quickly.
Method 2: Use the CF7 to Google Sheets connecter plugin
This plugin is one of the more popular options to connect your forms to Google Sheets and we tried it out as part of this article.
Unlike the previous method, this plugin doesn’t require you to deploy a Google App Script to submit data to your Google Sheets. Instead it uses the Google API with Google Authentication to do the work. This is a big time-saver.
The interface unfortunately isn’t very user friendly and it does take some work to get your form connected to Google Sheets, even after the authentication flow is done. For example, you have to copy values from four different places in Google to make one connection. This seems like overkill.
We also didn’t like how the plugin put it’s upgrade notice on every single page in the WordPress dashboard.
But the biggest drawback of this or any plugin that connects to the Google API from your website is that, it’s highly insecure. WordPress websites often run on shared hosting and plugins also may be hacked. This means that if your WordPress site is compromised, the attacker can also access any data in your Google Drive. This risk is huge and should make someone think twice before running a plugin that stores Google credentials in a WordPress site.
- More user-friendly for non-developers. Even if you don’t know how to code, you should be able to use this method.
- Cumbersome user interface: We found this plugin to be still difficult to use, requiring a number of steps to get our forms connected to Google Sheets.
- Security risk. This method is risky because it stores Google credentials in the WordPress site, making the Google account vulnerable to attackers.
Method 3: Use the Sheet Monkey CF7 to Google Sheets plugin.
Sheet Monkey released a new plugin that allows you to connect your Contact Forms to Google Sheets and addresses the security and usability issues of other methods.
Sheet Monkey’s simple interface allows you to connect your forms to Google Sheets with a single URL endpoint, instead of requiring you to copy & paste multiple values out of Google. (It also uses the Google API so you don’t have to worry about deploying an App Script.)
Best of all, this method is the extremely secure. Because Sheet Monkey runs in a secure cloud, it means that your Google credentials aren’t stored in your WordPress site. Even if a hacker managed to compromise your site, they would have no ability to access anything in your Google Drive. The only thing stored in the WordPress site is Sheet Monkey’s Form Action URL which only allows writing to the linked sheet. Reading data from the sheet with the url is impossible.
This method does require that you register a Sheet Monkey account and link a sheet in the Sheet Monkey dashboard.
- Simple. This method is the simplest and most user-friendly of all of the methods we reviewed.
- Highly Secure. This method protects your data by keeping your Google credentials separate from your WordPress site while still allowing you to write to Google Sheets.
- Sheet Monkey forms are limited to 100 entries per month on the free plan. Unlimited pricing can be found here.
Download the plugin here: https://wordpress.org/plugins/cf7-to-google-sheets/
Now that you’ve seen the different options for submitting your WordPress Contact Form 7 to Google Sheets, why not pick one and get started?
If you have any questions, feel free to get in touch with us.