--
You received this message because you are subscribed to the Google Groups "FormEmailer" group.
To view this discussion on the web visit https://groups.google.com/d/msg/formemailer/-/deA1A9NGkAEJ.
To post to this group, send email to forme...@googlegroups.com.
To unsubscribe from this group, send email to formemailer...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/formemailer?hl=en.
Hi, this is perfectly possible.For an email to be sent in Apps Script it must have recipients on the "To" field (note that this is not true for gmail, where you can have only Bcc, for example).So, the trick is to use a formula that returns an empty string if the email should not be sent, or its recipient list if it should. Then use this formula placeholder on the "To" field of the respective email.In you case, you'll need 4 new columns, one formula for each. And you're formulas will look like this:=IF( P2 = "Option 1"; "example@domain"; "" )Considering P to be the column the options answers are, and this to be the formula for email1.I have explained this before here, please take a look:
Henrique Abreu
--
You received this message because you are subscribed to the Google Groups "FormEmailer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to formemailer...@googlegroups.com.
To post to this group, send email to forme...@googlegroups.com.
Visit this group at http://groups.google.com/group/formemailer?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
Hi Dan
I'm a novice as you’ll see!
I've added 3 columns;
If Cell H is a 'yes' it copies the email address contained in H to cell J or if it has a no it copies the email address to cell K, on submit form it tries to fire 2 emails (that have different text in the bodies) only one email goes as the address is taken from cell J & K which is correct (one’s blank).
Colume 3 uses a Vlookup, it takes the data from F and then looks up an email dress from the lookup sheet and places that email address into L, this is so that department get a copy of the person booked into their meeting.
The problem is that when you submit the form it deletes my formula so the emails never go, if you manually populate the responses the code works (I guess all down to the ways I’ve tried to do it!)
Spreadsheet attached (not real email addresses!)
Thanks
Mark
HiCan you give a specific example of what you're trying to achieve, ideally share a sheet?Dan
On 5 March 2013 21:13, Roy via FormEmailer <formemailer+noreply-APn2wQeEMbI69jENWYbl2eSFwuWt8_b_qPgjjxBWwq23@googlegroups.com> wrote:
I still can't get this to work.Could someone supply a simple step-by-step guide from sending different emails to different people based on selections.Emails will be in the spreadsheet not the form.Thanks,Roy--
You received this message because you are subscribed to the Google Groups "FormEmailer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to formemailer...@googlegroups.com.
To post to this group, send email to forme...@googlegroups.com.
Visit this group at http://groups.google.com/group/formemailer?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
Visit this group at http://groups.google.com/group/formemailer.
For more options, visit https://groups.google.com/d/optout.
Hi Mark, I'm a novice too, but it doesn't stop me trying to help others even if I do get it wrong sometimes!I like your use of VLOOKUP (I might use that a bit more!). I can't see any formemailer script so I don't know how you've set it up, but one thing you said..."The problem is that when you submit the form it deletes my formula so the emails never go..."I assume that you are writing your 'master' formulae in row 2 (immediately below the header row)? Consider that row a dummy row. Then, when a form is submitted, formEmailer copies that formula from row 2, down the column to the new form submission row. So, you do need to make some of the references 'absolute'.For example, L2 is:=VLOOKUP(F2,lookup!A1:B7,2,FALSE)but should be:=VLOOKUP($F2,lookup!$A$1:$B$7,2,FALSE)If you now copy the latter from L2 to, say, L6 you'll find the formula is still looking for info from the correct cells:=VLOOKUP($F6,lookup!$A$1:$B$7,2,FALSE)Does that solve the problem?Dan