Send an HTML newsletter via email to friends. Content in newsletter is retrieved from a Google Form responses file.
A Gmail account and app password are required for emails to be sent (see here on how to set up an app password). A Google Form is also required for people to upload the content (e.g., images, question responses) that will be included in the HTML newsletter, as well as a corresponding Google Spreadsheet containing response data. The form, spreadsheet, and any related folders in Google Drive will need to be set to "Anyone can view".
When using this repo locally, you will need to set up a .env file containing email addresses, passwords, and the Google Spreadsheet corresponding to the Google Form. It should look something like this:
[email protected]
APP_PASSWORD=xxxxxxxxxxxxxxxx
RECIPIENT=["[email protected]", "[email protected]", ...]
RECIPIENT_SPARK=["[email protected]", "[email protected]", ...]
SHEET_ID=xxxxxxxxxxxxxxxx
SHEET_NAME="xxxxxxxxxxxxxxxx"
BACKGROUND_URL=xxxxxxxxxxxxxxxx
FORM_URL=xxxxxxxxxxxxxxxx
Then, run main.py
. Otherwise, if using this repo with GitHub Actions, you will need to add these hidden variables as secrets (Settings > Secrets and Variables > Actions > New repository secret).
- Jinja2
- Pandas
- Python 3.8