Google recently announced the general availability of the new Google Forms API. For developers familiar with Google Apps Script for some time it has been possible to create, access, and modify Google Forms through the Forms Service. In this post I will highlight why Google Apps Script developers might want to use the new Forms API and some resources I’ve found useful for working with the new API in Apps Script projects. As part of this I’d like to share my experience of using the Forms API within a Google Forms Add-on and some factors to consider if you are particularly interested in watching for Google Form edits.
The Google Forms REST API provides an alternative method for managing Google Forms and responses. For Apps Script developers it is likely you’ll want to stick with using the Forms Service, but the new API is useful to know about as it opens up some new ways for managing, editing and watching Google Forms.
For the first time, Google Forms has an API and we are going to show you how you can use it and what’s in it. The new Google Forms API joins the large family of APIs available to developers under the Google Workspace Platform. The Forms API provides programmatic access for managing forms, acting on responses, and empowering developers to build powerful integrations on top of Forms.
Some additional resources to support the general availability of the Google Forms API have been published. This post includes information on the key use cases which are supported by the API:
Automated form creation and editing: Enables automated form creation and editing. Enables rapid form generation from large volume question banks or other data backends.
Reaction to Form responses: The API also enables developers to build automations for acting on incoming responses. Examples include developing real-time dashboards or visualizations and triggering business workflows based on response data.
Given the existing widespread use of Google Forms in education it was nice for this to be acknowledged and also to see Automagical Forms getting mentioned.
The Google Forms API provides programmatic access for managing Google Forms and acting on responses— empowering developers to build powerful integrations on top of Forms.
Available to all Google Workspace customers, as well as legacy G Suite Basic and Business customers and users with personal Google Accounts
We’ve shared a couple of updates on the new Google Forms API previously here on Apps Script Pulse. The good news is the Forms API is now out of beta and available for testing and deployment. For Google Apps Script devs I’m sure you are thinking ‘but we can use the Forms Service?’ You can and likely in most instances to be the first port of call, but the new API brings some additional functionality not supported in Forms Service, in particular, a trigger when a Google Form is edited.
In this post, we’re going to look at how we can work with the responses a form user submits.
We’ll look at two main ways, 1) Getting the form responses from a Google Sheet, 2) Getting the form responses directly from a Google Form.
To show some practical uses of this, we’ll do the following:
Set up a simple problem-reporting log, which will email the relevant parties the problem in a classroom. We’ll do this via the Sheet and via the Form.
Get students’ pieces of writing submitted via a Google Form and copy them to their individual sheets, ready to have feedback added.
Set up a simple appointment system, which will update itself as people take the appointments, leaving only the available ones on the Form.
This post taken from Barrie Roberts’ latest book “Beginner’s Guide to Google Apps Script 2 – Forms“, available on Amazon here. The post covers some different ways that you can interact with Google Form responses and contains lots of useful code and tips that might be useful to other Google Apps Script developers.
This is the first of a three-part post, where we’re going to look at how you can create an appointment system using Google Forms and Sheets and with the use of Apps Script, how you it will update the available times on the forms and how it will send automate confirmation emails to those making the appointments. I’ve used this system for parents evening meetings, but it could be adapted for any area that need appointments.
This series of posts from Baz Roberts details an appointment booking system created in Google Sheets and Forms. There is a lot of details, tricks and tips across the post series so well worth spending the time to unpick what has been shared.
The Google Forms API is currently in Open Beta. For Google Apps Script users the new Forms API is worth keeping an eye on as it enables functionality not currently included in the native FormsApp service. In this post from Kanshi Tanaike an example is looked at where the Forms API is used to insert an image to a question. If you are interested in trying this example out remember that you currently need to apply for access at the Early Adopter Program page.
The Google Forms API is now rolling out as an Open Beta which means developers who are part of our Early Adopter Program can make their integrations available to the public. We’ll no longer require individual end-user accounts to be allowlisted. … Developers can apply to join our Early Adopter Program and begin developing using the Google Forms API by filling out this form.
In other Google Workspace news the new Google Forms API continues it’s journey to general availability with the announcement of the open beta. Just as the other Google Workspace REST APIs can be useful to Google Apps Script developers it’s useful to keep an eye on what is possible in the Forms API.
In the current stage, there is not OnEdit trigger for Google Document. But I sometimes have the case that I want to use OnEdit trigger. So, as the current workaround, I created this sample script. I think that this workaround can be also used for Google Slides, Google Form and also Google Spreadsheet. In the case of Spreadsheet, what the existing OnEdit trigger and the time-driven trigger cannot do can be achieved.
A nice explanation of how triggers can be used in Google Forms to push new data to other systems. The post is easy to read and includes lots of screenshots to help prevent you getting lost.
In this post, we’re going to look at a simple issues reporting system, where the teacher fills out a Google Form to report the issue. This is stored in a Google Sheet, and an email with the summary of the issue is either sent to the maintenance person or IT technician, depending on the type of issue.
This is based on a system I introduced at the academy where I work, which is in Spain but not all the teachers speak Spanish, so the form allows them to report the issue in English and then it’s translated into Spanish for the relevant person to resolve the issue.
In this post Baz Roberts highlights the benefits of Google Apps Script Language Service to translate Google Form responses into another language.