Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 8 additions & 16 deletions forms-api/demos/AppsScriptFormsAPIWebApp/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
---
title: Google Forms API Apps Script Web app
description: Serves as an example of how to use the Google Forms API via REST calls from Apps Script.
labels: Apps Script, Google Forms API, Forms
material_icon: Feed
create_time: 2021-10-10
update_time: 2021-12-21
---

This solution demonstrates how to interact with the new Google Forms API directly from Apps Script using REST calls, and not
the native Apps Script Forms Service service.
## Google Forms API Apps Script Web app

This example app demonstrates how to interact with the new Google Forms API directly from Apps Script using REST calls, and not the native Apps Script Forms Service service.

## General Setup

Expand All @@ -22,15 +14,15 @@ See: https://developers.google.com/forms/api
Apps Script project customization

1. After creating a new blank Apps Script project, click Project Settings and:
* Check 'Show "appsscript.json" manifest file in editor'
* Enter the Project Number of the project that was allowlisted for the Forms API and click 'Change project'.
* Check 'Show "appsscript.json" manifest file in editor'
* Enter the Project Number of the project that was allowlisted for the Forms API and click 'Change project'.

1. Copy the contents of the Apps Script, HTML and JSON files into your Apps Script project.

1. Edit the FormsAPI.gs file and customize the constants.
* formId (Select one of your existing Forms id);
* topicName (Optional, if using Watches(pub/sub). Further project setup required)
Note: To setup pub/sub topics, see: https://cloud.google.com/pubsub/docs/building-pubsub-messaging-system
* formId (Select one of your existing Forms id);
* topicName (Optional, if using Watches(pub/sub). Further project setup required)
* Note: To setup pub/sub topics, see: https://cloud.google.com/pubsub/docs/building-pubsub-messaging-system

1. Deploy the project as a Web app, Authorize access and click on the deployment URL.