AppsScriptPulse

Create surveys, quizzes, and more using the Google Forms API, now generally available

Image credit: Google

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.

Google have provided an example of how the new Form API can be used in an Apps Script project with this Google Forms API Apps Script web app demo. Also as previously highlighted Christian Schalk is speaking at the Google Cloud Innovators Hive event March 29-30, 2022 and we are anticipating a session on the new Google Forms API.

Source: Create surveys, quizzes, and more using the Google Forms API, now generally available

Apps Script Basics – Using Form Responses – Learning Google Workspace & Apps Script

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:

  1. 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.
  2. Get students’ pieces of writing submitted via a Google Form and copy them to their individual sheets, ready to have feedback added.
  3. 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.

Source: Apps Script Basics – Using Form Responses – Learning Google Workspace & Apps Script

A Google Workspace Parents Evening Appointment System — by Baz Roberts

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.

Source: Parents Evening Appointment System [Alternative link: Parents Evening Appointment System (bazroberts.com)]

Using Google Forms API with Google Apps Script

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.

Source: Using Google Forms API with Google Apps Script

Google Forms API now available in open beta

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.

Source: Google Forms API now available in open beta

Pseudo OnEdit Trigger for Google Document using Google Apps Script

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.

Source: Pseudo OnEdit Trigger for Google Document using Google Apps Script

Adding Members to a mailing list using an API, Google Forms and Google Apps Script

Image credit: Baba Funke

I decided to explore something similar to a Webhook for Google Forms. In other words, something that triggers another action when a Google form is submitted. In this case, when a Google form is filled and submitted, the results should be sent to an API endpoint for adding members to a database. I found an answer in Google Apps Script, a coding language based on Javascript which allows for programmatically extending Google Apps like Google Forms, Sheets, Docs etc.

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.

Source: Adding Members to a mailing list using an API, Google Forms and Google Apps Script

Issues reporting with translation [using Google Apps Script and Google Forms/Sheets

In this post Baz Roberts highlights the benefits of Google Apps Script Language Service to translate Google Form responses into another language.

Source: Issues reporting with translation

Create a book tracker using Apps Script and the Google Books API in 10 minutes

I wanted a quick and easy way for my kids to track the books they read, as well as a way for my wife to catalog all the books in the house. I know there are other services out there like Goodreads that can store your book list…but I just wanted to house the data myself, and not have to create accounts for my young kids.

Nice little project that glues together Google Forms and Sheets and the Google Book API with a little but of Google Apps Script. Follow the link for more information and the source code.

Source: Create a book tracker using Apps Script and the Google Books API in 10 minutes

Announcing the Google Forms API

Google is proud to announce the Google Forms API! The Forms API is currently available in Restricted Beta, with Open Beta expected to follow in Q4. … The new Google Forms API provides programmatic access for managing forms and acting on responses, empowering developers to build powerful integrations on top of Forms.

The Forms API is currently in Restricted Beta. We encourage you to apply here to be an early adopter to get started with the API today! We’ll also send you important updates about Open Beta and improvements to the API. To keep up to date with all the APIs of your favorite Google Apps, please subscribe to the Google Workspace Developer Newsletter.

On Totally Unscripted we were delighted to have Christian Schalk (Developer Advocate, Google) and Hannah Pho (Software Engineer, Google) as well as early Forms API partners Charles Kemp (Strategic Alliances Manager, Zapier) and Charles Wiles (CEO, Zzish), talk about the new Forms API. A recording of the show is on YouTube and show notes will soon be added to the Totally Unscripted website.

Source: Announcing the Google Forms API