Google Form Submission to Spreadsheet Sheet data Autoresponder and custom automation apps script

Google Form Submission to Spreadsheet Sheet data Autoresponder and custom automation apps script Learn more about Google Apps Script
Complete course for beginners to Professional 26.5hrs of HD video
www.udemy.com/course/course-a...
Google Apps Script Complete Course New IDE 100+ Examples
Google Apps Script New Version Create custom functions within G Suite Docs Sheets GMail Drive Calendar and more
Loaded with coding examples and source code to create 100s of apps script coding projects. Course content web development and web design courses with coding examples and source code for the lesson content. Source Code is available within my Github account. Lessons posted are designed to help students learn more about a specific topic related to modern web development and applying code.
Laurence Svekis is a professional top selling course author having instructed over 1 Million students both online and in person. Laurence Svekis is a Google Developer Expert specializing in Google Workspace automation using Google Apps Script Code.
Check out my Website for more details at basescripts.com/
Subscribe - / @laurencesvek. .
Tags and Keywords
#AppsScript #googlesheets #workspace #accounting #finance #automation modern web design online course #onlinecourses #modernwebdesign #tips #appsscript #coding #codingtutorial #script #scriptinghelp #google #Viral #subscribe #helping #GoogleAppsScript #Gmail #Attachments #Spreadsheet #Automation #GmailAttachments #GoogleAppsScript #EmailProductivity #Automation #SpreadsheetLogs #AttachmentDetails #TechTips #ProductivityHacks #GoogleDrive #GmailSearch #GoogleAppsScript #Spreadsheet #Email #Automation #Iteration #subscribe
#GoogleSheets #GoogleAppsScript #CustomUIMenu #SpreadsheetTips #ProductivityTips #TechTutorial #CodingTutorial #BeginnerFriendly #StepByStepGuideSubscribe -

