Would you like to send multiple files uploaded through WPForms to Google Drive with the Zapier addon? By default, the zap will only send through one file from the form. However, with a custom PHP snippet to your site, you can accept multiple files.
In this tutorial, we’ll set up a form that will accept multiple file uploads and, using Zapier, push them to Google Drive.
Creating Your Form
This tutorial is based on our guide on how to send WordPress uploads to Google Drive. Follow this guide to set up your form, your Zapier connection, and your zap.
Our form will have the Name, Email, File Upload, and Paragraph Text form fields.
Note: For details on how the Zapier integration works in WPForms, be sure to check our guide to using the Zapier addon.
Adding the Snippet to Send Multiple Files
We’ll need to add a small code snippet that will allow us to use this zap to send more than just one file to Google Drive.
If you need help in adding code snippets to your site, please see this tutorial.
This snippet will take every file name and place it on a new line, which in turn, will allow for multiple files. It will work for all forms on your site with the File Upload field. The code essentially compresses all the uploaded files into a zip folder.
Viewing the Files on Google Drive
What happens when the form is completed is that it will send the files to your connected Google Drive as a zip file.
To view these images, you’ll need to unzip them. For this, open the file that was just sent to your Google Drive. Then, from the dropdown menu at the top center of the screen, click Open With and choose Zip Extractor.
The zipped file will display with a list of the images or files attached to that zip. To proceed, select Extract and all the files will be extracted.
Now, you’ll see the parent directory with the attached images or files inside your Google Drive.
That’s it! You now know how to send multiple files to Google Drive using our Zapier addon.
Next, would you like to also change the timeout when using the Modern File Upload field? Check out our tutorial on how to change the timeout on the Modern File Upload.