I have a spreadsheet where I track incoming email questions and outgoing responses. As questions come in, I have a script that appends a row (using .appendRow()) with information in the first few cells. To make sending the responses easier, I would like to include the email address of the questioner as a hyperlink in one cell of the new row. I've tried using =HYPERLINK(...) and get a syntax error.

  • According to the support docs, mailto: links are allowed. What's the syntax you're using? Please edit your question.
    – ale
    Mar 12 '16 at 18:30
  • I got it to work by concatenating mailto: with the email address e.g. str1 = new String ('mailto:'); str2 = name@gmail.com; mailString = str1.concat(str2); Mar 12 '16 at 19:33
  • Great! You should create an answer with that information and, when you can, "accept" it. That way when someone runs into the same difficulty in the future, they'll be able to find your post and how you fixed it.
    – ale
    Mar 12 '16 at 19:34
  • As a beginner on this site, I don't have a clue as to how to post a "good looking" answer. Mar 12 '16 at 19:40
  • Just do the best you can. There's editing help available.
    – ale
    Mar 12 '16 at 20:40

Here's one way to make this work. It would be nice not to have the "mailto" show up, but this way does provide the correct functionality.

var string1 = new String ('mailto:');  
var string2 = joeblow@gmail.com;  
var address = string1.concat(string2);  
    sheet.appendRow(["", xxxx, yyyy, address]);

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.