Пікірлер: 27

  • @lholhofox
    @lholhofox10 ай бұрын

    Great video!! thank you SO much!! Keep them coming!!

  • @jayasri-ft8040
    @jayasri-ft80402 жыл бұрын

    Greate job you have done for us. Thankyou. Keep continue with me things

  • @LaurenceSvekisCourses

    @LaurenceSvekisCourses

    2 жыл бұрын

    Thank you, I will

  • @macsam1126
    @macsam11262 жыл бұрын

    Hi sir Laurence Svekis, may i request for tutorial of approval work flow. Like employee to Assistant manager and Assistant manager to Head manager .. Thank you sir ..

  • @LaurenceSvekisCourses

    @LaurenceSvekisCourses

    2 жыл бұрын

    Great suggestion!

  • @vivekasharma3011
    @vivekasharma30112 жыл бұрын

    Useful and creative.... How could I get code??

  • @LaurenceSvekisCourses

    @LaurenceSvekisCourses

    2 жыл бұрын

    I have it on GitHub github.com/lsvekis/Google-Apps-Script

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

    I’m having an issue with the added code. I’m getting cannot read property 0 of undefined at adder (code:24:39) All I did was modify the added code in the example to include my specific form respond passed to the user argument. I added console.log(JSON.stringify(user)) Right after the getsheetByName line and it’s is logging the full responses to the execution log. The problem is some times the adder function runs successively and sometimes it doesn’t. I have commented out the all of the named values lines for the user info const and enabled them one by one. I entered the same data into the form each time. It will run successfully then fail. The only thing different I’m doing than your example is reading the time stamp named value into the user info const but that seems to work. Doors anyone have any ideas of what could be happening ? Is there a max length for response data that can be passed? Is Google system just not realizable all the time? Is there another way to do this?

  • @LaurenceSvekisCourses

    @LaurenceSvekisCourses

    Жыл бұрын

    The scripts can run max 15 minutes, if they timeout they stop. There are several limitations on Apps Script with the cloud, if its showing undefined that s missing the variable value. Try using the Logger to output it to see what values are passed in the object.

  • @hillw

    @hillw

    Жыл бұрын

    @@LaurenceSvekisCourses yes I did use the logger and did show it passing all of response data to the function. I’ve tested enough now to think it’s not the code. The script typically runs in about .7 seconds. Sometimes it 1.5 seconds but on the longer triggers it ram successfully? I’m at a loss. Got any suggestions?

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

    Is there a reason you chose to create the trigger programmatically rather than to create the triggers inder trigger? Also, if two users are filling out the form and hot submit at the same time does google handle multi thread triggers so that the user response is properly coordinated to the sheet and then the trigger runs the script twice and emails each submitter the correct information? Also I get two adder triggers when I submit the form. Why? I Can't find the script for this lesson on your github. Is there a title or a link?

  • @LaurenceSvekisCourses

    @LaurenceSvekisCourses

    Жыл бұрын

    It was just for demonstration, typically I create the trigger in the dashboard since its only done once.

  • @hillwright6609

    @hillwright6609

    Жыл бұрын

    @@LaurenceSvekisCourses I thought that might be the case. So I can just delete it from the project and keep it for setting up new projects? I've watched your video for six hours! Lots of little details.

  • @sirmandtechnology6375
    @sirmandtechnology63752 жыл бұрын

    how about if you add upload file, does it the same code will run?

  • @LaurenceSvekisCourses

    @LaurenceSvekisCourses

    2 жыл бұрын

    yes you can upload the blob data and retrieve it with the utilities in apps script

  • @bilawalnisar764
    @bilawalnisar7642 жыл бұрын

    Hey ! How can i have multiple google forms populating all data into one master spreadsheet with i guess difference tabs “ for each form

  • @LaurenceSvekisCourses

    @LaurenceSvekisCourses

    2 жыл бұрын

    You have to connect the selected sheet to the form, you can have more than one form going to different sheets within the spreadsheet.

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

    I was rewriting this code to rework for my situation and testing it sending emails to my own account. Google decided that I was spamming so they disabled my account. I sent an explanation thinking it would be ok and used another account to test. They disabled that account too. So be careful writing App scripts on the google platform that send out emails.

  • @LaurenceSvekisCourses

    @LaurenceSvekisCourses

    Жыл бұрын

    Yes thank you good advice. In general if you are sending unsolicited emails you should always be careful about it, also avoid too many emails. Avoid bulk emails as well.

  • @hillw

    @hillw

    Жыл бұрын

    @@LaurenceSvekisCourses all the test emails went to an account I own. I explained explained this to Google snd they reversed the decision. But after I resumed testing only sending to my account it was disabled again. I sent only two emails in testing being careful not to do the email function while I worked on other parts. For sending two emails to my own account, the account was disabled.

  • @sirmacademy
    @sirmacademy2 жыл бұрын

    Which is better sir, gmail or mail app service? Im using a workspace account

  • @LaurenceSvekisCourses

    @LaurenceSvekisCourses

    2 жыл бұрын

    Depends on what you want to do, if its sending emails use mailapp

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

    Hi Sir, Thanks for the video. I am new to this and seeking you help on this part... let html = 'Hi ${user.first} ${user.last}'; ${user.first} is considering as a string and not variable. In your example it is coming as variable in (different colour)..but for me it's showing as 1 string. function sender(user){ let html = 'Hi ${user.first} ${user.last}'; html += 'Thank you for submitting your form' html += ''; for (key in user){ const val =user[key]; html += '${val}'; } html += ''; html += ' Have a nice day, Laurence'; MailApp.sendEmail({ recipient: user.email, subject: 'Form submitted', htmlBody:html, cc: 'xxxx@gmail.com' });

  • @LaurenceSvekisCourses

    @LaurenceSvekisCourses

    Жыл бұрын

    You need to use the backticks for a template literal

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

    Thank you for the video. It looks like I am getting multiple emails. I am not a programmer but I have the basic knowledge to follow. However, I am stuck, I am not sure what is causing the trigger to send email messages multiple times. function makeTrigger(){ const sheet = SpreadsheetApp.getActive(); ScriptApp.newTrigger('adder') .forSpreadsheet(sheet) .onFormSubmit() .create(); } function adder(user){ const id = '11owP_yXOelVEIE18D9xkXsXGuXVZWxRCHGmeIla3RAE'; const ss = SpreadsheetApp.openById(id); const sheet = ss.getSheetByName('log'); const userInfo = { Date: user.namedValues["Feedback Date"][0], BBCS_Name: user.namedValues["Name"][0], BBCS_Email: user.namedValues["Email Address"][0], Case: user.namedValues["Case Link"][0], Client_Question: user.namedValues["Client Question"][0], Case_Feedback: user.namedValues["Feedback"][0], Case_Suggestion: user.namedValues["Suggestion"][0], } const json = JSON.stringify(userInfo); const arr = Object.values(userInfo); arr.push(json); sheet.appendRow(arr); sender(userInfo); } function test1(){ const user = {"authMode":"FULL","namedValues":{"Email":[""],"Name":["Atrayee"],"Feedback Date":["10/12/2022"],"Overall Rating":[""],"Case Link":["set"],"Email address":[""],"SOP - Process Followed in Salesforce Correctly?":[""],"Email Response to Client?":[""],"Timestamp":["10/12/2022 12:32:06"],"Wedding Link":["test"],"Email Address":["mbhasin@orionphotogroup.com"],"Any Othe Relevant Link:":["set"],"Client Question":["st"],"Score":[""],"Discussed":["Yes"],"TOP Category":["Albums"],"Suggestion":[""],"Feedback":[""]},"range":{"columnEnd":17,"columnStart":1,"rowEnd":3,"rowStart":3},"source":{},"triggerUid":"12982268","values":["10/12/2022 12:32:06","10/12/2022","Atrayee","set","test","set","st","","","","","","Albums","Yes","","","mbhasin@orionphotogroup.com",""]} const userInfo = { Date: user.namedValues["Feedback Date"][0], BBCS_Name: user.namedValues["Name"][0], BBCS_Email: user.namedValues["Email Address"][0], Case: user.namedValues["Case Link"][0], Client_Question: user.namedValues["Client Question"][0], Case_Feedback: user.namedValues["Feedback"][0], Case_Suggestion: user.namedValues["Suggestion"][0], } Logger.log(userInfo); } function sender(user){ let html = `Hello ${user.BBCS_Name}`; html += 'You have received a new feedback. Please review and acknowledge it by sending a reply to this email.'; html += 'To Acknowledge reply - Acknowledged or Accepted.'; html += 'To Dispute it reply - Dispute and the Reason.'; html += ''; for(key in user) { const val = user[key]; html += `${val}`; } html += ''; html += '

  • @LaurenceSvekisCourses

    @LaurenceSvekisCourses

    Жыл бұрын

    Are there any issues in the logs

  • @manjotbhasin

    @manjotbhasin

    Жыл бұрын

    @@LaurenceSvekisCourses sorry for late reply but I was able to fix it. I made a few changes and applied the trigger instead, works like a charm now. Thank you.

Келесі