WPBeginner

Beginner's Guide for WordPress

  • Blog
    • Beginners Guide
    • News
    • Opinion
    • Showcase
    • Themes
    • Tutorials
    • WordPress Plugins
  • Start Here
    • How to Start a Blog
    • Create a Website
    • Start an Online Store
    • Best Website Builder
    • Email Marketing
    • WordPress Hosting
    • Business Name Ideas
  • Deals
    • Bluehost Coupon
    • SiteGround Coupon
    • WP Engine Coupon
    • HostGator Coupon
    • Domain.com Coupon
    • Constant Contact
    • View All Deals »
  • Glossary
  • Videos
  • Products
X
☰
Beginner's Guide for WordPress / Start your WordPress Blog in minutes
Choosing the Best
WordPress Hosting
How to Easily
Install WordPress
Recommended
WordPress Plugins
View all Guides

WPBeginner» Blog» Tutorials» How to Upload Files from a WordPress Form to Google Drive

How to Upload Files from a WordPress Form to Google Drive

Last updated on September 30th, 2020 by Editorial Staff
93 Shares
Share
Tweet
Share
Pin
Free WordPress Video Tutorials on YouTube by WPBeginner
How to Upload Files from a WordPress Form to Google Drive

Do you want to send files from a WordPress contact form to Google Drive?

Normally, your form plugins will upload any files directly to your WordPress site. However, you may want to automatically upload them to Google Drive as well for safekeeping and easier sharing.

In this article, we’ll show you how to easily upload files from a WordPress form to Google Drive.

Uploading files from a WordPress form to Google Drive

Why Upload Files From Your WordPress Form to Google Drive?

Normally, you can use your WordPress form builder plugin to add a file upload field and keep the uploaded files on your website.

But what if you wanted to share the uploaded files with someone who does not have access to the WordPress admin area?

This is where Google Drive comes in. Google Drive allows you to store files on the cloud and easily share them with anyone. It also allows you to easily access files from any device without logging into your WordPress site.

For instance, if you create a job application form and ask for resumes, then you can automatically upload those files directly to Google Drive and share it with others in your team.

Another scenario is when you run a contest where users upload photos or submit articles to participate.

Sending those submissions directly to Google Drive saves disk space on your website. At the same time, it keeps those files safe in a remote cloud location.

That being said, let’s take a look at how to easily send WordPress form uploads to Google Drive.

Creating and Preparing Your WordPress Form in WPForms

For this tutorial, we will be using WPForms. It’s the most popular contact form plugin for WordPress with over 3 million active installs. It comes with a simple drag and drop interface that lets you easily create any kind of form.

Then, we are going to use a tool called Zapier to connect WPForms with Google Drive.

Zapier acts as a bridge to send data between two different apps, without you needing to use any code. It seamlessly integrates with over 2000+ apps.

Note: You need the Pro version or higher to access the Zapier addon for WPForms.

Creating a File Upload Form in WPForms

First, you need to install and activate the WPForms plugin on your website. For more details, see our step by step guide on how to install a WordPress plugin.

Next, you need a form that your website visitors can use to send you files. If you don’t already have a form set up, check out our step by step guide on creating a file upload form in WordPress.

Important: This method will only work with a single file. It will not work with multiple files from one form submission.

Once you have set up your form, you need to add it to your website. To do this, simply edit the post or page where you want the form.

On the post edit screen, click on the + button to add a new block. After that, search for the WPForms block and add it to your content area.

Adding a WPForms block to a post or page

Then, publish your page or post to put your form live. Once you’ve done so, go ahead and create a test entry. This will be used to set up and test the connection between WPForms and Google Drive.

Here’s our test entry:

The completed upload form, including a photo (.jpg)

Preparing to Connect WPForms with Zapier

We are going to use Zapier as a bridge between WPForms and Google Drive. To do this, you need to install and activate the WPForms Zapier addon.

In your WordPress admin, go to the WPForms » Addons page and find the Zapier addon. Go ahead and click the ‘Install Addon’ link to install and activate it:

Installing the Zapier addon for WPForms

Next, you need to visit the WPForms » Settings » Integrations page. Simply click on the Zapier logo to get your Zapier API key. You will need this in order to connect Zapier with WPForms.

Getting the Zapier API key from WPForms

Copy the API key somewhere safe or keep this tab open. You will need the API key in a later step.

Creating a Zap to Send Files from Your Website Form to Google Drive

Once you have your form ready, go to the Zapier website. You need to create a free account or log in to your existing account.

