DEV Community

HibikiDaBull
HibikiDaBull

Posted on

How to reflect values received from Google Forms into a Google Doc with GAS

I think there are people who often have to create documents in the same format as part of their regular work. It would be convenient if you could receive information from the requester via a form and reflect it in the document, such as inserting names, addresses, and start dates of employment into the same contract document, where the information changes depending on the party to the agreement, wouldn't it?

I have demonstrated a method for doing so in the repository below, along with GAS (Google Apps Script) code, a Google Form, and a Google Document. While the example is for an employment contract, I believe it can be applied to the automatic creation of various documents.

Github repo: https://github.com/HibikiDaBull/Hibiki_GAS-Hacks/blob/main/GAS%20Code_how%20to%20apply%20value%20from%20Google%20form%20to%20Google%20Doc

Google Document sample: https://docs.google.com/document/d/19TpSooLhsBHlCisv93mM_Tp6an4xisJToJ5hDUy61c0/edit

Google Form sample: https://docs.google.com/forms/d/1zO9vA_aTyRsmvcKaHmqcdfi3JyVcT4q_3l4HzO-8Xhg/edit

Top comments (0)