Skip to content

Instantly share code, notes, and snippets.

@nidhinkumar06
Created May 1, 2019 14:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nidhinkumar06/4d842c495019280766b6b0faf8b3dacb to your computer and use it in GitHub Desktop.
Save nidhinkumar06/4d842c495019280766b6b0faf8b3dacb to your computer and use it in GitHub Desktop.
Google-Code-Editor
/** @OnlyCurrentDoc */
function sendMap() {
var sheet = SpreadsheetApp.getActiveSheet();
var address = sheet.getRange('A1').getValue();
var map = Maps.newStaticMap().addMarker(address);
GmailApp.sendEmail('friend@example.com', 'Map', 'See below.', {attachments:[map]});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment