Auto Fill Google Doc Template from Google Sheets Data Using Google Apps Script

  Рет қаралды 243,198

Jeff Everhart

Jeff Everhart

Күн бұрын

In this short video, I show how to auto fill a Google Doc template from Google Sheet data using Google Apps Script. If you just want the code, or want to read along, check out the article on my site: jeffreyeverhar...

Пікірлер: 526
@brunolanca7401
@brunolanca7401 2 жыл бұрын
Thank you for the incredible tutorial. It was very easy to follow and helped someone like myself, who had never coded with Apps Scripts, to get a sense of how the language works and be able to personalize my script for my intended application. I've already build off of your script to automate the filling of multiple documents at the clinic I work at, which will dramatically decrease the burden on our doctors and nurses, and allow them overall more time to focus on patient care. Thank you for helping us make that difference!
@jeffeverhart
@jeffeverhart Ай бұрын
Thanks for watching!
@alfred7861
@alfred7861 2 жыл бұрын
This tutorial really helped my company save time and mistakes on filling out paperwork. The autofill feature we created with this, and his "Adding Custom Menus" video took some tinkering, but we got it to work, and everyone's delighted at this low cost, low maintenance solution. Thank you Jeff!
@jeffeverhart
@jeffeverhart 4 ай бұрын
Thanks for the kind words and thanks for watching!
@moving2fast2
@moving2fast2 Жыл бұрын
The UI in Google Sheets is slightly updated from when this was recorded, but even with my rudimentary coding knowledge I was able to modify this to work. THANK YOU, this is amazing.
@moving2fast2
@moving2fast2 Жыл бұрын
​ @Jeff Everhart out of curiosity, is there a way to use template literals to have the scrip generate a new folder, and store the document in that folder?
@moving2fast2
@moving2fast2 Жыл бұрын
Update: Yes, there is! I fed the script to ChatGPT and asked if it could modify to generate a new folder. I can share if anyone wants
@jeffeverhart
@jeffeverhart Жыл бұрын
Oh wow, that's pretty cool
@karinalsaravia-butler4227
@karinalsaravia-butler4227 6 ай бұрын
@@moving2fast2 Please do share!
@GreenMushroomForYou
@GreenMushroomForYou 3 жыл бұрын
This is just what I need! Hopefully I can execute this on my own template, I don’t really understand any programming language but I’ve surviving by copying codes out of tutorials and browsing the net. Thank you so much for sharing your knowledge!
@jeffeverhart
@jeffeverhart 3 жыл бұрын
Awesome! Thanks for watching
@csrl3lf
@csrl3lf 2 жыл бұрын
How come this guy only has 2.2k followers? Doing such a great job sharing this type of content so carefully so anybody just stepping in this would be able to understand? thank you So much man!! God bless you!
@EcoAku
@EcoAku Жыл бұрын
That is actually a very good tutorial! I first watched a crappy one called "Autofill Google Doc Template from Google Sheets | Google Apps Script" from the channel Outright System... The guy just stole your code, without even giving you credit, and pasted it without any explanation! Some people have no shame and are awful educators, really. But thank YOU for the great explanation and time you took to actually teach us!
@ConcernedUser-z6f
@ConcernedUser-z6f 2 ай бұрын
This was my first dive into Google Scripts or any code for the matter. And it was a successful one! This saved me a lot of hassle and put me on a way of Excel / Sheets skill development and put a lot of ideas into my mind about working with code. You are truly a special kind of person for doing this, at least in my life! Thank you very much.
@jeffeverhart
@jeffeverhart Ай бұрын
Thanks for watching!
@afernandezp1
@afernandezp1 3 жыл бұрын
Thank you so much for this tutorial! It is so much easier to understand and adapt to different situations when you take the time to explain what every line does instead of just importing a pile of code from some website.
@buttercool1240
@buttercool1240 10 ай бұрын
I just started a role at a new company and docs and sheets are a major part of the workflow. This gives me a great quick way to automate things without standing up a full Python or Node.js application to do it.
@jacqualinegrant2892
@jacqualinegrant2892 2 жыл бұрын
This script was FANTASTIC! I used it to create a hundred individual data forms from a Google Sheet with nearly 100 individual data points. Thank you!!
@johnpauljonesgrouptv
@johnpauljonesgrouptv 2 жыл бұрын
Thanks Jeff. This will come really handy for us. 1. Data collected through google form. 2. Data dumps into spreadsheet 3. Use this script to create a letter for sending out to clients
@bumpersmith
@bumpersmith 4 жыл бұрын
This is exactly what I was missing in my function..... grabbing the link to the created Doc and posting it back to the spreadsheet. Thanks again.
@jeffeverhart
@jeffeverhart 4 жыл бұрын
Awesome, glad part of that was helpful to you! Thanks for watching
@samsillman9391
@samsillman9391 2 жыл бұрын
Thank you for a great tutorial. This is going to save me and my husband so much time with filling out legal documents for our real estate business. I am a complete novice when it comes to coding, but this was very easy to follow and understand. The only thing I had a problem with was an error saying that the document was inaccessible. But, I realized that I had been using a .docx (Microsoft Word) document and that google docs didn’t recognize it within the code, even though it could open the file and edit it. Just thought I’d mention that in case anyone else had the same problem.
@羅雍勝
@羅雍勝 2 жыл бұрын
is it just me or the 'real estate business' part is tmi
@gradinitaamicusjunior
@gradinitaamicusjunior 2 жыл бұрын
Thank you for the hint about docx, we have tried days to solve this.
@kristenevans8474
@kristenevans8474 2 жыл бұрын
You just saved myself and a handful of my colleagues hours of work. THANK YOU for this tutorial!!!
@jeffeverhart
@jeffeverhart Жыл бұрын
Glad I could help!
@thirdinrev8006
@thirdinrev8006 Жыл бұрын
You are incredible. I was trying for so many days. I have no coding knowledge but just a determination to solve a problem we had. Thank you!!
@TheProfitableDad
@TheProfitableDad Жыл бұрын
Amazing video ! Allowed me to create 10 docs for a client that usually takes me 20 minutes each to create. Thanks so much Jeff 😍
@FrancesNicoleTirado
@FrancesNicoleTirado 6 ай бұрын
thank you! you really put in the effort to explain everything so that beginners like me can understand the reasoning behind each line and therefore customize the script later on.
@jeffeverhart
@jeffeverhart 4 ай бұрын
Thanks for the kind words
@hamtsammich
@hamtsammich 2 жыл бұрын
They've shuffled some of the buttons around, but this still works like a charm. Well done, and good show!
@hafthorkristjansson3886
@hafthorkristjansson3886 Ай бұрын
At this point, I'm honestly more used to your voice on 0.5x speed haha. Again, thanks so much for this tutorial, it has helped my business a lot to automate some of our systems. I'm officially crowning you as the dad of Google Sheets haha!
@andestransitllc8050
@andestransitllc8050 2 жыл бұрын
Thanks for this Jeff. I want the rows of the sheet to populate sections of a single document, not create multiple documents. Which line of code to I delete or modify so that the loop sends the data of each row to the single document?
@goon4204
@goon4204 2 жыл бұрын
Wanted to see if anyone could respond to this awesome question, don’t need to make so many documents.
@chickenoncsgo
@chickenoncsgo Жыл бұрын
instead of trying to do that i think it would be easier to just merge all the documents you create
@believeinheroes
@believeinheroes Жыл бұрын
Your tutorials are excellent, you do a great job of explaining as you go along. I originally used your prior video, "Auto Fill Google Doc from Google Form Using Google Apps Script," but found on occasion it would fail to generate the doc, without explanation (i.e. someone submits a form, it goes to the spreadsheet, but the doc just doesn't happen.) The method you demo here allowed me to set up a manual workaround for those occurrences.
@RandomFacts0.0
@RandomFacts0.0 Жыл бұрын
This video is the best! you explained it so well. I needed to add a few more pieces to my code. Having gone into this with no idea how to use AppScript did not matter! This video pointed out to me in the right way to ask my questions online and I was able to get everything to work! Thank you Jeff!
@jeffeverhart
@jeffeverhart Жыл бұрын
Awesome, that is great to hear. Cheers -Jeff
@rubynakka2926
@rubynakka2926 5 ай бұрын
Great video. I have a question though. Your Google app script primarily works for one column and multiple rows in google doc. Can you help us with Google app script where it generates multiple columns and rows table on Google doc using the data that is available on a single row of Google sheet?
@alissacorace90
@alissacorace90 2 жыл бұрын
This was so helpful!! Thank you - I created a merge doc weeks ago and went back to your website to find out about formatting (currency)... and found the answer in you FAQ! Massive help - thank you!
@DavidBozinov
@DavidBozinov 2 жыл бұрын
You, Are, The, Best! Couple adjustments and it works FLAWLESSLY for my use case!
@CarlCrespo
@CarlCrespo 2 жыл бұрын
Thank you SO MUCH!!! It's so hard to find good tutorials on Google App Script.
@allisonk1848
@allisonk1848 2 жыл бұрын
This was incredibly easy to follow! Thank you so much! I have several cells that have formulas that rely on other cells. If the target cells are blank, it returns a "" or blank. This script creates documents for all of these rows. Using your tutorial, I was able to add a line of script that if the first name was blank it moves on!
@deepali8939
@deepali8939 Жыл бұрын
Hello, Can you let me know if you've found a solution to your problem?
@allisonk1848
@allisonk1848 Жыл бұрын
I did!
@umbrellatec4646
@umbrellatec4646 Жыл бұрын
function criarpdf () { const ui = SpreadsheetApp.getUi(); const menu = ui.createMenu('Cria um PDF'); menu.addItem('Cria um PDF, e Envia para um E-mail', 'CriarEEnviarPDFPorEmail'); menu.addToUi(); } function CriarEEnviarPDFPorEmail () { const googleDocTemplate = DriveApp.getFileById('1Z1rHTPsl0N65oSx7ILrnzDvEhGCmnoMHInAGB0s6Ffk'); const destinationFolder = DriveApp.getFolderById('1GXbtYSVR5i4LYQWnezY84Hih4liWX4nO'); const sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('Data'); const rows = sheet.getDataRange().getValues(); rows.forEach(function(row, index){ if (index === 0) return; if (row[3] || row[4]) return; // verifica se já há um URL na coluna 4 ou 5 const copy = googleDocTemplate.makeCopy(`${row[1]}, ${row[0]} Employee Details`, destinationFolder); const doc = DocumentApp.openById(copy.getId()); const body = doc.getBody(); const friendlyDate = new Date(row[3]).toLocaleDateString(); // Faz as substituições usando o objeto keyIndexMap Object.keys(keyIndexMap).forEach(function(key) { body.replaceText(`{{${key}}}`, row[keyIndexMap[key]]); }); doc.saveAndClose(); const email = row[2]; const url = doc.getUrl(); sheet.getRange(index + 1, 4).setValue(url); var pdf = DriveApp.getFileById(doc.getId()).getAs(MimeType.PDF); GmailApp.sendEmail(email, "New Employee Details Document", "Please find attached your Employee Details Document", {attachments: [pdf]}); }); }
@andyspets
@andyspets 2 жыл бұрын
Excellent class, we added an extra menu item and function for that item on the menu. Thank you so much, it was such a pleasure to learning with you.
@russwarren2650
@russwarren2650 3 жыл бұрын
Thanks so, so much for this. I'm just dipping my toes into coding and wouldn't have been able to do this sort of thing without your helpful, clear instructions and provision of the template! I made some mistakes in my version of it, but because I was able to rewatch your tutorial, I learned not only what I did wrong, but how to identify where in the code the mistake was made.
@jeffeverhart
@jeffeverhart 3 жыл бұрын
Awesome, glad this was a helpful resource. Best of luck -JE
@pettykingdgreat
@pettykingdgreat 3 жыл бұрын
Thank you so much for taking the time with these tutorials. Very straight to the point and an easy steps. It's really helping me a lot with my business automations! THANK YOU!
@jeffeverhart
@jeffeverhart 3 жыл бұрын
Thanks for watching!!!
@paufernandez_films
@paufernandez_films 5 ай бұрын
Thank you so much for sharing this, and for the accurate explanation. It was super usefull to me 3 years after you originally posted it. Thanks! :)
@EsmeGibbs-f2l
@EsmeGibbs-f2l 11 ай бұрын
This is brilliant! Any chance you can add the script for when there is a choice of templates to pull on depending on a criteria specified in the form????
@katdancer8752
@katdancer8752 3 жыл бұрын
Thank you so much. Concise, clear and competent instructions! A great contrast to a lot of other help out here. It's helped me sort out a formatting issue for an online form. What I would really love is to email the resulting doc (form submission output file) as a PDF to myself/my colleague. I have not been able to resolve the variable for the output filename... thanks for any help you are able to give.
@jeffeverhart
@jeffeverhart 3 жыл бұрын
You can find an example of that here: jeffreyeverhart.com/2015/01/30/tech-tip-google-forms-confirmation-email-with-attachments/
@AH-zy2df
@AH-zy2df 2 жыл бұрын
Amazing tutorial! You made this so simple to follow and understand. This will save me an unbelievable amount of time creating ICAs. Thank you so much.
@carlapenders2395
@carlapenders2395 3 жыл бұрын
Best code I found to perform this function! Elegant, to the point and handles spreadsheets with hundreds of rows (the known google bug issue notwithstanding). Thank you so much :D
@jeffeverhart
@jeffeverhart 3 жыл бұрын
Thanks for the kind words and thanks for watching _ JE
@propulsetoi
@propulsetoi Ай бұрын
That's the best tutorial out there. Thank you so much for all the explications, you're a really good teacher. I wish I could give that video 100 likes!
@robshepart
@robshepart 2 жыл бұрын
This is AMAZING. not only do i understand the what, but I also understand the why. You are a great instructor.
@rebeccareighard4572
@rebeccareighard4572 3 жыл бұрын
Thank you so much for the video! I have never coded anything before, and I was able to follow your steps and create a huge time-saver for our school's secretary. I appreciated how you explained everything so clearly - it really helped me understand what I was doing and also helped me find mistakes when the errors popped up. :)
@jeffeverhart
@jeffeverhart 3 жыл бұрын
Thanks for the kind words! Glad it helped you out and got you started.
@Dundeeyouth
@Dundeeyouth Жыл бұрын
Hey Jeff, Thanks so much for this ! Out of interest how would i take a cell that has a URL in it and replace a tag in the doc with the image rather than the URL ?
@drdiehard4
@drdiehard4 10 ай бұрын
This absolutely awesome. Thanks for your great tutorial and this is what needed for me.
@jakekuykendall
@jakekuykendall 2 жыл бұрын
this is awesome and very easy to follow. what a gap in googles suite of products that you've solved without any external apps to add in. thanks again!!
@timstegink642
@timstegink642 2 жыл бұрын
Is there a way to write this code so that if you add more information to the sheet you can rerun it only for those that do not have a link for a google doc? Thank you!!!
@user-zz4jo1ui4c
@user-zz4jo1ui4c 3 жыл бұрын
You just saved a whole lot of time to lots of people including me, brilliant tutorial!
@KieranDoyle
@KieranDoyle 3 жыл бұрын
Jeff, thanks so much for the tutorial. Each step is explained extremely well. I just used it to automate creating invoices for my freelance work.
@jeffeverhart
@jeffeverhart 3 жыл бұрын
Great use of the script, best of luck - JE
@Elmirill
@Elmirill 3 жыл бұрын
Now when I run the script from the spreadsheet file, I get this exception: 'Exception: Document is missing (perhaps it was deleted, or you don't have read access?)' The script cannot get access to the copied document once it was created because of a lack of permissions. Any ideas on how to solve this? Thanks! UPD: If you'd like to have a spreadsheet as your destination document, use `SpreadsheetApp` instead of `DocumentApp` :)
@jeffeverhart
@jeffeverhart 3 жыл бұрын
Glad you were able to work through this, and thanks for posting the results for everyone else. Thanks for watching!
@camillyshrestha2306
@camillyshrestha2306 2 жыл бұрын
Thanks a lot myannn.... It works really great... Words cant describe how happy I am. You have made my work a lot easier... Thank you so much...
@daviddiasmagalhaes
@daviddiasmagalhaes 2 жыл бұрын
Hi Jeff, amazing video and great teaching skills. I was wondering if instead of creating google docs we are able to create PDFs named with a field and saved them to a google shared drive?
@elizabethmcmahon9794
@elizabethmcmahon9794 2 жыл бұрын
Thank you for this resource! This may be a silly question - This is my first attempt at exploring apps script or coding. Can I do this for just one row of data at a time? My spreadsheet is form responses and some of them require a template checklist of next steps for the team, but not all. It's constantly collecting responses. I do have a column that records whether or not a template needs to be generated.
@Redsonja77
@Redsonja77 8 ай бұрын
Thank you very much for your hard work, even when I don't know programming, I love this is easy to understand. I did it for some documents a friend needed and it worked!! We will just adjust some stuff, but the initial run was a total SUCCESS!! XD
@raamsrinivas7662
@raamsrinivas7662 2 жыл бұрын
Brother, i have no words to explain my joy. You just saved me a lot of time 😘😘😘 Wherever you are i wish you all the love and joy in your life 😭😭
@thecodfather7109
@thecodfather7109 3 жыл бұрын
You Legend, thank you dude!
@jeffeverhart
@jeffeverhart 2 жыл бұрын
You're welcome!
@marionharrison2792
@marionharrison2792 2 жыл бұрын
Great tutorial and really easy to follow. Helps solve a problem I've been having 🙂 Is there coding that could be used to also automatically share (view only) the resulting doc with someone in domain if their email address was also a field in the sheet?
@JoshBoyd-x9t
@JoshBoyd-x9t 15 күн бұрын
This worked great for me! Would it be possible to have the script constantly checking for the doc link and updating on it's own rather than having to click the custom UI button to generate?
@kristenwoodruff6593
@kristenwoodruff6593 7 күн бұрын
Thank you Jeff for the great tutorial. I had one question, is there a way to create an if statement to read a value in a row to see which google doc template the script should use? I started it with a function with if statements having it read the value in row[x] === "PARTICULAR LANGUAGE" then return the value for the googleDocTemplate = DriveApp.getFileById ('FILE ID'). Sorry if this is a bit confusing. I have multiple templates for different employee variables and want to write the code once versus have multiple codes for each template. I want the script to do the work.
@AdamCurtis-o2v
@AdamCurtis-o2v Жыл бұрын
You can't goto tools script editor anymore, but you can type script editor in help and when you search it shows apps script editor
@peterosullivan3108
@peterosullivan3108 2 жыл бұрын
Wonderful tutorial. Thank you. So helpful. Worked first time without an issue (miraculously!)
@MrJoaoluizcoelho
@MrJoaoluizcoelho 3 жыл бұрын
Absolutely fantastic video, thank you so much! I just have one question. I have hyperlinks in one column of my spreadsheet, how can I put those in the document? I tried doing it just like your tutorial, but it replaces only the text, not its formatting (i.e. hyperlinks). Is there a workaround?
@nathancousins8532
@nathancousins8532 Жыл бұрын
Thank you!! This is the first time i've ever done one of these! massive help so thank you
@CurtisBRODERICK-z6x
@CurtisBRODERICK-z6x Жыл бұрын
Well done man! Very nice cadence, explanations, even the error was helpful to see.
@ecl1889
@ecl1889 3 жыл бұрын
This is amazing!! Thank a million. just one question, how can i have the document URL to be a 'hyperlink' instead of the long url?
@flippedpbl
@flippedpbl 2 жыл бұрын
I keep getting the error: Exception: The parameters (String) don't match the method signature for DocumentApp.Body.replaceText. Any idea what may need to be fixed? I have everything plugged in as you do in the video.
@isaacmalave8600
@isaacmalave8600 Жыл бұрын
Jeff, this has helped me out with my business so much. thank you.
@jeffeverhart
@jeffeverhart Жыл бұрын
Awesome, thanks for watching
@carlpohl1429
@carlpohl1429 Жыл бұрын
Thank you for a great tutorial. I have little knowledge of coding and I was able to follow.
@jeffeverhart
@jeffeverhart Жыл бұрын
Glad it helped!
@adammPG
@adammPG Жыл бұрын
This is such a great tool! I have managed to get this working for a couple of uses however I was wondering a few things: 1. Is it possible to convert an email address that is within Google Workspace to their name? 2. Is it possible to save the document to PDF instead of a editable document?
@stonec8238
@stonec8238 7 ай бұрын
Thank you for the great tutorial. I was wondering if it is possible to have the filled Docs merge into a single Doc, rather a separate doc for each employee. Thanks
@fudlfadel
@fudlfadel 3 жыл бұрын
Hi Jeff, thanks for such wholesome content! Id just like to ask for my case, I have a table template in Google doc, and I want to insert a new row automatically once there are 2 products or more, how can I do it, please? Any help will be much appreciated, thanks in advance!
@andreafiliatrault5455
@andreafiliatrault5455 Жыл бұрын
I have an issue. rows.forEach --> when I try to execute it says Rows is not defined. The data is not being returned as an Array so I cannot use the .forEach. ? Make sense?
@andreafiliatrault5455
@andreafiliatrault5455 Жыл бұрын
Nevermind -- missed the line defining rows. Thank you so much!!
@JackieChanning-ue9jy
@JackieChanning-ue9jy 5 ай бұрын
Thank you; however, I can't seem to get the info to show up in my document. ALL of the fields {{DATA}} have not changed. I copied exactly what you have, but the documents are exactly as I created them (without the Google Sheet data).
@onlyyapple
@onlyyapple 3 жыл бұрын
Hey, thanks for the amazing Content! I got a question, i am trying to change the destination folder to 5 diffrent folders depending on the Text that is in cell 1 - so if cell 1 says "John" then i want the File to be created in the FOlder "Documents John" if the Cell says "Lisa" hen i want the File to be created in the Folder "Documents Lisa". i got 5 Names in Total - so 5 Folders in Total. I guess i need to do it with an "if" statement, but i dont get it to work..
@movewithcouragecoaching114
@movewithcouragecoaching114 3 ай бұрын
Walking through this very slowly thank you! How do you only get a range of the data, instead of the whole sheet?
@ConcernedUser-z6f
@ConcernedUser-z6f 2 ай бұрын
tried googling this for you and found a stackoverflow article, search this: differences-between-getrange-getdatarange-and-getactiverange here's part of the answer: " getRange() has multiple implementations. Sheet.getRange(row, column) Sheet.getRange(row, column, numRows) Sheet.getRange(row, column, numRows, numColumns) Sheet.getRange(a1notation) " So you'd have to play around with the getRange parameters in your code, to select a part of the range instead of it all.
@pepeshrinu
@pepeshrinu Жыл бұрын
Great video! simpel and to the point. One question, what if I have a chunk of text and tables in my template, and I want to make it appear or dissappear in the output doc based on a clickbox in the sheets docs. How would I do that? I have a template with descriptions for different services, but I need that segment of text/tables only if the service is procured. So I want to have a list of services in sheets, click on the ones the customer procures.
@sarahheidel977
@sarahheidel977 2 жыл бұрын
Thank you for this tutorial! It was very easy to follow and it did exactly what I wanted it to do.
@VintageCrossFit
@VintageCrossFit 3 жыл бұрын
Fantastic. This script helps me save hours creating score cards for our events!
@jeffeverhart
@jeffeverhart 3 жыл бұрын
Awesome! So glad I could help out, especially someone from the CF community. Best of luck with your events!
@jrarmartin
@jrarmartin 10 ай бұрын
Hi Jeff, I have run into an issue with the body.replaceText code. It works perfectly to a certain point and then stops for the middle of the document, then finishes correctly for the end of the document. I've double checked that I wrote it the same and I really have no background of writing code , this is my first attempt! Any tips?
@AlberichRheinmann
@AlberichRheinmann 8 ай бұрын
Hi Jeff, very well done ... and it helped me a lot. But i have another issue ... ( e.g. an Invoice with header informations and then a table with the invoice items ) In my template the items are in a table ... and this is where the problem starts. How can i fill in a loop item for item in the docs template ( items in a table ) ... All over the net i found no solution ... 😢
@marine4781
@marine4781 3 жыл бұрын
You explanations are super clear, thank you so much for this tutorial!
@jeffeverhart
@jeffeverhart 3 жыл бұрын
You're very welcome!
@giselegoldstein4712
@giselegoldstein4712 2 жыл бұрын
Hi Jeff, this is a fantastic tutorial. It worked flawlessly for me. Thank you. I do have an issue that is not covered. A few of my data area hyperlinks. Is there a why to copy the 'format' to docs, so that they appear as a link in the new document that is being generated? Sorry if it has already beeing asked, could not find it.
@thecjigroup5583
@thecjigroup5583 2 жыл бұрын
Hi Gisele! Facing the same situation here! Did you manage to find a solution? Thankssss!
@lindseydodds9750
@lindseydodds9750 2 жыл бұрын
Jeff, This tutorial video was great! I know nothing about coding, but I followed your video and it worked! I have one big question - in my sheet at the bottom of each column, I have a SUM function. This SUM function row will be moving further down the sheet as I add more content to the sheet. How can I prevent it from reading this row?? Thank you!
@adultsplaysports
@adultsplaysports Жыл бұрын
I am getting this when I try to run: Script function not found: createNewGoogleDocs. I've refreshed and tried to run again but still get this. No error popped up in the script when I ran it so got excited and now got this. Any ideas? Thank you SO much for this tutorial.
@thehomeworkdad
@thehomeworkdad 2 жыл бұрын
How would take this same concept and instead of creating new documents for each employee you were to instead create a single document with each page being a copy of the template with the data. Ultimately the same thing you did but with all the pages merged together into a single document?
@aleahmarieagocoy9864
@aleahmarieagocoy9864 2 жыл бұрын
wow thank you so much. no joke it is now so much easier and u explained it really good.
@TawnyaJulius
@TawnyaJulius 10 ай бұрын
Thank you for the tutorial, it defiantly one I have been able to follow. I keep getting and error on line 16 rows.forEach(function(row, index) and 19 const copy = googleDocTemplate.makeCopy(`${row[1]}, ${row[2]} Employee Details`, destinationFolder); That basically says the destination folder does not exist. it was working when we did the logger in the first sets. ... not sure how to resolve.
@mrupatel9765
@mrupatel9765 3 жыл бұрын
Amazing, thank you so much. Just wondering how I can get the script to read 'all sheets' and create pdf's instead of docs from the data?
@daljitsingh850
@daljitsingh850 3 жыл бұрын
sir did u find solution? if yes then please let me know
@CalisKurt
@CalisKurt 2 жыл бұрын
In my case only the name of each individual documents gets a different name, but the strings in the document with a {{}} don't change at all, where do I have to look
@luizguilhermediasdesouza3192
@luizguilhermediasdesouza3192 Жыл бұрын
That REALLY helped the school I work for. Thanks man.
@jeffeverhart
@jeffeverhart Жыл бұрын
Glad to hear it! Thanks for watching
@leahherder4182
@leahherder4182 3 жыл бұрын
This is a great video!! Would it be possible to auto fill multiple google presentations instead of google docs?
@jeffeverhart
@jeffeverhart 3 жыл бұрын
Yup, if you use the SlidesApp instead there is a similar method: developers.google.com/apps-script/reference/slides/presentation#replacealltextfindtext,-replacetext
@meowdy_meow
@meowdy_meow Жыл бұрын
Thank you so much!! Your code shaved an hour off my workload! Thank you! Thank you!
@jeffeverhart
@jeffeverhart Жыл бұрын
Awesome, glad the video helped
@shahi0078
@shahi0078 2 жыл бұрын
unbelievably well explained...to the point, no wafsofte wafsofte chat...you´re the dude ..thanks!
@Adandae
@Adandae 2 жыл бұрын
Hello! Thanks! Your video helped a lot. I have 1 question! Why decimal coma's becomes decimal dot's after running script? In my sheets i use decimal coma's.
@kimberlysalas9157
@kimberlysalas9157 3 жыл бұрын
Hi Jeff, Thanks for this video. Super helpful. I have a question. I would also like to pull data from a second sheet on the spreadsheet. I've been working on it over the weekend and still can't seem to figure it out. Would you be able to assist?
@caroleloufek6270
@caroleloufek6270 3 жыл бұрын
Thank you for your instructions. They are very well done. Do you have any options for how to output just the date from a cell in the month/day/year format?
@Techiteasy.france
@Techiteasy.france 3 жыл бұрын
Hi Jeff, First of all, Thank you very much for all of this. So it works well except for the name of the document. If I write "const copy = googleDocTemplate.makeCopy('${row[1]},${row[2]} Invitation Letter', destinationFolder);", documents created are called " {row[1]},{row[2]} Invitation Letter. Instead of the name of the invitee. Do you see any error in above syntax? Thanks
@jeffeverhart
@jeffeverhart 3 жыл бұрын
Based on what I can see and the behavior you describe, I would double check that there are backticks surrounding the string that gets passed into the makeCopy function, not single or double quotes
@lalalala-vm6lg
@lalalala-vm6lg 2 жыл бұрын
@@jeffeverhart thank you so much for this tutorial, the backtick worked
@SalomeDias-w7h
@SalomeDias-w7h 6 ай бұрын
My dates in the google doc are showing one day less than the actual date in the google sheet. Also is there a way to get the date format as MMM-dd-yyyy.Thank you for the tutorial it was really helpful. I am just stuck with the dates part of it. Please help. Thank you
@petervelto6728
@petervelto6728 Жыл бұрын
Thanks for the tutorial. It was very informative and easy to follow.... I copied all and followed each and every step as instructed in the video...yet... after executing AutoFillDoc in the Sheet the following pop up appears: "TypeError: Cannot read properties of null (reading 'getDataRange')" Any idea where the culprit is?
@mosesmawila-frozilla
@mosesmawila-frozilla Жыл бұрын
this changed my life! thanks for the great tutorial!
@jeffeverhart
@jeffeverhart Жыл бұрын
Glad it helped!
@richardthemagician8991
@richardthemagician8991 11 ай бұрын
I'm curious about is whether or not we actually need to use {to create a tag. Could I just use the first and last name? That might sound like a weird question but my goal is to update there document instead of replacing it. Did a lot of reasons why a person might want to do this. In my case I create Google. Invoices that I send out the clients who then have to share that same URL with 20 different people in order to get me paid. It has happened many times wherever create a new document after an update and I would get paid the wrong amount because the most current URL did not make it up the chain of command. From our contacts, here's what I have set up. When I book a client the data comes through form an invoice is created. Upon form submission their data along with the invoice is copied to a second sheet. My thinking is if I update the form response sheet, the data on the second spreadsheet should still match everything on the invoice. I want be able to set the data range on the second sheet as a variable for my tags. If I run my update invoice script, my hope is the script will see the data as the tags on the document we could get by the URL, and then replace those tags with what is currently on the booking for response sheet. To make this easier, we can do one row at a time. I don't need to Loop through the entire. I know I can type in a specific number and save that as a variable in the script, so it would only go through that one row. Is what I'm saying making any sense? Does this sound feasible?
@colindarling5689
@colindarling5689 5 ай бұрын
This was excellent. Would you happen to know what needs to change in your script if your template is another google sheet and not a google doc?
@jeffeverhart
@jeffeverhart 4 ай бұрын
It's a little bit more complicated, you'd need to use this class to do it: developers.google.com/apps-script/reference/spreadsheet/spreadsheet#createTextFinder(String)
@affiliateme7414
@affiliateme7414 2 жыл бұрын
why is it that not all forms have curly brackets (or anything) and do the same thing
@SueKing-v1y
@SueKing-v1y Жыл бұрын
Excellent tutorial for sheets to docs. Do you have a tutorial for sheets to slides? I thought I could replace the "docs" Apps with "slides" Apps but didn't work. This is the first time using Google Apps Script. thanks
@jasonlewis1455
@jasonlewis1455 3 жыл бұрын
Awesome video! So close to what I need! Two questions if you would be so kind... How can I auto populate the column without the auto fill button and how can I email the doc link automatically to the person it should go to?
Auto Fill Google Doc from Google Form Using Google Apps Script
15:00
Jeff Everhart
Рет қаралды 191 М.
PDFs from Spreadsheet Data and Google Docs Template - Google Sheets
32:38
Learn Google Sheets & Excel Spreadsheets
Рет қаралды 221 М.
Incredible: Teacher builds airplane to teach kids behavior! #shorts
00:32
Fabiosa Stories
Рет қаралды 7 МЛН
Every parent is like this ❤️💚💚💜💙
00:10
Like Asiya
Рет қаралды 6 МЛН
Electric Flying Bird with Hanging Wire Automatic for Ceiling Parrot
00:15
Autofill Google Doc template from Google Sheets, nocode with Make/Integromat.
14:24
Autofill Google Doc Template from Google Sheets | Google Apps Script
5:34
Google Sheets - Send Emails Using Apps Script JavaScript MailApp Tutorial - Part 12
36:10
Learn Google Sheets & Excel Spreadsheets
Рет қаралды 246 М.
How to Generate Automated Invoices for your Business? | Kewal Kishan
18:01
Kewal Kishan - Automate Business
Рет қаралды 62 М.
Automated Google Documents with Google Apps Script
16:42
Matt Brigidi
Рет қаралды 5 М.
Google Forms - Drop Down List from Spreadsheet Using Apps Script
34:39
Learn Google Sheets & Excel Spreadsheets
Рет қаралды 443 М.
Incredible: Teacher builds airplane to teach kids behavior! #shorts
00:32
Fabiosa Stories
Рет қаралды 7 МЛН