DEV Community

Derrick Sherrill for WayScript

Posted on

2 2

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.

Sentry workshop image

Sick of your mobile apps crashing?

Let Simon Grimm show you how to fix them without the guesswork. Join the workshop and get to debugging.

Save your spot →

Top comments (0)

Image of AssemblyAI

Automatic Speech Recognition with AssemblyAI

Experience near-human accuracy, low-latency performance, and advanced Speech AI capabilities with AssemblyAI's Speech-to-Text API. Sign up today and get $50 in API credit. No credit card required.

Try the API

👋 Kindness is contagious

Immerse yourself in a wealth of knowledge with this piece, supported by the inclusive DEV Community—every developer, no matter where they are in their journey, is invited to contribute to our collective wisdom.

A simple “thank you” goes a long way—express your gratitude below in the comments!

Gathering insights enriches our journey on DEV and fortifies our community ties. Did you find this article valuable? Taking a moment to thank the author can have a significant impact.

Okay