How to Automate Invoice Creation with Google Sheets, Docs and Forms

แชร์
ฝัง
  • เผยแพร่เมื่อ 24 พ.ค. 2024
  • Automate invoice (and other document) creation using Google Forms, Sheets and Docs.We’ll use Apps Script to create a workflow that automatically populates a document template using responses from a Google Form.
    Template: docs.google.com/document/d/1Z...
    Google Forms Phone Regular Expression Pattern: \+?\(?\d{2,4}\)?[\d\s-]{3,}
    Google Forms Email Regular Expression Pattern: [a-zA-Z0-9_\.\+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-\.]+
    Apps Script Code: gist.github.com/automagictv/4...
  • แนวปฏิบัติและการใช้ชีวิต

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

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

    I'm still in awe behind how this really did come out perfectly for me....thank you for your time spent making this video.

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

      please can you help m to know how to past the script code ?
      i pasted but nothing come out

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

    Very helpful and appears pretty straightforward. Will be adopting this tonight. Thank you for sharing.

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

    Thank you for this, I have managed to adjust it to be both my invoice and now a quote form too, it took me a little figuring out but both work perfectly now. Thanks for the really helpful video and additional info in the description. (Australia based)

  • @chervindavasol4704
    @chervindavasol4704 3 ปีที่แล้ว +4

    Thank you for sharing your knowledge! more videos and tutorials about automation like this

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

    The best tutorial on automatic template creation.

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

    It's really magic! It makes it seem so easy to follow. Thanks

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

    Thanks man. You're a star. Awesome video well presented. Kudos.

  • @mattbaker5403
    @mattbaker5403 7 หลายเดือนก่อน

    Great tutorial, very easy to follow, nice and simple for a beginner

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

    Brilliant. This all works for me. Well done, Thanks

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

    Thanks a lot! Looking forward to your new contents / videos.

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

    This is very helpful. Hoping to see more. Thank you.

    • @user-cn9vd6xb2k
      @user-cn9vd6xb2k 3 หลายเดือนก่อน

      what is the script code

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

    Thank you so much .. This is exactly what I was looking for.

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

    Absolutely fantastic video!!!!! thanks very much for sharing. I subscribed after the first 2min :). Ps at 06:10 I couldn't find Script editor "App script" under the Tools Tab drop down list in my Google sheets, might be a google update...I found it under the Extensions Tab so I was able to follow along. thanks once again!

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

    Hey there, its awesome video i made it for my own little company... Thank you very much for the learning video...

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

    Fantastic work brother!!!

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

    Great content-thanks! Would you know what the script edit would look to factor in tax? I'm thinking of just making the calculations manually then adding it as a line-item as a workaround. in all, this was tremendously helpful. 🙂

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

    Brilliant work.. amazed me.. You explained it easily.. The best video 2022

    • @user-cn9vd6xb2k
      @user-cn9vd6xb2k 3 หลายเดือนก่อน

      what is the script code

  • @jacksclassinrelax
    @jacksclassinrelax 6 หลายเดือนก่อน

    great stuff beautifully explained! thanks

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

    Absolutely amazing tut

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

    wow..nice work.. thank you for sharing..

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

    Wow! This will transform our way if doing business! Thank you so much! I made some small adjustments and made it my quote. I had one question. Do you know a way to add HST tax of 13% tax? Or I could easily adjust the "total Balance" to say "subtotal plus tax"

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

    Big thanks bro!
    its really helpful

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

    Lol. It's true when you said don't get scared about coding. I was really procrastinating to learn this because of the Apps Script part.

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

    Thank you this was super insightful!
    Could you also make a version where you are the one that fills out the invoice and sends it off to clients already filled out for them? And in the way that when you input the prices they still calculate themselves at the end for you too? Thank you!

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

    OK this is sort of cool... noticed the Blank rows still had a 0,00$ value so I guess it needs some tweaking or simply deleting the lines... I was hoping for a Sheets solution to the problem where you fill in the data in a sheet and use that to propagate the invoice and then print as .pdf and send the invoice. But there's a lot of this which is good. I'll SUBSCRIBE and head off to find similar content on your channel

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

    Very helpful Thank you so much

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

    Super clear!!

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

    lovely lesson

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

    Thanks a lot..it was very helpful...

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

    Great video! thanks @automagic. Question, is there a way to automatically send the generated invoice to the email in the form?

  • @evangelistarosanaa.6378
    @evangelistarosanaa.6378 ปีที่แล้ว

    hello, i just wanna ask if the script code provided on your description is I can used to all kind of automation that I can do? Or this script code is for only automation like what shown in the video? It's my first time watch a tutorial like this, hoping for your answer

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

    Thank you, Worked well for me, I had to change the currency symbol from dollar to Indian rupee by changing the constant, it worked well for me.

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

      Can you explain in detail how to do currency change?

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

      @@alanaheaney2000 I just replaced the currency symbol in the apps script, under design edits you can see Const currency as $ in the third line, just replace it with your currency symbol. that's it, hope this helps you.

    • @curtylou
      @curtylou 3 หลายเดือนก่อน

      in the app script part the third line down just change the $ sign to your currency .. at least that workled for me, Then de bug that line. @@alanaheaney2000

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

    you saved my life man

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

    thank you helped me !!

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

    Thank you very much for your video, very explanatory, is there a way that the final result can be sent to print instead of being stored, that is to say that after the submit you open the print option? Thanks

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

    This is a great solution. Thanks

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

    Hi, compliment for the tutoria, clear and useful. I would like to know if it’s possible to save the new file even in PDF

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

    Thank you, very informative. Is there any way to create a cart from from Google Forms? I have 3 options on the form Option 1 - $5, Option 2 - $5, Option 3 - $7... It can only be selected once but they must select one or the options. and I will like the value to show in the summary or confirmation email.

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

    This video was really useful bro!! We need more videos like this one. Automation on Google apps..

  • @santiagoj5771
    @santiagoj5771 3 หลายเดือนก่อน

    thanks so much!

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

    Thanks so much for this!
    I have managed to tweak it and is helping me massively. I do have two tiny questions however if you would be so kind as to help with them...
    Is there any way at all that you can change the "description1" and "price1" fields to something a bit more customisable for the Google Form?
    Also, i have noticed something very strange in that the Invoice Date seems to always appear a day earlier than the date i have used. EG if i input 01/02/2022 - it will appear as 31/01/2022 on the invoice. Very odd, but i hope you can help!

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

      You should be able to change the variable names to anything you want as long as you make the change on the doc template, form and in the code. As for the date.. that is strange! I wonder if it has something to do with the time zone settings vs. when the script is executing? Or maybe some date formatting? I can't actually reproduce the issue on my end so I'm not sure what's causing it.

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

      .

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

    This is great. But if I need to have two prices say materials and labour then I need to add them together for a sub total on multiple lines would it work with the same code?

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

    Hi there,
    First off thank you for sharing your knowledge and splendid explanation. I do have a request (googling at the same time): do you have a suggestion on how to not print the template placeholders when they are not used?
    i am trying something like this:
    var match_text = `{{${key}}}`;
    var value = response_data[key];
    // replace template holder with white space if values are not set
    if(typeof match_text === "undefined") {
    var value = ' -- ';// just to check --
    }
    and also tried
    // Check empty template vars
    else if(key.toLowerCase().includes("{{")){
    value = "";
    }
    Any suggestions?

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

    Gee, thanks for this wonderful video. However, i've already my google form and have collected the orders in a google sheet. How can I use your script to generate from the already populated google sheet? Appreciate your help. Thanks a zillion.

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

    Thank you so much for the great explanation. May I ask you how can I make the invoice-Nr to do the count by itself. i meant that the invoice-nr starts with 0 and counts +1 every time

  • @ahmdouelboayt9703
    @ahmdouelboayt9703 6 หลายเดือนก่อน

    great content

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

    Thank you.

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

    Hello!
    Your video helped me a lot.
    I didn´t use the google form but the functioning its the same, do you know how can I pass an image url as a variable to use on the docs template? eg. the picture of the product.
    Right now its passing it as an url only.

  • @delargydom
    @delargydom 3 หลายเดือนก่อน

    This is a great vid. So I have about 4 or 5 regular clients who I invoice regularly. Is it possible to adapt this so that when it comes to enter the client's details, rather than have to type in first name, last name, address etc, I can just type "Bob" and all of Bob's details will be auto-filled? Or maybe just choose the client from a drop down with their details pre-loaded?

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

    This great 👍

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

    Hi Just a question, if I am to add more items, how do I do that? I add adding more items in the form but on the invoice generated, only those 5 items were shown. But on the responses, I have all 10 items. Hope you can help :)

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

    Thank you

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

    Hi Automagic, thanks for the video it is great just what I needed. 1 little issue, the spreadsheet populates fine. The invoice template does not, the only part in the video I could not follow was where you clicked "my function " and it revealed a dropdown menu "create doc from form". I do not have this choice my dropdown only includes "my function". Have you any idea what may be the issue. Many thanks, Tony.

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

      Make sure you copy and pasted the script from the github link into your apps script editor. That function was one that I defined. The "my function" is default.

    • @resilient.warfighter
      @resilient.warfighter 2 ปีที่แล้ว +2

      I deleted the myFunction at the top and then delete the vary last bracket at the end of the script. Then all the function options were available

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

      @@AutomagicTV I have done that but still only have 'my function'

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

    Waiting for more magic. Come back

  • @david716
    @david716 3 หลายเดือนก่อน

    Thank you very much on this tutorial!
    May I ask that in 11:00 there are 3 rows with $0.00 that looks redundant, any method to make it blank? Thanks in advance!

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

    I have a template file for my invoice with a table with sample row, but I want to add more rows dynamically based on a given array size, and write the cells values from the array...
    I've been struggling for almost 3 days now.
    Is there any easy way to accomplish that?

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

    A very valuable video. May I know if I have to add the Facebook profile link to the google form, how to write the regular expression for it?

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

    Hello and thank you for the information.
    I have a Google Sheets estimating tool that I built and would like to have the information in a form format to present to the client. Is this function possible?

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

    My Google Form contains a question in multiple check box format so that translates to it inputting the column title to "Example [1st choice]" in Google Sheets. How do I put in the var function since it doesn't recognize the brackets and also because I can't change the titles for the columns in Sheets? Thanks in advance!

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

    Is there a way that sales tax could be added as a replacement for discount?

  • @tigger22sa
    @tigger22sa 8 หลายเดือนก่อน

    This is great. I'm having an issue with the format of how dates and times are populating the doc. Dates look like Sat Dec 30 2023 (when I want them to be MM/DD/YYYY). Time is populating with 08:32:11 GMT-500 (Eastern Standard Time), when I want them to look like 8:32 AM. Can you help me?

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

    Hi im using almost the same functions as yours.. but I just need to change the discount into ship fee then subtotal will sum up to the ship fee... thank you

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

    Can you add drop down multiple choice answer options for different product prices?

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

    This was really helpful, can you help on how can get data from Gmail to sheets with identifying information for the email body

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

    Hi, thanks for this video.. I believe I did everything correctly, but where do we link that specific form to the invoice template? When I submit the form, the answers go to the responses spreadsheet but no new invoice is created with that info..

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

    Hi! Your code is working for me. The only thing I'd like to change is for the Unit Name to be "Quantity" and this to be multiplied by the "Price" or what I want to call "Cost per item" to get the actual "price" for those item(s) since sometimes my company may sell or purchase more than one of the same item. We use the description as the unit name / description on our invoices. Do you have any tips here to make it a multiplier for pricing and to change "price" to the "Cost per item" and for "price" to be the Quantity * Cost per item?

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

      It's possible. You may be able to do this with something similar to this line [1]. You can set a final price and update it to price * quantity as you loop through. And for each new loop you would reset it to 0.
      [1]: github.com/automagictv/Apps-Scripts/blob/d77c7f8c959ce4a94c06680a108e33c7061463f5/automatic_invoice.gs#L50

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

      @@AutomagicTV I have little to no background to appscript. Would you be able to show how this is done?

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

    I need help. I can't select the "createdocfromform" function because it is not an option for me on the script. What do I do?

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

    thank you1 how can you add in product options... ie. colour options and even surcharges on certain options and comment sections for buyer to specify customization such as names to be added to products, etc? Images for each item & option choices as well.

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

    Hi, your video is very helpful. I need help I have working for one plastic sheet making company. I have made finish stock form and response google sheet with QR code. I want to make dispatch invoice ( example 5 items with QR code ) , just to scan 5 QR codes with take entry in Google sheet and make dispatch invoices for a single supplier. Can it be possible?

  • @VicsMedia-jy3ly
    @VicsMedia-jy3ly 2 หลายเดือนก่อน

    Thank you for sharing , can I include terms and conditions ?

  • @auqibhasab5451
    @auqibhasab5451 7 หลายเดือนก่อน

    What if we want to increase or decrease the items in invoice dynamically can we do that in form or atleast if the details are not filled in the form then the empty row should also not display there in the pdf

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

    Hi there, any chance you have a video showing how to do this with the custom Invoice template I created for our business?

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

    how do you do that for nominal numbers there are separators with commas or dots?

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

    Hi I like to know if you can possibly help me with this for my own business. I have made it in forms but I need help how to have it automatically in a custom estimate sheet

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

    woahh!!! Thank you ! Is it possible to put the same invoice (customer) data into multiple templates? Is is possible to trigger it without filling a form, for example with a ticked checkbox in a cell? Than you!

  • @Orchardpeople
    @Orchardpeople 14 วันที่ผ่านมา

    This is wonderful! How would you change it so that people can order multiple numbers of each product? I sell books. Also can the discount be done in a percentage? Thanks!

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

    Great idea. I wish to have the forms on my website where it cN stored to my workspace drive. i am new to the business and needs your advice plz.

  • @sohobitespodcast4080
    @sohobitespodcast4080 7 หลายเดือนก่อน

    When I try to select the function I want to run (7:45 in your video) I don't have that drop down list of options. Instead, I have just one option which says MyFunction. Have I done something wrong before this?

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

    Hello. Thank you. I would like a 3-part tutorial for Google Workspace: 1) a customer gives email, address, number (that generates an incomplete estimate invoice on website (via Google Forms) 2) an email is generated to admin and admin is able to access that incomplete estimate invoice and add prices for an estimate 3) customer gets complete estimate invoice. Thank you so so so much.

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

    Perfect!! Is there a way(formula) to match the name and date from the sheet and generate ONE invoice for the same client per date? ! I place one item from the same client many times a day.i dont want to generate so many invoices. Thanks

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

    Is it possible to select different invoice template for different entries

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

    Really great; thanks for the information. But I keep getting 'Exception: Unexpected error while getting the method or property getFileById on object DriveApp' as n error; where did I go wrong?

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

    This is great...Do you have a video that automates grouped data i.e from a database I need everyone between the age 18 to 35?

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

    Please Automagic,
    What will be the regular expression pattern for an 11 digit local phone number?
    Thanks.

  • @AM-xr5oc
    @AM-xr5oc วันที่ผ่านมา

    Best video I've found as a beginner. I am having trouble, in Apps Script the only function option is MyFunction, not createdocfromform. Is there something I need to do to make this accessible?

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

    Why does my sheet, after I click on responses and create new sheet for the form, not show script editor? Did I do something wrong?

  • @McM4n
    @McM4n 7 หลายเดือนก่อน

    If we use different Invoice or order template, can the script works the same way?

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

    AutomagicTV, the new doc showed up in the correct Drive (yay!), but it's showing all the original template information, not the Form responses. Is there a way to use/modify your code with a template that I created based on (but not using) your template link?

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

    Hey Automagic this code is working for changing the filename, but the {{Company Name}} etc. fields are not getting replaced. Please help

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

    Hi, Awesome video! Can you make a video about automate email invoice. Invoice automated and send to customers?

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

    @ 6:11 (TOOLS - SCRIPT EDITOR) I do not have that option. Script editor doesn't exist - any suggestions would be great !

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

    IN THE END OF THE WHOLE EXERCISE THERE WAS NO SUBMIT BUTTON ON THE FORM?

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

    I have item list and price to select from in the line items how do I do that?

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

    Hello there, I have followed the same steps, everything is going smooth, the form is created, and is working too but there is no invoice made. Could you please let me know where I did the mistake.

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

    When I submit, no new document appears. What might I have done wrong?

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

    Hello.. I have added all the scripts as directed by your video.. But when i submit form file gets generated but the variables dont get changed.. Request if you can help

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

    I just created a template in sheets and tried to launch with same script, but unfortunately unsuccessful. Is there any possibility to create a script for sheets template?

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

    I have got this working and have added a column that autogenerates the invoice number. I cannot figure out how to get this number to be included on the pdf, any ideas? I would also like the pdf to be named with the invoice number. Great video though thank you so much

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

    Is there something wrong with line 100 ? every time i hit debug it highlights line 100 and when i proceed the document always fails with an error message "cannot read property ' getLastRow' of null.

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

    Hi sir, i want to use the Spread sheet Invoice template instead of Doc template. please help me