1

I have a Google form that allows users to send a co-worker a digital greeting card but they have to manually enter the email address of the person they are sending it to. The issue is sometimes they might put in john@example.com instead of jonathan@example.com.

I need a check that will make sure the email address that they provide actually exists in the organization.

Whether this takes the form of suggestions as they type the email (like when typing an email in Gmail) or if there is a script to check it after submitting (I could email the user after to let them know they sent it wrong) either way would work, I just need to make sure the emails exist.

  • 1
    I'm quite sure there is no way to check for a valid email address before the Google Form is submitted. Even after the form is submitted, I'm quite sure that there is no way to test that the email is valid. There may be some kind of external service available that could do that, but nothing "built-in" that I know of. But, if there is a way, I'd sure like to know, because I could use it myself. – Alan Wells Apr 7 '16 at 23:00
  • RelicCross, did this work out for you? @SandyGood How did you find my answer? Do you think you could help improving it using a scripting solution as I mention in the last paragraph? – marikamitsos Apr 11 '16 at 16:54
  • It's a great idea to check either an email entered into the form, or the logged in user against a list. There would need to be multiple parts to this. Some one needs to maintain a list, either in the contacts of the account using the Form, or somewhere else. If it's a business or a school system, maybe there's a way to get a list of emails of people in the domain? I don't know. If the Form is getting the email of the person logged in, then you'll know it's a good email. This would require people submitting the form to be logged in. – Alan Wells Apr 11 '16 at 20:25
  • @SandyGood "It's a great idea"... Unfortunately my coding skills would fail me without question. "Some one needs to maintain a list"... We do. We are a school and have rosters (email, Last/First name, ID, nickname, etc) for everyone. Students have various accounts so we ask them to fill in their emails on the form. But younger ones make so many mistakes. If you are up to the task, I would be happy to turn this comment to a question. Maybe over to stackoverflow. It would be great. What do you think? – marikamitsos Apr 11 '16 at 20:54
  • @SandyGood for me, pulling the email of the user who is submitting is no problem, they are always already logged in here, my problem is the user typing other emails to send to, and there are just way too many people to use a simple list. – RelicCross Apr 11 '16 at 21:22
1

Working on the solution:

...a check that will make sure the email address that they provide actually exists in the organization...

We were facing a similar situation. Being an educator we have youngsters that quite often misspell their email accounts when filling out their test forms. As a result we would end up sending their grading to the wrong or even a non-existing email.
We are not script savvy so we came up with a workaround.

Instead of having them fill out their emails, we provide those emails as a dropdown list (taken from a class roster) and all they have to do is choose their own.
Assuming the organization is not a couple hundred people (in which case you most definitely need a script), this could very well work in your case as well. If you were to change the droplist to a checkbox, you could even have someone send a greeting card to more than just one member.

You may argue the above answer as the "right" choice. The reason being it may cause a security breach. In addition to having personal data publicly exposed. In that case you could sent the form by email or even have it password protected.

A scripting solution that could, after submitting the form, compare the answer of a specific question to a given list of emails and take an appropriate action (e.g. sent an email to the form creator for a not-listed email) would indeed be very welcomed by us as well.

  • Thanks, unfortunately I need to pull from a list of hundreds of users that is constantly changing.... Would definitely need a script. – RelicCross Apr 11 '16 at 18:46
  • Here's the cheat> 1 spreadsheet of emails with grades and/or home rooms. Use that data to provision simple web pages. Page one of interface chooses grade>pg 2 homeroom>then click name from list which fills in email field via URL parameters (support.google.com/docs/answer/160000?hl=en). – Tom Woodward May 9 '16 at 20:19
  • @TomWoodward "Use that data to provision simple web pages"` Do you mean create public pages for every single email from the spreadsheet accessible to students? And then, "Page one of interface" which interface(?) web page/form, "click name", who does(?), the author of the form or the student. I am lost. Could I possibly ask for a "test drive"? – marikamitsos May 11 '16 at 14:27
  • @marikamitsos ha. Yeah. Terrible description. Here's a quick example that uses a Google SS for source of the student data and throws it in Angular to build the stuff. bionicteaching.com/tools/email_verify.html and here are the google files drive.google.com/drive/folders/0B_9l84KvUJBWWEl2cEFsU1djR00 – Tom Woodward May 11 '16 at 23:44
  • @TomWoodward Thank you Tom. That looks great. We will have a go with it. The problem is we wouldn't know how to use Angular, so will have to figure another way. A Google script maybe... – marikamitsos May 12 '16 at 6:14
1

Short answer

At this time Google Forms can not validate input data against an external list of valid values. You could ask Google to include this feature through Google Feedback.

Explanation

Google Forms include input validation for email addresses but this only check if the input was wrote correctly as email addresses, it doesn't check against a list of valid email address, by the other side Google Apps Script Form service doesn't include a way to run on the form response submission mode.

It's worth to say that if you have Google Apps for Work or Google Apps for Education you could set your form to automatically collect the the respondent email address. See Additional forms options for Google Apps users for further details.

  • Getting the email of the person submitting the form isn't the issue as we can do as you suggest, the issue is the user submitting the form is typing in other email addresses within the company, and that's what we can't verify. They are typing correct email formats, the problem is wrong names which is why we would need to check against the emails within the organization. They are typing things like john.smith@example.com instead jonathan.smith@example.com – RelicCross May 16 '16 at 18:03
  • Added a "short answer". – Rubén May 16 '16 at 20:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.