GAS-080 Add Unique ID to Google Forms Confirmation Message

#UID #GoogleForm #GoogleAppsScript
💮 about me 🔗 onescript.work/about
💮 upwork with me 🔗www.upwork.com/workwith/ashto...
🧑🏻‍💻 automate the boring
IMPORTANT!!!
Sorry, I forgot to tell you in the video. You need to create a trigger in the script project to run function "_onFormSubmit".
Copy the script file to your drive
docs.google.com/spreadsheets/...
Demo From:
forms.gle/ff5ESGe1eSfJbtc97
Source code:
github.com/ashtonfei/google-a...
Github repo: github.com/ashtonfei/google-a...
Gmail: yunjia.fei@gmail.com
Upwork Freelancer: www.upwork.com/freelancers/~0...
Twitter: / ashton_fei
Instagram: / ashton.fei
Buy me a beer: www.paypal.me/ashtonfei/

Пікірлер: 91

  • @nikosthalassinos9524
    @nikosthalassinos9524 Жыл бұрын

    Thanks Ashton, amazing Job!

  • @vrm2009
    @vrm2009 Жыл бұрын

    Thanks Ashton! Very useful tutorial and just what i was looking for. Quick tip for anyone who is unable to get this to work, its likely you missed an important step of "setting up a trigger" 1. In the "Appscript" window, you will see a left panel where the third from top would be a "clock" icon 2. Click the "clock" icon and on this window, create a new trigger 3. In the popup, leave all default values except for the last drop-down "Select event-type" = "On form submit" 4. Click save Now, submit response on google form and you should start seeing the UID_Header field getting populated with IDs. Good luck!

  • @SabbirHosen-re4lo

    @SabbirHosen-re4lo

    Жыл бұрын

    Thank you so much, really this is the important step that was missed in this video and i have lost so many time for searching it. Finally i found your comment and fix my problem, thanks again!

  • @fasikagh6192

    @fasikagh6192

    3 ай бұрын

    Thank you so much

  • @alajlan2012
    @alajlan2012 Жыл бұрын

    very nice work! thanks a lot my dear

  • @crazyghost1277

    @crazyghost1277

    Жыл бұрын

    did u get it to work?

  • @alajlan2012

    @alajlan2012

    Жыл бұрын

    @@crazyghost1277 yes and it worked properly, thanks mate!

  • @kuhannagalingam8703
    @kuhannagalingam8703 Жыл бұрын

    It's working, need to set up Triggers and type UID0001 in confirmation message

  • @reusril2086
    @reusril208611 ай бұрын

    Thank you for this

  • @nurasian7355
    @nurasian73553 жыл бұрын

    Thank you so much.

  • @escapepeterpan
    @escapepeterpanАй бұрын

    It works! thanks so much

  • @muhammedaadhil5645
    @muhammedaadhil56453 жыл бұрын

    Thank you 😊

  • @alcsupport4207
    @alcsupport42072 жыл бұрын

    Hi Ashton! Thanks so Much for this! Really Helpful! Can you write a script to also trigger a What's app Message with Form Summary?

  • @nbchannel8480
    @nbchannel8480 Жыл бұрын

    Thanks so Much

  • @dimitrisvoudouris
    @dimitrisvoudouris3 жыл бұрын

    Very nice

  • @MrLococaco
    @MrLococaco3 жыл бұрын

    Thanks!!

  • @md.zahangiralam1562
    @md.zahangiralam15627 ай бұрын

    Thanks Boss (Ashton)

  • @graysonlofstad9916
    @graysonlofstad99162 жыл бұрын

    How can i properly adapt the script into my own work? im having alot of trouble trying to adjust it

  • @mohamedadel3618
    @mohamedadel36182 жыл бұрын

    Thanks for the video, can you upload another video to show to connect to the sheet with the script please, or any other video show how to connect

  • @octaviri7137
    @octaviri71376 ай бұрын

    Thank you

  • @adelekerahamon3565
    @adelekerahamon35653 ай бұрын

    Thanks a lot

  • @predatorx2011
    @predatorx2011 Жыл бұрын

    You are my god

  • @varshiniratnaraja4682
    @varshiniratnaraja4682Ай бұрын

    thank you Brother

  • @koungsareth8623
    @koungsareth86233 жыл бұрын

    Very much thanks. Please, explain the script more than template.

  • @shree12333
    @shree12333 Жыл бұрын

    I have one scenario where in sheet i have two columns - one is containing Id and other is containing Name . So in google form , If I select ID in one field then wanted name in next field automatically and in disabled mode

  • @pphscgh2741
    @pphscgh27412 жыл бұрын

    I'm having trouble with the script. The UID does not seem to increment.

  • @googlesheetautomation3573
    @googlesheetautomation35733 жыл бұрын

    Top

  • @whatelsewouldyoudo
    @whatelsewouldyoudo Жыл бұрын

    Thanks for this. I Tried it on one of my forms and it generates the same UID number for every entry. It doesn't change at all. How do I fix it?

  • @digitalmarketing1967
    @digitalmarketing19672 жыл бұрын

    i want to apply this script in form which have already made in previous . but it is not worked . please help.

  • @digitalmarketing1967
    @digitalmarketing19672 жыл бұрын

    i have create new script and pasted the code. also i have editing response section in google form . also i have give header name as same as in my google sheet. assigned trigger for that. but at last trigger show 100% error. i am very upset to do that after doing lot of time... help???? what i can do now...???

  • @chrisjansumayang1743
    @chrisjansumayang17432 жыл бұрын

    What if the same person submitted again? Is it possible to get the previous ID the person had?

  • @jaykumarshah5817
    @jaykumarshah58178 ай бұрын

    I am getting this error eventhough I have added UID00001 in confirmation meassge."No UID found in the current confirmation message with regex"

  • @bustermika18
    @bustermika18 Жыл бұрын

    Can you advice me on how to set up the email for this please? can someone share the link?

  • @moapguide
    @moapguide Жыл бұрын

    sometimes it is not giving uid number just skipping the number kidly help me y

  • @Matthew-vi9wh
    @Matthew-vi9wh Жыл бұрын

    anyone know if there is a way of getting the id to display on the form?

  • @presenterpk
    @presenterpk3 жыл бұрын

    AMAZING AND THANKS DEAR ASHTON, IS IT POSSIBLE TO SHOW THE CITY NAME (OR ANY ELSE FILED) IN THE CONFIRMATION MESSAGE AFTER SUBMISSION.

  • @ashtonfei

    @ashtonfei

    3 жыл бұрын

    Sorry, I have to say not possible. The confirmation message is updated before the user submits the form. We can’t predict user’s input when we update it.

  • @presenterpk

    @presenterpk

    3 жыл бұрын

    @@ashtonfei THANK YOU CAN SHOW CURRENT DATE AND TIME ?

  • @ashtonfei

    @ashtonfei

    3 жыл бұрын

    @@presenterpk the same, you don’t know when the user will submit it.

  • @presenterpk

    @presenterpk

    3 жыл бұрын

    @@ashtonfei THANK YOU, YOU ARE DOING A GREAT JOB. I LEARNT A LOT FROM YOU.

  • @laceyruffino9238
    @laceyruffino92382 жыл бұрын

    I'd like to also have the ID display in the email subject line for each submission so I can easily find unique submissions when searching my inbox. Can this be done or at least how do I get the ID in the email so I can search for that specific submission? We currently receive submissions to our email inboxes and then respond to customers from there so having this ID in the subject line is ideal. Do you have a video on that?

  • @ashtonfei

    @ashtonfei

    2 жыл бұрын

    Yes, Lacey. That’s possible with a script to handle the id generation and email notification. We can customize email subject and body.

  • @jarosawj7061

    @jarosawj7061

    Жыл бұрын

    @@ashtonfei Hello Ashton. Your work is great. I need a handle for the UID that I paste into an automated email. I have tried many ways. Unfortunately, the email does not display the correct UID or none at all. Thank you very much for your help!

  • @WheelandSprocket

    @WheelandSprocket

    Жыл бұрын

    @@ashtonfei Are you able to define how to do this?

  • @emilybailey2725
    @emilybailey27252 жыл бұрын

    I keep getting an error in line 12 and 31; "there is no linked form in this spread sheet" and "No UID found in current confirmation message with regex". Has anyone else experienced this or know how to fix it? Thank you!

  • @ashtonfei

    @ashtonfei

    2 жыл бұрын

    Hi Emily You saw this error because the form was not connected to the spreadsheet and you didn't compose a confirmation message (or there is no initial id in the message, like UID-00001).

  • @mohamedadel3618

    @mohamedadel3618

    2 жыл бұрын

    @@ashtonfei please we need o more video to show to connect and compose a confirmation message, this subject is very important . Thank in advance

  • @robertdevadason1885
    @robertdevadason18852 жыл бұрын

    the script seems to be having issues when I used it for a form that is linked in a spreadsheet that has multiple forms linked to as well...any tips?

  • @ashtonfei

    @ashtonfei

    2 жыл бұрын

    Yes. That could happen, I need to review this issue.

  • @robertdevadason1885

    @robertdevadason1885

    2 жыл бұрын

    @@ashtonfei i managed to use a switch with case in the onFormSubmit function to solve this...created separate class for each form based on your sample...but it runs to an error after trying to submit both the forms....im guessing the const clashes, since i just duplicated the class amd renamed them but left the const the same

  • @robertdevadason1885

    @robertdevadason1885

    2 жыл бұрын

    @@ashtonfei what should I pay attention to if i get this error? - "No UID found in the current confirmation message with regex.." I am using 2 forms linked to the same sheet, when the first form is filled up, it runs successfully, but when the 2nd form is filled, this error pops up

  • @sabirrehman8733
    @sabirrehman87338 ай бұрын

    Is it possible for Microsoft Form?

  • @manishgupta9347
    @manishgupta934710 ай бұрын

    Dear Sir how to use multiple Google form Unique ID in one google sheet

  • @blaxc
    @blaxc25 күн бұрын

    Form submission doesn't trigger the function. Is it needed to create a trigger function for form submission?

  • @ashtonfei

    @ashtonfei

    25 күн бұрын

    Yes, a trigger has to be created to run the script for updating the confirmation message so the next ID can be shown for the next response.

  • @dgprajesh
    @dgprajesh3 ай бұрын

    from where to get the code

  • @mohinenterprise9592
    @mohinenterprise95929 ай бұрын

    56,65 error unfilled problem

  • @mohinenterprise9592
    @mohinenterprise95929 ай бұрын

    please sir mail sent script text derails

  • @therisegtef
    @therisegtef3 ай бұрын

    Excellent one Ashton! Thank you...However the functionality to email the response back with the same "Unique ID" to the responder is not covered.

  • @shree12333
    @shree12333 Жыл бұрын

    I cant see script option in tools

  • @ashtonfei

    @ashtonfei

    Жыл бұрын

    It's been moved to "Extensions" now.

  • @shree12333

    @shree12333

    Жыл бұрын

    @@ashtonfei Thank you so much

  • @user-of8ue6ep7s

    @user-of8ue6ep7s

    10 ай бұрын

    @@ashtonfei I'm lost! please help me. I can't find it

  • @ashtonfei

    @ashtonfei

    10 ай бұрын

    @@user-of8ue6ep7s You can't find the script menu? It's under menu Extentions > Apps Script.

  • @user-vx3bj9dn6b
    @user-vx3bj9dn6b8 ай бұрын

    Can somebody send the code?

  • @user-vx3bj9dn6b

    @user-vx3bj9dn6b

    8 ай бұрын

    @jarosawj7061 @ashtonfei

  • @tahamintahi6227
    @tahamintahi62272 ай бұрын

    your source code doesn't work

  • @ashtonfei

    @ashtonfei

    2 ай бұрын

    What's error message did you get?

  • @michaelvanzyl1831
    @michaelvanzyl18318 ай бұрын

    Good day - my code runs to line 55 and 65 and errors out ? Error TypeError: Cannot read properties of undefined (reading 'range') run @ Code.gs:56 _onFormSubmit @ Code.gs:65 What could it be ?

  • @sidhbhardwaj1313

    @sidhbhardwaj1313

    7 ай бұрын

    Did you find any solution to it

  • @catafest-work
    @catafest-work3 жыл бұрын

    Thank you for share. Can this use this form in the mail not into doc.google.com area?

  • @ashtonfei

    @ashtonfei

    3 жыл бұрын

    Sorry, not quite sure about your question.

  • @catafest-work

    @catafest-work

    3 жыл бұрын

    @@ashtonfei ... the idea is to create a form into a mail and sent it to user. The user fill the form in that mail and send these infos to the excel area. Can you solve this issue?

  • @ashtonfei

    @ashtonfei

    3 жыл бұрын

    @@catafest-work GAS-061 Embed Prefilled Form to Gmail kzread.info/dash/bejne/lol7ptmHn7Cuk9Y.html

  • @tranquilmagister8481
    @tranquilmagister84812 жыл бұрын

    I get the error: TypeError: Cannot read property 'getSheets' of null getLinkedSheet @ Code.gs:24 App @ Code.gs:10 _onFormSubmit @ Code.gs:65 I have connected the the google sheet to the form but something is null?

  • @tranquilmagister8481

    @tranquilmagister8481

    2 жыл бұрын

    nvm i found the error, i tried to trigger it through he form instead of the sheet. And this kids is why i is important to listen to teacher :P

  • @ashtonfei

    @ashtonfei

    2 жыл бұрын

    This is how we learn from the errors. 😀

  • @clemersonb

    @clemersonb

    5 ай бұрын

    @@tranquilmagister8481 hello! I get the same error: TypeError: Cannot read property 'getSheets' of null getLinkedSheet @ Code.gs:24 Application @ Code.gs:10 _onFormSubmit@Code.gs:65 How did you fix it, can you explain please?

  • @LP-ig8tg
    @LP-ig8tg2 жыл бұрын

    TypeError: Cannot read property 'range' of undefined run @ Code.gs:56 _onFormSubmit @ Code.gs:65 in short issue with run(e) AND _onFormSubmit Event

  • @ashtonfei

    @ashtonfei

    2 жыл бұрын

    You can not run this function manually. The event object is assigned only you bind a form submit event to call it. Or the event is undefined and you see the error.

  • @ayah8j

    @ayah8j

    2 жыл бұрын

    I have same problem

  • @winsupermarket3003

    @winsupermarket3003

    2 жыл бұрын

    @@ashtonfei So how shall we solve it?

  • @ashtonfei

    @ashtonfei

    2 жыл бұрын

    @@winsupermarket3003 you need to create a new submission from the form to test the function. The submission will trigger the function _onFormSubmit, and an event object is passed there.

  • @MrCarolciciliato

    @MrCarolciciliato

    Жыл бұрын

    I am also getting the same problem. Can you please help? I followed exacly the steps. Created a forms, create the app scrip... =/ does not work

  • @safaltammewar4233
    @safaltammewar4233 Жыл бұрын

    getting onformsubmit e undefined

  • @ashtonfei

    @ashtonfei

    Жыл бұрын

    you can not run the function manually, the e is undefined when you run it manually. It has to be triggered by a form submission.

  • @safaltammewar4233

    @safaltammewar4233

    Жыл бұрын

    @@ashtonfei yes i triggered the form but now e.range is undefined . I have tried to debug event object but not seeing any range property

  • @hemanthaak5015
    @hemanthaak5015 Жыл бұрын

    TypeError: Cannot read property 'range' of undefined run @ code.gs:57 _onFormSubmit @ code.gs:66

  • @ashtonfei

    @ashtonfei

    Жыл бұрын

    _onFormSubmit function should not be executed manually from the script project, it works only when called by a form submit event.

  • @hemanthaak5015

    @hemanthaak5015

    Жыл бұрын

    @@ashtonfei when submit form it will not reflect or any changes id in confirm Page

  • @marvinmarasigan1949

    @marvinmarasigan1949

    Жыл бұрын

    @@ashtonfei Same on my end. The UID does not generate in the response sheet after submitting a response.