This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getCsv(in_sheet) { | |
var data_range = in_sheet.getDataRange(); | |
var data = data_range.getValues() | |
csv = "" | |
for (var row = 0; row < data.length; row++) { | |
for (var col = 0; col < data[row].length; col++) { | |
if (data[row][col].toString().indexOf(",") != -1) { | |
data[row][col] = "\"" + data[row][col] + "\""; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var API_KEY = 'XXXXXXX'; | |
var API_USER = 'anystring'; | |
var mc_list_id = 'XXXXX'; //List ID found in list settings | |
// Using adding members with custom signup forms in this example | |
var mc_base_url = 'https://us14.api.mailchimp.com/3.0/lists/' + mc_list_id + '/members'; | |
//var mc_send = 'https://us14.api.mailchimp.com/3.0/automations/XXXX/emails/XXXXX/queue'; | |
/** | |
* Used to convert email to MD5 hash to allow auto update of user information with MailChimp 3.0 API w/ PUT | |
*/ |