-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.gs
More file actions
22 lines (20 loc) · 699 Bytes
/
Copy pathscript.gs
File metadata and controls
22 lines (20 loc) · 699 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
//https://docs.google.com/spreadsheets/d/1uczNVcEgl7_A6BZ9DIareW1oaqjjibxBJsWbFzHd4Uk/edit#gid=0
//1. open excel sheet in your browser
//2. Save the data in the format as in the sample excel sheet
//3. go to tools -> Script Editor -> and copy-paste this script
//4. Run.
//5. edit the script according to your needs
function myFunction() {
var sheet = SpreadsheetApp.getActive();
var address;
var email;
var map;
var i;
for(i=1 ; i<= sheet.getLastRow() ; i++)
{
email = sheet.getSheetValues(i, 1, 1, 1);
address = sheet.getSheetValues(i, 2, 1, 1);
map = Maps.newStaticMap().addMarker(address);
GmailApp.sendEmail(email,'SUBJECT','BODY',{attachments: [map]});
}
}