Open ohadschn opened 11 months ago
We can add small Google form email and category and send them email in case there's a new initiative
Overview: A Google Spreadsheet will use Google Apps Script to provide a webhook endpoint. This endpoint will handle incoming HTTP POST requests containing email and category lists, and store them directly into the spreadsheet.
Google Spreadsheet Setup:
Create a new Google Spreadsheet Define two columns: "Email" and "Categories".
Google Apps Script: Create a new script file from the Google Spreadsheet by clicking on Extensions > Apps Script. Write a script that: Creates a doPost(e) function to handle HTTP POST requests. Parses and validates the request body content. Appends valid data to the spreadsheet.
Script Example:
function doPost(e) {
var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
var postData = JSON.parse(e.postData.contents);
var email = postData.email;
var categories = postData.categories.join(", "); // Convert array to string
// Append data to the sheet
sheet.appendRow([email, categories]);
// Return a success message
return ContentService.createTextOutput(
JSON.stringify({"status": "success"})
).setMimeType(ContentService.MimeType.JSON);
}
Later we'll connect it to the frontend
Later we'll connect it to the frontend
That sounds like the easy part - I suspect the more challenging part would be actually detecting category changes and sending out an arbitrary amount of email notifications.
Having said that, is this even an interesting scenario for our customers?
I think we can't know for sure until well try, and development cost is small
I think we can't know for sure until well try, and development cost is small
@4tal you are right of course we can't know for sure, but that can be said about anything :) Ultimately, we're going to have to prioritize by our best estimations, and in this case I just don't see it as a big part of our main scenarios, which as I see them are:
It's harder for me to imagine the scenario where someone says "I want to be informed of every new initiative in the area of X the moment it's added to the site".
Let's do the following. Add subscribe button with and on press it will pop-up "coming soon" and we'll see if that button is been pressed at all @ohadschn
LOL that is pretty evil! So I can't say no
A user could register (possibly at the category/subcategory level) and get notified whenever new links are posted. Not sure how feasible on github pages, also probably lower priority.