There are lots of examples about mail-merge with Google Apps Script.
Using Mailchimp for blog updates by email had the problem that only the default feed would work, and not a custom feed as mentioned in my earlier post.
So, I've attempted to create a mailing list manager in Google Apps Script. Subscribe and unsubscribe forms are to be done (TBD). Some notes, in addition to the references in the inline comments -
- Add unsubscribe link - https://ravgeetdhillon.medium.com/add-unsubscribe-link-in-emails-using-google-apps-script-475c938b3e9f
- For parsing RSS, the XmlService - https://developers.google.com/apps-script/reference/xml-service/xml-service
and https://www.labnol.org/code/19733-parse-xml-rss-feeds-google-scripts - Example script which gets the most recent XKCD comic from the RSS feed and emails it to yourself - https://gist.github.com/roblaplaca/11025c3e0cae33f3fc0b
- Verifying emails - https://stackoverflow.com/questions/26577293/verify-email-entered-in-a-google-form-using-google-apps-script
- I might probably go for a verification email instead, like https://www.youtube.com/watch?v=gi_xlZ5K9rs
- Simple GAS RSS reader - https://www.youtube.com/watch?v=vFOH1AQaSl8 - but I think the Atom RSS used by blogger has different fields.
- Shortcut to get json data - https://gist.github.com/mhawksey/1442370 -
var response = UrlFetchApp.fetch('https://YOURSITEHERE.com');
var json = response.getContentText();
var rawdata = JSON.parse(json);
var rawdata = JSON.parse(response.getContentText());
Logger.log(rawdata);
var data = [];
data.push(rawdata);
SpreadsheetApp.getActiveSheet().appendRow(data)
No comments:
Post a Comment