In your Zapier dashboard, simply click the ‘Make a Zap’ button to get started. This will open the configuration wizard.

Note: Zapier uses the word ‘zap’ for a process with a trigger and an action. Our trigger will be a visitor filling in the form, and our action will be sending the file(s) attached to the form to Google Drive.

At the top of the screen, you need to choose a name for your zap. Once you’ve done that, it’s time to set up the trigger.

First, you need to select WPForms in the ‘Choose App & Event’ box. Just type ‘WPForms’ into the search bar to find it:

Choosing the WPForms app in Zapier

You will now be prompted to select a trigger event. This will default to ‘New Form Entry’ so all you need to do here is click the ‘Continue’ button.

Choosing a trigger event in Zapier

Now, Zapier will ask you to sign into WPForms. Go ahead and click the ‘Sign in to WPForms’ button.

Click the button to sign into WPForms

You should then see a popup window. Here, you need to enter the API key that you found earlier.

You also need to add your website’s URL (domain name).

Enter your API key from WPForms and the URL of your website

After you’ve entered those details, just click on the ‘Yes, Continue’ button to move on.

Next, Zapier will ask you to select your file upload form from a dropdown list. Go ahead and click on the name of your form:

Select your file upload form from the dropdown in Zapier

Once you’ve selected the correct form, you need to click the ‘Test trigger’ button to make sure that Zapier has connected to your form correctly.

Testing your trigger in Zapier

After clicking that button, you should see a message that Zapier has found a test entry. You will see the data on the screen:

Viewing the data for the test WPForms entry

Click the ‘Continue’ button to move on to the Action part of the Zap. Here, you need to choose your second app, Google Drive.

Choosing the Google Drive app as the action for the zap

Next, you will see the dropdown for choosing an action event. Here, you need to select the ‘Upload File’ option and then click to continue.

Choosing 'Upload File' as the action for the zap

Zapier will now prompt you to sign into your Google Drive account:

Signing into Google Drive when prompted by Zapier

Once you’ve done so, click the Continue button to move on:

Zapier and Google Drive are now connected

Now, it’s time to set up where you want the files to go in your Google Drive. Simply click on the Drive dropdown to select whether you want to use your personal drive or a shared drive.

Then, click on the Folder dropdown to select the folder you want to use.

Select the Google Drive you want to use plus the folder to put the uploaded files in

Next, you need to tell Zapier which file(s) to upload. Under the File dropdown, select the upload field on your form:

Choose the correct field (the file upload field) from your form based on the test data

After that, you can leave the other settings blank and click the continue button to move on.

Zapier will now prompt you to test your Zap by sending an upload file to Google Drive. Simply click the Test and Continue button to do so:

Sending the test file to Google Drive using Zapier

This will send Google Drive the files you uploaded in your test form entry. Go ahead and check your Google Drive folder for the files:

Viewing the uploaded file in Google Drive

Once you’re confident that your zap is working as intended, simply click the ‘Turn on Zap’ button to make it live:

Turn on your zap once you're ready

Now, all files sent through your file upload form will automatically be uploaded to your chosen Google Drive folder.

WPForms will always keep a backup of all files on your WordPress hosting account in case the Zapier API experiences any outages.

Please keep in mind that if you get a lot of form submissions with large files, then this will take up increased storage space in your Google Drive. In our business, we use G Suite Business plan to get Unlimited storage space.

We hope this article helped you learn how to upload files from a WordPress form to Google Drive. You might also like our article on how to use user generated content to grow your business, and our collection of the must have WordPress plugins for all sites.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

93 Shares
Share
Tweet
Share
Pin
Popular on WPBeginner Right Now!
  • How to Properly Move Your Blog from WordPress.com to WordPress.org

  • How to Start Your Own Podcast (Step by Step)

    How to Start Your Own Podcast (Step by Step)

  • Checklist

    Checklist: 15 Things You MUST DO Before Changing WordPress Themes

  • How to Fix the Error Establishing a Database Connection in WordPress

    How to Fix the Error Establishing a Database Connection in WordPress

About the Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi. Trusted by over 1.3 million readers worldwide.

The Ultimate WordPress Toolkit

2 Comments

Leave a Reply
  1. Lauren says:
    Jan 7, 2021 at 2:22 pm

    This is great, but why do the images turn into a txt.file when they get to my google drive!?

    Reply
    • WPBeginner Support says:
      Jan 8, 2021 at 9:43 am

      You would want to ensure you selected the image to be uploaded in Zapier for the most likely reason that a text file is being added.

      Reply

