Google apps scripts : get the URL of the spreadsheet and send it by mail -
i created button in spreadsheet: want send url of spreadsheet when click on it, unsuccessfully right now.
here code:
function mail() { var destid = '1kvhutwvr80ascne9ijtlws9yldf5ykixifvvbpjox5e'; var recipient = session.getactiveuser().getemail(); var sprurl = spreadsheetapp.getactivespreadsheet(); logger.log(sprurl.geturl()); gmailapp.sendemail(recipient, 'subject of mail', 'the spreadsheet sits @ following url: ' + logger.log(sprurl.geturl())) }
where going wrong?
thanks lot guys.
the error pasing logger.log(url) when build subject string. pass sprurl.geturl()
Comments
Post a Comment