Routing Emails Based on the User's Input on Google Forms

Поделиться
HTML-код
  • Опубликовано: 28 май 2024
  • Get fancy with your triggered emails in Google Forms by creating custom email routing based on what people are selecting in their Google Form responses. Super easy to use, you can set it up in under 20 minutes (probably even faster if you avoid the mistake I did in this video by not realizing that the response value wasn't a string type at first 🥲)
    ▶︎Video Chapters◀︎
    0:00 - Intro
    0:50 - Topic
    4:36 - Writing our script
    7:00 - Using a switch() statement
    13:07 - Don't forget to FORCE the value into a string type
    15:01 - Customize the body of the emails
    15:58 - Wrap up
    ▶︎▶︎Related Videos
    Auto-sending Emails on Form Submissions: • How to Auto-Send Email...
    Hooking up a Google Form to Google Sheets: • 2 Ways to Link Up a Go...
    🔔 Subscribe for more tips just like this: ruclips.net/user/Bootstrappi...
    ======= KEEP LEARNING WITH Bootstrapping Tools =======
    🎬 MOST RECENT VIDEOS: / bootstrappingtools
    🛠️ Building Retool Apps: bit.ly/BootstrappingTools-Ret...
    🤖 Automate with Google Apps Script: bit.ly/BootstrappingTools-Goo...
    💻 Build-Through Videos: bit.ly/BootstrappingTools-Let...
    🚑 Community Support Videos: bit.ly/BootstrappingTools-Com...
    🚀 Check out some of our written content: bootstrapping.tools
    ======================================================
    👥 Looking for something specific? feedback@bootstrapping.tools
    💝 Support our channel by buying us a coffee: ko-fi.com/bootstrappingtools
    ======================================================
    #Bootstrapped #GoogleForms #EmailRouting
  • ХоббиХобби

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

  • @truemasterz7303
    @truemasterz7303 Год назад +2

    This is exaaaaaactly what i have been searching for for multiple days now, great upload!

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

      Glad you like it!

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

      @@BootstrappingTools I've been looking for this tutorial too. Gonna go ahead and try it now on my forms.

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

    Super helpful! Thank you!

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

    great tutorial! thanks.

  • @weeraponsrikhonherw2495
    @weeraponsrikhonherw2495 11 месяцев назад +1

    Thank you so much

  • @user-jq6ly2ki3n
    @user-jq6ly2ki3n 9 месяцев назад +1

    Question: I have a form that doesn't have any pre-selects (like your departments). I want multiple people notified when a form is submitted, How do I accomplish this? I have no coding experience. Love what you have been doing. Thanks in advance.

  • @user-zv5jc8ps9h
    @user-zv5jc8ps9h 8 месяцев назад

    I want create a form to share observation data of my caseload students with their parents. So, I would be the one using the form, choosing data points or otherwise filling in observation data, selecting the recipient (from a list of my caseload students' parent email addresses), then submitting the form. The result would be data from the observation (or perhaps a daily report) that lands in the response spreadsheet (which would double as my contact log). Also, the parent receiving a timely update of concern, issues, successes, homework status, etc. It seems that your bootstrapping tool might do the job, but my programming and scripting skills are super-rusty. What are your thoughts?

  • @user-cv4cg8cc2s
    @user-cv4cg8cc2s 7 месяцев назад

    Can you supply the script in Word such that I can paste the text in the editor?

  • @user-cv4cg8cc2s
    @user-cv4cg8cc2s 7 месяцев назад

    Can you supply the script is a form that I may paste the script?

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

    hi there i have a google form but i want to send a pdf file with the email according to the selection

  • @luisvilla799
    @luisvilla799 2 месяца назад

    I’m a teacher and want to do fail notice with this so for example first question would be the class period in day then have the names pop up for them and then send fail email to them and parents I wonder if can be done

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

    This was super helpful but for some reason I could not make the email work :( I'm very new to this so I couldnt follow your instructions you mentioned on updating the email scipt

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

    When a form is submitted "yes" in a specific cell, I want this to trigger all of the results in that row to multiple email addresses. I'm doing this for a school and a student is asking for a check in. I want all teachers on that student's teacher team to be notified, not just one email. Is this possible with your script?

  • @user-mp8lc6gd9j
    @user-mp8lc6gd9j 5 месяцев назад

    How do I set up a code where the google form responses are only sent to a certain person that is selected on the google form. For example: I work in education. If a student completes the google form and selects my name that they want to talk to how do I automatically receive the google form's answers? If another student completes the google form but wants to talk to the counselor and selects the counselor's name how do the responses automatically go to the counselor?

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

    What would I need to adjust in the script if I have the options as checkboxes because they can choose multiple options, and that means I need an email sent to multiple people? This is working if only one option is chosen, but when 2+ options are chosen, there is a script failure.
    Thank you-

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

      To have it send to multiple people based on a multi-select option, there's a few different ways to approach it.
      One way is to have a mapper for the options that you can reference on its own using the options selected. So when you get the values for the multi-select from the form response, you'd want to loop through those values and reference the mapper to see where the email should get sent - then send it for each match.

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

      @@BootstrappingTools Ok, do you have a tutorial that shows how to create a mapper?

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

      This is exactly what I'm looking for too! Would love a tutorial on creating a mapper so that I don't have to create multiple dropdown questions.

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

      @@jennytipton5500 hmmm I don't have a video on that specific topic... but I'll put it on the list to do a full walk-through.
      In the meantime, you'd essentially create an array of objects where each object matches with your multi-select options. Here's an example of what that might look like:
      let mapper = [
      {
      option1: ['opt1_email1', 'opt1_email2', 'opt1_email3']
      },
      {
      option2: ['opt2_email1', 'opt2_email2', 'opt2_email3']
      },
      {
      option3: ['opt3_email1', 'opt3_email2', 'opt3_email3']
      },
      ]
      and then when you loop through the multi-select options that the user submitted, you can do "mapper.filter((opt) => Object.keys(opt) == selectedOption)" to find the list of emails for that particular selected option.

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

      @@maxxygeoff9649
      Awesome! I actually just replied to Jenny about this. Check it out here: ruclips.net/video/Gm4zbFQFeT0/видео.html&lc=Ugyiv1MPQYtjjF288_94AaABAg.9gFCmr3hAmI9h39pVyUX38

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

    Thank you for these tutorials! I am using this form to send a notice to a teacher. Alerting them to the fact that a parent is trying to contact them. I have changed the drop down to reflect all the teachers’ names and adjusted the scripts to match their email addresses but I would like to add the sender's email address and name to the body of the email that the teacher receives so the teacher does not have to go back to the Google Sheet. Can you give me some direction on how to accomplish this task please? Thank you

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

      Hi there!
      When you get the event object back and determine the row, you can use that to reference all of the values submitted during the form submission. From there, just declare a variable for each data point you want to include and use it in the body of the email.
      Here's an example of getting those values and putting them into a variable called body:
      let sheet = e.range.getSheet()
      let formSubmission = sheet.getRange(e.range.getRow(), 1, 1, sheet.getLastColumn()).getValues()
      let email = formSubmission[2] (assuming the email is located in column B)
      let name = formSubmission[3] (assuming the name is located in column C)
      let body = `Form submitted by ${name} - they can be reached at ${email}.`

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

      @@BootstrappingTools Thanks for the explanation and suggestion. Adding to the App Script from the video tutorial, not sure how to add these data points to the final working script in the video. Thank you again

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

      ​@@donharkin153
      So in the context of this video's script... you'd wanna use named_values[question] to get your email and name. Replace "question" with what you entered in as the question on your form.
      Once you have those, you can add it to the "body" variable by following the ${} format.
      e.g. - `Text, ${variable_name}, more text, ${another_variable_name}`
      ^ make sure to use the tick marks ( ` ) when you're using the ${} format.

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

      @@BootstrappingTools Thank you but when inputting this string when using the model above: body = `named_values, ${"What\'s your Name?"}, named_values, ${"What\'s your Email?"}, named_values, ${"Request"}` In the return email I get: named_values, What's your Name?, named_values, What's your Email?,
      named_values, Request The values aren't returned. I think I tried every combination but I still can get the values in the email.

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

      @@BootstrappingTools I found the correct syntax. Thank you for your help with this. I will definitely watch and learn more from your videos

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

    Hi I followed the tutorial, but when the email is sent to the department, the sender appear to be always myself (the owner of the script), and not the user who filled up the form. How should I solve this?

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

      Hi Diego,
      You won't be able to send the email with the sender as the user who filled out the form since that would be the same as sending an email on behalf of the user which you wouldn't have the authorization to do..... HOWEVER you can set the replyTo email as the user's and if you have it - their name as the Display Name.
      Your send email call should looking sorta like this:
      GmailApp.sendEmail(recipient, subject, body, {
      name: "Name of User",
      replyTo: userEmail@example.com
      })

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

      @@BootstrappingTools that’s super helpful, thanks a lot I’m gonna try it tomorrow!