Google Forms to PDF & Email while storing data in Google Sheets

Поделиться
HTML-код
  • Опубликовано: 22 июл 2024
  • Learn how to
    1.) take a Google Forms submission
    2.) store it in Google Sheets spreadsheet
    3.) convert the data submitted to a PDF using Google Doc template
    4.) store the PDF in Google Drive and add a link to the spreadsheet
    5.) email the PDF as attachment to the person that submitted the Google Form
    We'll be of course using App Script.
    #googleform #pdf #email

Комментарии • 569

  • @allisonharvill936
    @allisonharvill936 3 года назад +9

    I have no formal tech training but have been designated the tech person for a small non-profit and needed to do exactly what this tutorial does in a needed it done last week time frame. Thank you for making these videos. They are a lifesaver.

  • @roomforrentcuba
    @roomforrentcuba 3 года назад +27

    Dude, you have absolutely no idea about how much easier my life has become since I found you. Of course it takes a little bit of time and brains to understand what you are explaining and adapt it to my specific needs (I'm no programmer), however... the time that this automations are earning me is countless,. My life is much easier now thanks to you. Thank you my friend, please, keep up the good work, we need you, hahaha :)

  • @ridingwithcharley6821
    @ridingwithcharley6821 2 года назад +3

    With a little work, I was able to use this basic outline, modify it a little, and create an actual working invoice I can create from my phone that is ready to email without having to be near a printer and computer. I can now create an invoice immediately and email when I have finished the work order. Thanks for the video's... so much better than other YT channels.

  • @emingunduz4690
    @emingunduz4690 Год назад +1

    You make me feel like I'm the best coder 😄 It worked so much for my work. I create order form. No more losting papers. Thank you

  • @alekdaniels
    @alekdaniels Год назад

    The best part of this, aside from all these cool stuff, is how we were able to see the thought process of it all. Plus the troubleshooting bits really gave it an approachable feel. I feel confident I can do this.

  • @nikluz3807
    @nikluz3807 4 года назад +8

    I want to sincerely thank you for all of these tutorials. I got my degree last year and have been working with Google suite for several years now and just scored my first freelance programming job building an application in Google suite for a company

  • @davidclough6288
    @davidclough6288 3 года назад +2

    This was AMAZING! It's the first time I've ever had no errors in my code. Thanks so much. I also appreciate how you didn't edit out your troubleshooting. That helped!

    • @daleramirez7438
      @daleramirez7438 3 года назад

      Hi! Were you able to make it work? I tried and copied what he did in the video but I got notified with exception: invalid argument: attachments I don't how to troubleshoot it. I have no background in programming. Can you help me? 🙂

  • @vrm2009
    @vrm2009 Год назад

    Thanks a ton for making this very useful video. This covered a lot of use cases and opened a ton of possibilities for future projects!!
    Quick tip for anyone who is facing the issue where google doc is getting created with values from form but the PDF doesnt reflect it, you can just add this line below before creating the PDF ie, last line of the createPDF()

    openDoc.saveAndClose();
    const pdfFile = pdfFolder.createFile(blobPDF).setName("My PDF");

  • @cornevanzyl5880
    @cornevanzyl5880 3 года назад +1

    You have unlocked Pandora's box of creativity for me. Thank for teaching us🙏

  • @ciarajanay23
    @ciarajanay23 4 года назад +3

    This is exactly what I needed! I am so proud of myself. I was able to follow along and using the Google App Script Reference you showed I was able to have it send as my alias and add an additional email to send the file to myself too! I will be doing more of your tutorials to learn more. And I have little to none Java Script knowledge.

  • @RoiUltraviolet
    @RoiUltraviolet 2 года назад +1

    Excellent video, very good explanations with all the necessary details to understand simply and quickly. Congratulations and thank you for the remarkable quality of your knowledge sharing.

  • @juniorwalewangko
    @juniorwalewangko 4 года назад +2

    I've tried and this is awesome.
    For me this method has create a paperless system for my work.
    Awesome..!!!
    Definetely going to learn alot from this channel.
    Keep up the good work.👍🏻🙏🏻🙏🏻

  • @mohnasnassr9816
    @mohnasnassr9816 3 года назад +1

    Great teaching skills. Awesome tutorials!

  • @gabrielcambronero4338
    @gabrielcambronero4338 7 месяцев назад

    It took me hours to do it, but bro.. you are something else.. really!! Thank you so much, you can't imagine how this is going to change my life!

  • @bocobox
    @bocobox 4 года назад +2

    Addicted to your video. Just like daily routine. Thanks 😊

  • @rajeshparkar5683
    @rajeshparkar5683 3 года назад

    Thank you for step by step explanation

  • @victormenna
    @victormenna 3 года назад

    This tutorial is a new art form. Amazing

  • @luiscorado2868
    @luiscorado2868 4 года назад +4

    Excellent like always!!!

  • @anirudhvktakkar
    @anirudhvktakkar 2 года назад

    Fantastic! Thanks a lot for this!
    I already followed along with the create bulk PDF docs tutorial, and it worked like a charm! Then came here looking for triggers to make the script run automatically. This looks very very close to what I am looking for.
    However, I have one question.
    The Google Sheet from where I am pulling data into the Google Doc and converting to PDF is not connected to a Google Form. It is actually connected to Piotnet Forms on my WordPress website.
    Will this script run with a formSubmit trigger if it is not connected specifically to a Google Form? If not, can you please suggest a workaround if possible?

  • @valentinpereira810
    @valentinpereira810 3 года назад +1

    Thank you so much ! I have a question :
    When a form es edited and resubmitted. The namedvalues code only returns the modified values, there is a way to get all the values of the current row and execute the pdf creation? I Will be very grateful for your response !
    Thank you !

  • @therghammotlak2755
    @therghammotlak2755 3 года назад +1

    You are an amazing teacher

  • @TinaFasulo
    @TinaFasulo 3 года назад

    Thank you, this is great! I learnt lot of things watching your video!

  • @revolvency
    @revolvency 3 месяца назад

    this is actually life changing for cheap marketers like me, thanks for the tutorial, much appreciated!

  • @ekeretteekanem
    @ekeretteekanem 3 года назад

    huh.. super long and fun journey. Nicely delivered!

  • @ali5t4ir
    @ali5t4ir 3 года назад

    Thanks again - I was also wondering if send email trigger can be put in place when a cell is populated manually in google sheets - i.e. when you manually enter a test result in the cell it will trigger to populate the PDF & then it will send an email with attached PDF to the person in the row...much appreciated

  • @daleramirez7438
    @daleramirez7438 3 года назад

    Thank you for this video. I learned a lot! I'm just wondering how about the google form requires to submit an image and the image will be used in google docs. I'm currently working with an Application Form that needs photo. Thank you

  • @lasaventurasdevitoelgatoma3405
    @lasaventurasdevitoelgatoma3405 4 года назад +1

    ur channel it is going to be big in no time!! congratulations 4 the good work n sharing!!

  • @camposricardo86
    @camposricardo86 Год назад

    Thank you so much Chi! say I want to get an image uploaded in the form, should I use the mime type 'image'?

  • @namwan.c6947
    @namwan.c6947 11 месяцев назад +6

    Thank you very much for your tutorial. As of the present (2023), some methods in the code cannot be used, such as the "removeFile" function, which can be replaced by using the "setTrashed(true)" method.

  • @alfonsogarcia5768
    @alfonsogarcia5768 3 года назад

    Great tutorial! Very useful! What changes would you do at the script if instead of Google Docs, the template was Google Slides?

  • @NamNguyen-hn5os
    @NamNguyen-hn5os 3 года назад

    thank you so much for this Video. Please keep up the good work. Much love from Vietnam!!

  • @hanshima_
    @hanshima_ 4 года назад

    Thank you so much. Just an incredible tutorial.

  • @eugenepaulus9946
    @eugenepaulus9946 3 года назад +1

    Thank you for these videos. I appreciate you!

  • @tinman.12
    @tinman.12 4 года назад

    On Line 18 you have get file by ID. Is there any way that could be get active file instead? I have multiple documents that the user selects to use (which they select 1st) then fill in the form that i hope to get the ws to populate the pdf data

  • @ericagallego7825
    @ericagallego7825 6 месяцев назад

    you're real life saver. Please continue making videos about these.

  • @harry33316
    @harry33316 4 года назад +1

    It’s very impressive! Thank you!

  • @gravityelements14
    @gravityelements14 2 года назад +3

    TriggerEvent step seems to have changed since you made this video. Google sheet form submit event shows a caution message “make sure you use this form submit trigger with SpreadsheetTriggerBuilder”. I am unable to pass googlesheet info data - that comes from google form - to google doc variables using event trigger. Any advise?

  • @ubaidshakri7987
    @ubaidshakri7987 11 месяцев назад

    Great info..thank you

  • @kurtsanchez2810
    @kurtsanchez2810 Год назад

    Hi! What should I change in the code if I want to attach two pdfs. The first one being the customized one in the sheets and the other one is a uniform pdf for all?

  • @ashutoshsharmamagicfinmart4323
    @ashutoshsharmamagicfinmart4323 3 года назад

    This is very useful video for me, Now I have one requirement that on the basis of data entered by this form I am bringing some values in additional column form restored data but I am not able to pick values of those columns using info object.
    Can we do this?
    Eg. I have added a dropdown of Form submitter Jhon, Mike, Cali, getting there emails id from form, but while sending emails then I want to keep their superior into copy and that I am bringing using look-up function.
    But I am able to get only data submitted by the form.

  • @TheBricolore
    @TheBricolore 3 года назад +1

    that's awesome! well i do have a question , how do i replaceText in the createPDF method when i have added a column with lets say a SUM ? when the form is submitted , it inserts a row in the sheet , so i made another sheet2 with the main columns and some extras , how do I use these extra column content with the replaceText?

  • @bokkenknuser
    @bokkenknuser 4 года назад +1

    This is brilliant! Thank you!

  • @traingappscript3624
    @traingappscript3624 4 года назад +1

    Really great video here. Thanks !

  • @ciarajanay23
    @ciarajanay23 4 года назад

    I really appreciate your channel!

  • @bobykumar3960
    @bobykumar3960 3 года назад

    PRICELESS WORK ,,,,,FREE,,, THANKS A LOT

  • @yayodelflow
    @yayodelflow 3 года назад

    This is awesome, congrats... I have a question, do u have a tutorial to do the same, but instead a doc template using a sheet? nos using text, just the range of the sheet. Thank U!

  • @Chrezzzzz
    @Chrezzzzz 4 года назад

    Hello, i want to ask, how to add html body on the send email function, because i got result in email, by "object Object" in body email... Can you help ?

  • @MsBoolo
    @MsBoolo 9 месяцев назад

    Awesome tutorial ♥♥♥♥♥

  • @pedrotomasdominguezcardena9206
    @pedrotomasdominguezcardena9206 4 года назад

    Eres brillante!☆☆☆☆☆ El mejor canal de GAS☆☆☆☆☆

  • @danisentinella
    @danisentinella 3 года назад

    You are incredible! Thank you so much for helping me

  • @alyahyai
    @alyahyai 4 года назад

    I enjoyed this tutorial, thank you

  • @Mikarevival
    @Mikarevival 4 года назад +1

    Great Job!!!

  • @cheskavillanueva5772
    @cheskavillanueva5772 4 года назад +30

    Awesome! Plese don't get tired of doing more videos like this! Maybe you can share the script as well? Heh. :)

  • @musicacafeinafan1
    @musicacafeinafan1 3 года назад

    Great job ! Very clear . Thank you !

  • @edwardjohn7304
    @edwardjohn7304 2 года назад

    seems like the url link,pdf name for the response sheet as well as sending email is not working with Shared Drive. or did i missed out something? because once i move all the files into "MY Drive" it works flawlessly

  • @fabriciosouza408
    @fabriciosouza408 4 года назад +1

    Just awesome! That's was exactly what I needed. Thanks a lot buddy!

  • @alexandreviana4345
    @alexandreviana4345 3 года назад

    Hi there, how could I create a filter by a specific date on this code? I need it weekly

  • @user-qg7vp5hn4z
    @user-qg7vp5hn4z 2 года назад

    i have 2 questions, how can i insert the email subject from sheet. as well as, how to make sure it is send with plain text mode?
    thanks a lot

  • @jaesonboque3888
    @jaesonboque3888 3 года назад

    i would like to know to incorporate arrayformulas i made to the body.replaceText
    it only replaceText the data coming from the Forms Answer questions..
    the arrayformula i made is always left out please help me

  • @Isaiah-wr5mw
    @Isaiah-wr5mw 3 года назад

    Is there way to move the link from one tab to the other in the same spreadsheet using script 🤔? So i would not have to keep re-linking data

  • @elricho72
    @elricho72 2 года назад

    Great Video, thank's David

  • @georgemaidaniuc4997
    @georgemaidaniuc4997 2 года назад

    Hi eveyone, I'm George, and Im newbie in this field. I need some little help for my first script I'm trying to get working.
    The problem witch I got into is that once data is collected trough the google form, the spreadsheet is building up normaly,
    but for some fields I had to run an arrayformula in order to calculate some values for the entire column.
    Eveything works just fine, the spreadsheet looks good, but once function (onFormsubmit) is trigered, the pdf is not
    collectig data from the columns where array formula is running. So PDF is creating witch just the values witch are entered
    trough the form, but not witch the ones are calculated.
    Tks!!

  • @shaunprevatt1636
    @shaunprevatt1636 3 года назад

    Great video. Do you have a video on creating a pdf from the sheet you are working on and emailing that multiple people?

  • @xHao27
    @xHao27 3 года назад

    Thank you for your sharing. It is very helpful for set up the Google form to pdf. Is it possible to use a spreadsheet instead of a document as template? 🤔 Does this replace text functions still work on the spreadsheet?

  • @richardpowell4667
    @richardpowell4667 Год назад

    You are amazing! You know your stuff. I like how you basically say "I'm going to do this and let's see how we do that". I noticed your permissions was causing drama to send the email. Would it be that the user of the form would have those permissions come up on their end and have to give permission too? I imagine it should be. Cheers

  • @nataliariabina3227
    @nataliariabina3227 4 года назад +2

    Thank you , its wonderful !!! Question- when I make the same form "edit response " and submit , it will fill in PDF only edited fields, not edited- will insert as blank , how do I deal with that to make them to pick up old values and fill in new PDF ?

    • @valentinpereira810
      @valentinpereira810 3 года назад

      Hello, did you find a way to fix that ? I will be very grateful to you !

  • @adanrodriguezmedina9447
    @adanrodriguezmedina9447 4 года назад

    Help please, can you enter images that the respondent captures in pdf?

  • @AbrahamHernandez-nv9kv
    @AbrahamHernandez-nv9kv 4 года назад

    Hi,
    I just used this video, and I have created a proper notification system, add as many emails to notify (through google forms), and create the log with google sheets. Great stuff. Thank you, I just want to create a customized subject for my emails using the google docs {} in my template. Can that be done?

  • @longt3776
    @longt3776 Год назад

    can we as well have images upload from G form and then populate onto the PDF layout?

  • @huseyinataseven6032
    @huseyinataseven6032 10 месяцев назад

    A huuuuuuuuuuuge thumbs up!!! Thank you very much. You are a life saver.

  • @azeezek2991
    @azeezek2991 4 года назад

    Thanks for the Great tutorials,
    can you please tell me how can I automate download the pdf file created with form data...

  • @gamingfunforall
    @gamingfunforall 6 месяцев назад

    very useful, as i was searching this from since many time but it seems i wasn't having option other than an add-on, but you have done a grate job brother, thanks for this video !!

  • @oic-chiefadministrativeoff9617
    @oic-chiefadministrativeoff9617 3 года назад

    Very useful, nicely done. Can you make a video of sending confirmation on form submit with results preview?

  • @mohamedfazlan4074
    @mohamedfazlan4074 2 года назад +1

    Thanks A lot. i Had a Small Issue ... How to Print Multiple Pages in 1 Pdf file? ( Mean Daily Entry as one PDF File or one Company invoices as one Pdf file)

  • @InsideMyWall
    @InsideMyWall 3 года назад

    Can you show how can we create a interactive RFI form (used mainly for construction sites) from a google doc so that users can interact and export to pdfs

  • @DerioMehra-Dr
    @DerioMehra-Dr 3 года назад +1

    @Learn Google Spreadsheets I got error in line 2..... TypeError: cannot read property ‘namedValues’ of undefined ( line 2, file “code”)
    Need help

  • @PavanKumar-gg8jq
    @PavanKumar-gg8jq 2 года назад +1

    will it be possible to create pdfLink directly from google sheets without using trigger or after form submission function? Directly to generate pdflink in the google sheet and store the generated link in the pdfLink cell.

  • @anvitasingh2780
    @anvitasingh2780 3 года назад

    @learn google spreadsheets one of my input from google form is image. What changes i need to do to get that image in google doc

  • @TimBalzora
    @TimBalzora 2 года назад

    I did this without the email part and for some reason I can’t figure out after
    OpenDoc.saveAndClose();
    To convert to the new copy pdf
    My pdf conversion is still just a template as if the new info wasn’t populated in at all. When I check the doc in my drive after though, it is filled out properly. Any help?

  • @christourlightchurch8846
    @christourlightchurch8846 Год назад

    This is great. How can I include more than just the e.namedValues from the form? I have other headings with calculated data in the columns to include, but namedValues does not allow me to access them.

  • @franztellocastillo709
    @franztellocastillo709 2 года назад

    Awesome!! I have a Question, if I have a five Photos, How do I put those images in a pdf? (in order)

  • @terkinee6159
    @terkinee6159 3 года назад

    Can we just fill the response sheet and generate the pdf link in People tab.

  • @aldoalbar3516
    @aldoalbar3516 5 месяцев назад

    wow thaank you ... well ... the slowmo guys would be very useful here ...

  • @kawtharmarhoon2481
    @kawtharmarhoon2481 2 года назад

    I wanted the form to have uploading field of an image. How would I code this with specification to the size of the image. Is that possible ?

  • @ali5t4ir
    @ali5t4ir 3 года назад

    This was great thank you so much - it would be great if you can advise the code at the end of how we can password protect the PDF file so it can't be edited but you can print ONLY please

  • @alejandrojaviercuellarrodr9948
    @alejandrojaviercuellarrodr9948 4 года назад

    Excelent video as always! How about trying to switch between different document templates?

  • @wonjinpark7502
    @wonjinpark7502 4 года назад +1

    I really like this one!!!

  • @surajgawandi4874
    @surajgawandi4874 2 года назад

    What to do, If want to attach Temp file which is an DOC file as an second attachment?

  • @ali5t4ir
    @ali5t4ir 3 года назад

    @Learn Google Spreadsheets This was great thank you so much! - it would be great if you can advise the code at the end of how we can password protect the PDF file so it CAN'T be edited but you can ONLY print please

  • @jeffouta9499
    @jeffouta9499 4 года назад

    instead of email it , is there any way that i could automatically download the pdf ??

  • @sudamalaresorts7783
    @sudamalaresorts7783 2 года назад

    Thank you for the tutorial, but I'm little confused how to put image has we uploaded using google form and put to templae?

  • @ezzyhann
    @ezzyhann 3 года назад +1

    Excellent !

  • @otaviopinhotavares4225
    @otaviopinhotavares4225 4 года назад +1

    Amazing content! Can you please do a video with an uploading image? Exemple employers data and pic. I use gsuite files only work on my domain is that a problem to generate pdf with the pic?

  • @IanSpiridigliozzi
    @IanSpiridigliozzi Год назад

    Is there a script I can copy so I'm not reinventing this wheel? I'm new to this and didn't know where to look. Thanks!

  • @guitarman7575
    @guitarman7575 3 года назад +1

    Excellent

  • @darking006
    @darking006 3 года назад

    The remove(newTempFile) doesnt remove the copy folder but moves it.

  • @Ttnit2012
    @Ttnit2012 3 года назад +1

    Can this code modify for run without Form Submit - etc. run after click "RUN"

  • @mukhtarkhan4u
    @mukhtarkhan4u 3 года назад

    Thank You !!! this is really excellent, you explained it so well, could you help me to add the total value while sending the PDF responses as it's only the form info fields. (eg if the form has the MRP and quantity, can we send the total value in the PDF.

  • @Ma3rcellus
    @Ma3rcellus 2 года назад

    Muito bom vídeo!!!Aprendi muito com esse tutorial. Obrigado!!!!!

  • @AndeanFace
    @AndeanFace Год назад +1

    Hi @ExcelGoogleSheets, I hope that you are doing very well! I made the script as you presented it, and was working very well, but at the momment it seems to have two problems, and maybe you have some information about them. 1) It seems that the "Class File" from Apps Script, the method "removeFile" used at the end of the script "tempFolder.removeFile(newTempFile); " isn't anymore supported, it appears crossed over in .gs . Could you recomend other method to do the same part of the script? And my second question, I receive this message of error: "TypeError: Cannot read properties of undefined (reading 'namedValues')" on the constant declaration, line 3: "const info = e.namedValues;" in the function declaration. Do you have the seame error message? Many thanks for your help!