How To Create a Google Doc When Google Form Submitted, Automatically

Learn how to automatically create a Google Doc when a Google Form is submitted, streamlining your data collection process with Apps Script.

right now I'm going to show you how to create a document or a Google Doc when a form is submitted. So let's get a form created, go up to create new form. We just want some names here. Let's grab somebody's name and ask him for a name. We're going to publish this. And let's enter a name, Andrew. Once this happens, we want to create a document, a Google Doc, internally that has that person's name. Here we have form responses one, and we have Andrew. So over here on the C column, the third column, we're going to enter a Google Doc, a Google document. Let's go do that. Extensions, Apps Script . We need two things here. The two things we need are we're going to create a function called create doc and we're going to create the trigger . So first let's write the function .

We'll need to know what row we're on. Row equals E dot range dot get row. Something cool about this particular function that I'm doing here is this E event. I'm just using E as a shorthand for event here so I don't have to type in five characters every time. This will gather information when we create the trigger right at this moment, it doesn't have any information. So if I try to run it in here, it doesn't work. But when I create the trigger to run it, it'll have some information about the event, like what row we're on. We'll have information like what sheet we're on. This is important if you have multiple forms . We want to create the doc, so we'll create a doc. document app dot create. And now we need to get the name, variable name of responder Create New Worksheet When Google Form Submitted How to Send Google Forms Entries Automatically with Apps Script How to Create a Google Form Automatically Create Google Form Automatically

equals E dot named values . And we'll use name. That's this name here. Name. Get the name. So we'll change the document name to. Name of the responder here, we can actually put in text here, something like new document if we want, but I want to try name of responder and we're going to get the URL and in the sheet that we have the responses, we're going to get the range of row column three C, we're going to set value to doc. Whatever this document URL is. Let's save this. Let's go ahead and create the trigger . Now over on the left side, click triggers. On the bottom right, once this loads, add trigger .

Choose which function . If you have multiple functions , they'll be here in a list. Create doc. Select event type on form submit and save. You will have to authorize this once you save it. Click allow. Let's go try to fill in this again, click submit over on our, on our form responses. We now have a Google doc and it is named Andrew. Let's go record another response for Bart. Click submit, go back to our responses. We'll see here, Bart shows up. And then our. New document is created. This is a blank document is brand new untitled document. Actually, it's titled Bart. However we want to name it. You might want to add some text there. If you want to do that, just go back here. Instead of name of responder, we're going to do name of responder plus new document. Create New Worksheet When Google Form Submitted How to Send Google Forms Entries Automatically with Apps Script How to Create a Google Form Automatically 2 Forms 1 Sheet

Click save command S or this safe project here. Let's submit another one for Carl. And let's go see what Carl's document says. And it's called Carl New Document. Hope you enjoyed that. Hope you enjoyed that quick video on how to create a document when form submitted automatically. This should save you a lot of time and a lot of headaches. Enjoy. Automated Project Management in Google Sheets Add Formula When Form Submitted