DEV Community

Derrick Sherrill for WayScript

Posted on

Use Google Sheets to Store your Custom Web Form Data with WayScript

Introduction

Any business owner that uses custom forms for orders and the like knows keeping track of them can be tedious work. However, with WayScript we can create a script that allows users to host these web forms and automatically compile the results to a Google Sheet, saving time in the process. Keep reading to follow the step-by-step process!

Building our Script

The first step in creating a hosted form is creating the URL that the form is hosted on. To do this using WayScript, simply add the Form Trigger module to the beginning of the script. On the left side of the screen is a toolbar; here a title can be given to a form, along with the inputs for the form (e.g. name, location, etc.). It’s important that the outputs match the headings on the Google Sheet for continuity purposes.

Next, a date and time heading is needed for the Google Sheet. This will be created through WayScript using the Date Time module. Once this module is added, select the appropriate time zone from the left toolbar. This generates a “datetime” variable that is used later.

tutorial step #1

This information is now passed on to a spreadsheet using the Google Sheets module.

After including the Google Sheets module, the next step is to add in the appropriate information in the toolbar. First, select “Write File” and below that choose the corresponding file. Add the variables that correspond to the headings for the sheet; this is where the “datetime” and form input variables created earlier are used.

tutorial step #1

Finally, activate the Form Trigger module. Now the URL contains the live form that can be filled out. Once this occurs, the information is passed onto the following steps in the script and then pasted to the Google Sheet.

tutorial step #1

Gone are the days of needing to manually update a spreadsheet with information each time a form is submitted. Using WayScript’s drag and drop script builder, users can now create an efficient program that does the work for them. To see the step-by-step process of creating this script, watch our YouTube video below!

Conclusion

Questions about this script or anything else? Join our discord. We're always around to help. If you want to work the full script template, just find it here.

Latest comments (0)