Google-sheets – Add email hyperlink to spreadsheet

google sheetsgoogle-apps-script

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.

Best Answer

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]);