Link to home
Start Free TrialLog in
Avatar of Elizabeth "Smalls" Eckels
Elizabeth "Smalls" EckelsFlag for United States of America

asked on

How can I automate the creation of a Google Doc based on form inputs?

My goal is to create a Google document that is automatically populated based on user selections from a <Google form, spreadsheet, any Google G Suite product>.

Here's the use case:
I have a Business Requirements Document template, but users don't need every single section each time they use the template. What I'd like to offer them is a form/method for them to check the items they need and have a document populated with those sections vs. opening a template and deleting the sections they don't need. I've attached an example of my Business Requirements Document, and would like to keep the template formats in tact, too.
TEMPLATE----Measurement-Plan.docx
Avatar of Martin Nguyen
Martin Nguyen
Flag of United States of America image

Hi Elizabeth,

I got a very rough working draft of what could be heading in the right direction here.

There's 0 formatting as you can see, but the document is set up where they can use the sheet called Checkboxes to mark off what sections they want and then it will populate a BRD for them in Final Sheet.

Something I wanted to check before continuing to play with formatting is: Will you want them to be able to edit this sheet directly? As it currently works it is pulling the section from the template but it is not editable. It would need to be copied and pasted into a new document to make changes. If you want them to edit the sheet directly I'll have to keep doing some research.

Anyways, let me know what you think and if this is in the spirit of what you are looking for.

PS. More experienced experts are welcome to join in with better solutions :)
Avatar of Elizabeth "Smalls" Eckels

ASKER

Good start, thank you! Yes I'd want them to be able to edit it. I'm wondering if we can use an Apps Script script to do it...but I also just found this which I'll need to look into a bit more: http://www.dannyblaker.com/fishinfordham/autofill-a-template-from-a-google-sheet-and-email-as-a-pdf-using-google-scripts

^^ Feel free to use that for inspiration if anyone else wants to take a stab at this. I'll be able to come back to it tomorrow evening and play with it more.
Hi Elizabeth, that's really neat! That script will let you easily fill in variable fields on a whole document, but it would still have every section of your Measurement Plan, even if it was optional and they were not going to fill it out. Its a good way to capture data and then generate a letter or informational document based on the data provided.

I had an idea while driving home yesterday about using different logic to copy sections of the MP to a new sheet so it can be filled out. I'll work on it later tonight and provide you an update. I'll also look more into some scripts that can help autopopulate fields instead of having to use formulae in cells.
That's what I ended up figuring out too, so glad we're on the same page there. And that sounds great, thanks so much for continuing to think on this! Yeah I think scripts might be more handy here vs. formulas but am thinking both could potentially work.
Hi Elizabeth,

I know its been a while but I wanted to let you know I have not forgotten about your question. I've been pretty swamped but I'm planning on taking a crack at it this weekend to see if I can create a solution with or without Google scripting.
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.