How to upload files from a WordPress Form to Google Drive
October 22. 2020
WordPress is an extremely powerful and handy tool when it comes to creating and maintaining your website. It’s quite intuitive and easy to use. Most importantly, it allows you to quickly and reliably convey your message to the users. However, it isn’t perfect, nor all-powerful. Same as any other app out there, it has its flaws. File management is one of the bigger ones. Fortunately, it’s nothing that a few extensions cannot remedy. Today, WP Full Care will help you figure out how to upload files from a WordPress Form to Google Drive.
Connecting WordPress to Google Drive carries many benefits
First, let’s see why would you want to upload files from your WordPress Form to Google Drive.
Saving server space
As you’re already aware, WordPress saves your files to the server. After a while, your server space might become severely limited. Especially if you’re receiving a lot of files. This can reduce its functionality and make your web page slow. And trust us, no one will wait for a full minute for your page to load. When this happens, you will be left with only two choices:
- Buy a bigger server package from your provider, and pay more per month or
- Delete files on a regular basis, to keep it from overfilling. And this is a tedious process. Not to mention that you’re always running the risk of “oops, I deleted the file that I need”.
WordPress will save a copy of the file on Google Drive. This means, even if you “oops” something, you will still have a backup. And the best thing of all – you will be able to access your files anytime, anywhere. Neat!
The only way to share files in WordPress is to give someone access to your admin account. Then they can freely browse, change, delete, and have tons of fun with your website. Jokes aside, sharing your admin privileges is never a good option. Fortunately, with Google Drive file sharing is all too easy, and risk-free.
Let’s get down to business
Now that we’ve reviewed some of the benefits, let’s see what are the prerequisites to make it all work.
- First, you will need some sort of contact form plugin for WordPress. We will use WPForms, as it is the most popular one. It is extremely easy to use and has a friendly user interface that will make forms creation swift and easy. You need a WPForms account to download this plugin.
- The second thing that you’ll need is an add-on called Zapier. It is a handy little tool that allows you to send data between apps. Do note, however, that you will need at least the Pro version to use it in conjunction with WPForms. Again, you will need to create an account and download the plugin.
- Finally, you will need a Google account, as it will allow you to access the free storage on Google Drive.
Now that we have the bases covered, we can continue to set up our forms.
Setting up WPForms plugin
The first thing we need to do is set up WPForms. The whole process is fairly easy and It will only take you a few minutes.
- Download and install WPForms.
- Go to your WordPress admin area > Plugins > Add New > Upload Plugin.
- Navigate to your download folder and select WPForms.
- Click Install
- After a few seconds, the Install button will turn to Activate. Click it, and your WPForms plugin will be ready to go.
Create a test form using WPForms
This is also pretty easy because of the friendly User Interface. You will only have to drag and drop a few boxes, and your test form will be done.
- On the Dashboard, click WPForms > Add new.
- Create a form by drag dropping the elements you need. The Pro version of the plugin comes with a pretty extensive template database. You can find the File Upload Template there and edit it if you don’t want to make your own.
Adding a form to the page
All right, we have the test form! Now we need to embed it on our page. At this point, it is a good idea to create a new page, that will serve as a test area.
- Create a new page
- Click on the (+) sign to add a new block
- Choose WPForms
- Scroll through the drop-down menu and select the form you created.
- Publish the page.
After this, your form is pretty much ready for use. However, we still need to bridge the gap between WP and GDrive so that we can upload files.
Zapier will enable us to upload files from a WordPress Form to Google Drive
Zapier is an extremely useful little addon. It enables different apps to communicate among themselves. And the best thing about it is that you don’t need any knowledge of coding to use it. Same as WPForms, it has intuitive UI, and using it will be a breeze. But first, we need to set it up:
- Go to WPForms > Addons.
- Find “Zapier Addon” (it is usually near the bottom of the page).
- Click Install Addon and Activate it after the installation is complete.
- Go to WPForms > Settings > Integrations.
- Click on the Zapier logo to get your API key.
- Copy the API key as you will need it in the next step.
Setting up Zapier
OK, we’re almost done! Only a few more steps and you will be able to upload files from a WordPress Form to Google Drive:
- Head to the Zapier website and log in.
- Click the “Make a Zap” button and type in the name of your Zap.
- In the “Choose App & Event” box, type in “WPForms” and select it.
- You will get a dialogue where you will have to choose the Trigger Event. Select “New Form Entry” and click “Continue“.
- Now you have to sign in to your WPForms account. Paste the API key you copied earlier into the corresponding box. Enter the URL of your website and proceed by clicking the “Yes, Continue” button.
- You will be taken to the Customize Form Entry dialog. Select your form from the drop-down menu and click “Test Trigger” to see if Zapier connected to your form correctly.
- After this, you should see the message stating that the new form was found.
Connecting Zapier and Google Drive
Zapier is now connected to the form on your website and it will activate (trigger) when there’s a new file upload. Now all that’s left is to make it copy the file to your Google Drive.
- Click “Continue” to proceed
- Choose “Google Drive” from the drop-down menu
- As the Action Event, select “Upload File“
- Sign in to your Google Drive and click “Continue“.
- Select the folder in which your files will be uploaded.
- Now you need to select which files will Zapier upload. In the “File” drop-down menu, find and select the upload field on your form and click “Continue“.
- At this point, everything is operational. The only thing left is to click the “Test & Continue” button and Zapier will send a test file to your Google Drive.
- Head to Google Drive and check the selected upload folder for the test file.
- Click the “Turn on Zap” button.
And that’s it! Now you can upload files from a WordPress Form to Google Drive with ease. The process might seem complicated, but once you get the gist of it, it will only take you a few minutes to set up a new form. And if you need additional help, don’t hesitate to contact us. WP Full Care is your source of information for all things WordPress.