Automate PDF creation Using Google Apps Script - Aryan Irani

แชร์
ฝัง
  • เผยแพร่เมื่อ 19 เม.ย. 2021
  • In this video I am going to show you how to create PDF's from a Google Sheet using Google Apps Script.
    We are going to use the following fictitious example:
    (1) Student Details and marks are stored in a Google Sheet
    (2) Teacher intends to create custom mark sheets.
    (3) Doing it manually will be an hectic task
    Read the Full blog : form-publisher.com/blog/creat...
    In this video we will be tackling this issue using some Google Apps Script.
    Click this: tinyurl.com/2fccwvxh
    Want to work with the Sheet : docs.google.com/spreadsheets/...
    Follow me on :
    Twitter : / aryanirani123​​
    LinkedIn : / aryan-ira...​
    Edited by Samarth Borade:
    Twitter : / boradesamarth
    LinkedIn : / samarth-borade-8296561b1
    Want to Learn Google Classroom, check out these videos.
    • Google Classroom Train...
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 73

  • @m.caeben2578
    @m.caeben2578 2 ปีที่แล้ว +1

    This is great work. Keep it up, Aryan Irani.

  • @kammaheli
    @kammaheli 3 ปีที่แล้ว +1

    nice tutorial. thanks

  • @mohamedazzouz6086
    @mohamedazzouz6086 2 ปีที่แล้ว

    Hello Aryan thank you for this tutorial. I really managed for the first time to create pdf files from google sheet and send them by email. So to plot the url on sheet.
    But I have a problem when I created a column using the (ARRAYFORMULA) function, the url is created in duplicate.
    I'm really sorry my English is bad I hope you understood me. plus i'm new to programming. Thank you

  • @googleguruji2553
    @googleguruji2553 2 ปีที่แล้ว

    Your are amazing...

  • @user-zs6ln7ix3c
    @user-zs6ln7ix3c ปีที่แล้ว

    Hello Aryan, can You also print the pdf automatically after it has been created ? Thank You for advice.

  • @matheusasilva1170
    @matheusasilva1170 ปีที่แล้ว +1

    Very good video helped a lot.
    I would like to save an image as well, I saw that google drawings allows saving, publishing and getting an html code that can be used in HTML projects. Could you help me create a script that also saves images?
    Thanks

  • @rfvilela
    @rfvilela ปีที่แล้ว

    Hi ty for the shared knowledge. Is there any way to turn that header PDF image into a variable? Image x for input x at a certain sheet column, Image y for impute y at the same column... I would appreciate any repply! ty!

  • @pbretmay
    @pbretmay 10 หลายเดือนก่อน

    is it possible to have the data in the rows output as a just separate page within only 1 PDF file instead of every student having their own PDF? I'm trying to use this tutorial to generate car tags from data in a google sheet and would like them to be put into one file instead of individual files to make them easier to print.

  • @Tutorials-by-MuhammadUsman
    @Tutorials-by-MuhammadUsman ปีที่แล้ว

    And one thing more, How to generate data from script on same page like MCQs or question paper in ordered list

  • @tomcat2512
    @tomcat2512 2 ปีที่แล้ว +1

    Perfect! This is what I need but I'm wondering what if the template is in Google Sheet format, not Google Docs? I have some variables that need dynamic formula calculations Google Sheets addresses computations. Do you have a sample video or script for that?

  • @fatikchandradas9059
    @fatikchandradas9059 ปีที่แล้ว

    Thanks a lot for making so many nice helpful videos. How to add image link to document as image in google sheet data. Please help. Thank you.

  • @careerslife5723
    @careerslife5723 ปีที่แล้ว

    Thanks for sharing this wonderful.
    I just face this error.
    var temp_file = doc_File.makeCopy(Temp_Folder);

  • @indianplayer763
    @indianplayer763 2 ปีที่แล้ว

    Very informative thank you !

  • @syusyu5229
    @syusyu5229 ปีที่แล้ว

    Hi! Just what I was looking for.. But, is there a way I can create bulk PDF from spreadsheet? My report template is in sheet (I use drop-down list to select students name).
    Is there a way for me to bulk print all reports as PDF?
    Really hope you can help me

  • @bhawnadewangan9148
    @bhawnadewangan9148 2 ปีที่แล้ว

    this is word template to pdf bt i have to do excel template to pdf plz help me. means i have to bring qr code in each pdf

  • @zohairdilawar116
    @zohairdilawar116 3 ปีที่แล้ว +2

    Dear Aryan , Thank you for the Nice Video, I have a Question , How do i Generate a PDF everytime Data is received by in Google sheet via WEBAPP
    or when Data is Corrected in Google Sheet

    • @AryanIrani123
      @AryanIrani123  3 ปีที่แล้ว

      Firstly, glad the video helped. Secondly you can use triggers to run your Google Apps Script Code.
      Check out this blog that I have written : medium.com/swlh/create-pdf-using-googleapps-script-6d974f3f06c4 . Hope this helps.

    • @zohairdilawar116
      @zohairdilawar116 3 ปีที่แล้ว

      @@AryanIrani123 Dear Aryan , If i send the Data to Googlesheet using google form all works fine, My issue is when the same data is submitted through WEBAPP , then the pdf is not getting created , can you help

  • @takticaproyectos1818
    @takticaproyectos1818 2 ปีที่แล้ว

    Hi Aryan, thank so much for yours videos, I have a questions, what will be a solution when I want to put a image into the PDF?

    • @rfvilela
      @rfvilela ปีที่แล้ว

      Have you found any solution?

  • @koungsareth8623
    @koungsareth8623 3 ปีที่แล้ว

    Thanks, please do more appscript toturial.

  • @ashwathkotyan6390
    @ashwathkotyan6390 2 ปีที่แล้ว

    Bro how to marksheet prepare with google form scrips

  • @koen_hd
    @koen_hd ปีที่แล้ว

    Hi Aryan, this was very helpful, thank you! A couple of things I noticed as I watched your video and copied your script for my own project:
    - removeFile function doesn't work anymore (the temp-files will just end up in the root of your google drive). You can use File.setTrashed(true) instead.
    - The line with var body = temp_Doc_File.getBody() doesn't seem to be doing anything. I removed it from my script without consequences.
    - Almost at the end of the video, a typo (MimeTpe.PDF) was corrected (to MimeType.PDF) off-camera. If you follow along the video and type everything over this could be easy to miss.

    • @Tutorials-by-MuhammadUsman
      @Tutorials-by-MuhammadUsman ปีที่แล้ว

      Can you please help me out in in creating copy of the file, var temp_file = doc_File.makeCopy(Temp_Folder);
      It generates error for me the way it explained in the video

    • @koen_hd
      @koen_hd ปีที่แล้ว

      @@Tutorials-by-MuhammadUsman I'll try to help you if I can contact you by email. Could you customize your TH-cam channel so it shows your email address in your contact info?

  • @Tutorials-by-MuhammadUsman
    @Tutorials-by-MuhammadUsman ปีที่แล้ว

    Hi, thanks for a such a wonderful tutorial, but I face a problem in creating copy of the file exactly in the same way as you did, var temp_file = doc_File.makeCopy(Temp_Folder);
    It generates error and didn't execute it.
    Please do help me, if there is some change in command or little modification required.

    • @careerslife5723
      @careerslife5723 ปีที่แล้ว

      I also face this error and how to resolve it.
      var temp_file = doc_File.makeCopy(Temp_Folder);

  • @govtmiddleschoolbodla2535
    @govtmiddleschoolbodla2535 ปีที่แล้ว

    how can we add photos of students in marksheet in this method.? please reply.

  • @SanjayKumar-be5cc
    @SanjayKumar-be5cc 2 ปีที่แล้ว

    Hi Thanks for such amazing video. i have one query. While sending the mail through your script, In the mail there is line breaks randomly. Plz suggest

  • @armypublicschooldefensecom8413
    @armypublicschooldefensecom8413 3 ปีที่แล้ว +1

    I want to add some pictures that are stored in drive. In the generated pdf files pictures are not showing instead drive url is displaying. Please guide how to display the pictures.

    • @AryanIrani123
      @AryanIrani123  3 ปีที่แล้ว +2

      You can directly copy/paste the images in the Google Doc Template.

  • @RajaGiri_tvpm
    @RajaGiri_tvpm 2 ปีที่แล้ว

    Thank you, can we make all data in one phone address book
    Name
    Photo
    Phone number
    Address
    in a page multiple persons in a page & so on
    Please make a video

  • @muhamadshuhaib
    @muhamadshuhaib 2 ปีที่แล้ว

    Tq Aryan your video helping me. I got 1 question, How to make all data student mark in single pdf file not separate each student? Can you help me.

    • @AryanIrani123
      @AryanIrani123  2 ปีที่แล้ว +2

      If you want only one final document, then I think you should eliminate the for loop that creates a new doc for each student. Hope this helps you :)

    • @muhamadshuhaib
      @muhamadshuhaib 2 ปีที่แล้ว +1

      @@AryanIrani123 Can you make tutorial or script for that because i don know much about script. TQ for help.

  • @mohamedazzouz9207
    @mohamedazzouz9207 2 ปีที่แล้ว

    Thank you dear Arian,
    Is it possible to open a PDF file right after its creation with Apps Script in Google Sheets?

  • @covid19updates43
    @covid19updates43 2 ปีที่แล้ว

    Nice Video.. How to get Print & Print preview option in selected student like some button click event in html page .

    • @AryanIrani123
      @AryanIrani123  2 ปีที่แล้ว +1

      If you want to preview your PDF before you send out all of them, you can use the FormPublisher Add-on that does the same, but in a more easier way.

    • @nuwanrathnayake4908
      @nuwanrathnayake4908 2 ปีที่แล้ว

      Do you have any example.

    • @AryanIrani123
      @AryanIrani123  2 ปีที่แล้ว

      Yes I have uploaded a Video on how to create documents using FormPublisher.

  • @koungsareth8623
    @koungsareth8623 2 ปีที่แล้ว

    Could you do like this by using Google sheet as template. Thanks

    • @AryanIrani123
      @AryanIrani123  2 ปีที่แล้ว

      Do you mean you want send data back to a sheet ?

  • @krishnaclassesjunagadh6982
    @krishnaclassesjunagadh6982 2 ปีที่แล้ว +1

    DEAR ARYAN, CAN YOU CREAT VIDEO FOR SEND THIS PDF TO WHATSAPP AUTOMATIC BY TRIGER...

  • @dharmkadayat
    @dharmkadayat 2 ปีที่แล้ว

    Thanks for Nice Video.
    How to paste those PDF links in same google sheet Column G for each student's PDF URL.

    • @AryanIrani123
      @AryanIrani123  2 ปีที่แล้ว +1

      I will be making a short video on your problem in a few days. Stay tuned.......

    • @dharmkadayat
      @dharmkadayat 2 ปีที่แล้ว

      @@AryanIrani123 Thanks for your reply...
      Awaiting for the video..

  • @yousafsimba4525
    @yousafsimba4525 2 ปีที่แล้ว

    I need to put the totals etc also in my doc template, how can I?

    • @AryanIrani123
      @AryanIrani123  2 ปีที่แล้ว

      Use the sum Formula, to get the sum of all the marks, and create a variable in the doc and add it to the Script.

  • @googleguruji2553
    @googleguruji2553 2 ปีที่แล้ว

    Instead of using Google doc as a template for creating pdf, can we use Google sheet and it's data for creating PDFs..? I have my data in google sheet, which is a template 2nd sheet and it gets data from another 1st sheet within tha same google sheet file through a drop down list from source sheet. If you don't mind can I get your e mail address to share this sheet to find out solution.?

  • @kaushikpatel2250
    @kaushikpatel2250 ปีที่แล้ว

    Script for all pdf in single pdf for teacher

  • @rmsajashpur1538
    @rmsajashpur1538 2 ปีที่แล้ว

    Suppose if i made a google form for recruitment and i am getting daily 10000 response for next 15 days . Then this will work or not ?

    • @AryanIrani123
      @AryanIrani123  2 ปีที่แล้ว +1

      If you have a normal Google Account, you can only send 500 emails in a day and if you have a Google Workspace Account you can send up to 2000 emails. Check out this link to know more : support.google.com/a/answer/166852?hl=en
      Also if you want to make the process faster you can check out this Add-on called Form-Publisher : form-publisher.com/

    • @rmsajashpur1538
      @rmsajashpur1538 2 ปีที่แล้ว

      @@AryanIrani123 Thanks for giving answer.
      Because I just have made a google form for salesman recruitment and I am getting daily 3000+ response and as you said even I have google workspace account I can only send only 2000 pdf.
      What if I have to send 3000+ pdf in a day?
      Thanks in advance
      Eagerly waiting.

    • @AryanIrani123
      @AryanIrani123  2 ปีที่แล้ว

      Nope. There is a quota that you cannot exceed, so I think you can only send 2000 pdf's a day.

  • @juliobispo
    @juliobispo 2 ปีที่แล้ว +1

    Thanks for the video. I followed the instructions step by step , however I got the "TypeError: Cannot read property 'makeCopy' of undefined".

    • @AryanIrani123
      @AryanIrani123  2 ปีที่แล้ว

      Check again, see the function that you are running. You might be running the wrong function.

    • @juliobispo
      @juliobispo 2 ปีที่แล้ว

      ​@@AryanIrani123 The problem occurs when I run the function "createPDF". I rewrote the code three times following your instructions, but when I run the "createPDF" function the error message bellow appears:
      function createPDF(docFile,tempFolder,pdfFolder) {
      const tempFile = docFile.makeCopy(tempFolder);
      const tempDocFile = DocumentApp.openById(tempFile.getId());
      const body = tempDocFile.getBody();
      ....

    • @AryanIrani123
      @AryanIrani123  2 ปีที่แล้ว

      @@juliobispo Check the Document that you are using, the error is telling you that it cannot make a copy of undefined. This means that the you have not declared or got the correct Doc.

  • @berbagichanel5037
    @berbagichanel5037 2 ปีที่แล้ว

    hello Aryan, i am very interested. i want to study about that.. can i get acces to the doc file. i have send message request acces,..thanks before.

  • @taxsolutionconsultancyserv9899
    @taxsolutionconsultancyserv9899 ปีที่แล้ว

    bich me kisi row me agar email id nahi ho to pdf generation block ho jata hai.. iska koi solution ho to bataye.