Leave a Reply Cancel reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

Over 1,320,000+ Readers

Get fresh content from WPBeginner

Featured WordPress Plugin
OptinMonster
OptinMonster
Convert website visitors into email subscribers. Learn More »
How to Start a Blog How to Start a Blog
I need help with ...
Starting a
Blog
WordPress
Performance
WordPress
Security
WordPress
SEO
WordPress
Errors
Building an
Online Store
Useful WordPress Guides
    • 7 Best WordPress Backup Plugins Compared (Pros and Cons)
    • How to Fix the Error Establishing a Database Connection in WordPress
    • Why You Need a CDN for your WordPress Blog? [Infographic]
    • 30 Legit Ways to Make Money Online Blogging with WordPress
    • Self Hosted WordPress.org vs. Free WordPress.com [Infograph]
    • Free Recording: WordPress Workshop for Beginners
    • 24 Must Have WordPress Plugins for Business Websites
    • How to Properly Move Your Blog from WordPress.com to WordPress.org
    • 5 Best Contact Form Plugins for WordPress Compared
    • Which is the Best WordPress Popup Plugin? (Comparison)
    • Best WooCommerce Hosting in 2020 (Comparison)
    • How to Fix the Internal Server Error in WordPress
    • How to Install WordPress - Complete WordPress Installation Tutorial
    • Why You Should Start Building an Email List Right Away
    • How to Properly Move WordPress to a New Domain Without Losing SEO
    • How to Choose the Best WordPress Hosting for Your Website
    • How to Choose the Best Blogging Platform (Comparison)
    • WordPress Tutorials - 200+ Step by Step WordPress Tutorials
    • 5 Best WordPress Ecommerce Plugins Compared
    • 5 Best WordPress Membership Plugins (Compared)
    • 7 Best Email Marketing Services for Small Business (2020)
    • How to Choose the Best Domain Registrar (Compared)
    • The Truth About Shared WordPress Web Hosting
    • When Do You Really Need Managed WordPress Hosting?
    • 5 Best Drag and Drop WordPress Page Builders Compared
    • How to Switch from Blogger to WordPress without Losing Google Rankings
    • How to Properly Switch From Wix to WordPress (Step by Step)
    • How to Properly Move from Weebly to WordPress (Step by Step)
    • Do You Really Need a VPS? Best WordPress VPS Hosting Compared
    • How to Properly Move from Squarespace to WordPress
    • How to Register a Domain Name (+ tip to get it for FREE)
    • HostGator Review - An Honest Look at Speed & Uptime (2020)
    • SiteGround Reviews from 4196 Users & Our Experts (2020)
    • Bluehost Review from Real Users + Performance Stats (2020)
    • How Much Does It Really Cost to Build a WordPress Website?
    • How to Create an Email Newsletter the RIGHT WAY (Step by Step)
    • Free Business Name Generator (A.I Powered)
    • How to Create a Free Business Email Address in 5 Minutes (Step by Step)
    • How to Install Google Analytics in WordPress for Beginners
    • How to Move WordPress to a New Host or Server With No Downtime
    • Why is WordPress Free? What are the Costs? What is the Catch?
    • How to Make a Website in 2020 – Step by Step Guide
Deals & Coupons (view all)
Media Temple
Media Temple Coupon
Get 20% OFF on all Media Temple hosting plans.
Connections Pro
Connections Pro Coupon
Get 15% OFF on Connections Pro WordPress directory plugin.
Featured In
About WPBeginner®

WPBeginner is a free WordPress resource site for Beginners. WPBeginner was founded in July 2009 by Syed Balkhi. The main goal of this site is to provide quality tips, tricks, hacks, and other WordPress resources that allows WordPress beginners to improve their site(s).
Join our team: We are Hiring!

Site Links
  • About Us
  • Contact Us
  • FTC Disclosure
  • Privacy Policy
  • Terms of Service
  • Free Blog Setup
  • Free Business Tools
Our Sites
  • OptinMonster
  • MonsterInsights
  • WPForms
  • SeedProd
  • Nameboy
  • RafflePress
  • Smash Balloon

Copyright © 2009 - 2021 WPBeginner LLC. All Rights Reserved. WPBeginner® is a registered trademark.

Managed by Awesome Motive | WordPress hosting by SiteGround | WordPress CDN by MaxCDN | WordPress Security by Sucuri.