Skip to content

Latest commit

 

History

History
54 lines (32 loc) · 1.76 KB

README.md

File metadata and controls

54 lines (32 loc) · 1.76 KB

gform-to-github

Introduction

Script to create a file from Google form - Can be transform into a static CMS generator

Demo

Get started

Requirements

To create your how project need to have:

Step 1: create form

Create a Google Form and associated a Google Spreadsheet to it. You can for example duplicate this form : https://docs.google.com/forms/d/1cyaYx6pV0G5XhZqJ0Jhs3Oe0K-xqzBTQmQ4Eb4ZYB-k/edit?usp=sharing

Step 2: associate a Google Script to your form

Open the Google Spreadsheet and go on tools > Script Editor

Step 3: create the script

Copy-past the content of connect-gform-to-github.gs. You then need to adapt the following global variables:

  • YOUR_USERNAME
  • YOUR_REPO
  • GITHUB_KEY

You then need to adapt the function createJsonFileContent to match the value return by your Google form

Step 4: Associate script to a trigger

On the script app go Edit > Current project's triggers Add a trigger with following values:

  • Choose which function to run: onFormSubmit
  • Select event source: From Spreadsheet
  • Select event type: On Form submit

Step 5: Test that your data is recieved correctly

Debug

You can find the log execution of the function in: https://script.google.com/home/executions