google apps script - How can I send url of my Spreadsheet in email -


How can I send the URL of my spreadsheet by email?

  My code: var emailAddress = "My email"; Var url = ""; Var topic = name1; MailApp.sendEmail (email address, subject, url);   

This code that sends email. But how can I get my own URL (spreadsheet)?

Assume that your spreadsheet is created

  • go to file-> share , A dialog should pop up with your sharing settings
  • At the top there should be a URL that you can send to people.

    Some additional notes:

    • If your spread sheet is set to Private, you can change the settings, such as those with the link , They can see the spreadsheet.

      Edit: Application Script API

        var ss = SpreadsheetApp.getActiveSpreadsheet (); Logger.log (ss.getUrl ());   

      Then in your case:

        mailapp. SendEmail (email address, subject, ssUUrl ());    

  • Comments

    Popular posts from this blog

    c# - Textbox not clickable but editable -

    Matlab transpose a table vector -

    ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -