All Projects → tobenxe → twitter-digest

tobenxe / twitter-digest

Licence: other
✉️ A netlify lambda function that emails you tweets from a twitter list.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to twitter-digest

iorestoacasa
#covid19 Ciò che stiamo facendo è creare un servizio informazioni, aggiornato in tempo reale, relativo ad ospedali e supporto medico, attività produttive, servizi di approvvigionamento e molto altro. COVID-19
Stars: ✭ 23 (+64.29%)
Mutual labels:  coronavirus, covid-19
covid19-visualized
COVID-19 World update with data Visualization (Include Indonesia cases)
Stars: ✭ 23 (+64.29%)
Mutual labels:  coronavirus, covid-19
covid-19-sg
Visualising COVID-19/Coronavirus cases and cluster zones in Singapore
Stars: ✭ 15 (+7.14%)
Mutual labels:  coronavirus, covid-19
data2019nCoV
COVID-19 Pandemic Data R Package
Stars: ✭ 40 (+185.71%)
Mutual labels:  coronavirus, covid-19
CODE-CAMP-2020
A Virtual Hackathon Camp for Developers, Build real products and win Swags in comfort of your home.
Stars: ✭ 30 (+114.29%)
Mutual labels:  netlify, covid-19
COVID19 AgentBasedSimulation
COVID-ABS: An Agent-Based Model of COVID-19 Epidemic to Simulate Health and Economic Effects of Social Distancing Interventions
Stars: ✭ 56 (+300%)
Mutual labels:  coronavirus, covid-19
CoronaVirus-2019-nCoV-Live-Tracking
CoronaVirus(COVID-19) Live Map Tracker Android Kotlin App
Stars: ✭ 43 (+207.14%)
Mutual labels:  coronavirus, covid-19
covid19-br-info
Coronavirus frontend info about Brazil's states and cities
Stars: ✭ 12 (-14.29%)
Mutual labels:  coronavirus, covid-19
ncov2019
从官方数据中提取我感兴趣的2019新型冠状病毒发展情况
Stars: ✭ 20 (+42.86%)
Mutual labels:  coronavirus, covid-19
iorestoacasa.work
Frontend of the video calling platform iorestoacasa.work
Stars: ✭ 36 (+157.14%)
Mutual labels:  coronavirus, covid-19
cli-corona
📈 Track COVID-19 (2019 novel Coronavirus) statistics via the command line.
Stars: ✭ 14 (+0%)
Mutual labels:  coronavirus, covid-19
covid-19-data
COVID-19 datasets are constructed entirely from primary (government and public agency) sources
Stars: ✭ 104 (+642.86%)
Mutual labels:  coronavirus, covid-19
cotect
🛡Crowd-sourced COVID-19 reporting and assessment system.
Stars: ✭ 14 (+0%)
Mutual labels:  coronavirus, covid-19
covid-19-status
Menu bar widget for MacOS with COVID-19 statistics
Stars: ✭ 50 (+257.14%)
Mutual labels:  coronavirus, covid-19
COVID-19-Greece
A python-generated website for visualizing the novel coronavirus (COVID-19) data for Greece.
Stars: ✭ 21 (+50%)
Mutual labels:  coronavirus, covid-19
Bluetooth-ble-beamer-and-scanner-for-tracing-corona-virus-infected-individual
Bluetooth ble beacon beamer and scanner for tracing corona virus infected person similar to Trace Together app
Stars: ✭ 26 (+85.71%)
Mutual labels:  coronavirus, covid-19
covid19
Visualize and compare COVID 19 growth rates of different countries
Stars: ✭ 22 (+57.14%)
Mutual labels:  coronavirus, covid-19
COVID-19-STAT
A web application to keep track of COVID-19 numbers & growth across the world
Stars: ✭ 19 (+35.71%)
Mutual labels:  coronavirus, covid-19
rid-covid
Image-based COVID-19 diagnosis. Links to software, data, and other resources.
Stars: ✭ 74 (+428.57%)
Mutual labels:  coronavirus, covid-19
AnomalyDetect
Detects anomalous resting heart rate from smartwatch data.
Stars: ✭ 18 (+28.57%)
Mutual labels:  coronavirus, covid-19

Twitter Digest ✉️

twitter email digest gif

A netlify lambda function to send you email digests of twitter lists.

I decided to create twitter digest to help me spend less time on social media. Particulary during the COVID-19 global pandemic.

It is completely free to run.

Code Tutorial: https://tobenxe.com/building-a-netlify-lambda-function-to-turn-twitter-lists-into-email-digests/

Requirements

  • A netlify account
  • A sendgrid account + API key
  • A twitter API key & API secret
  • Some cron service to schedule the email. (https://cron-job.org/, https://easycron.com are some options if you don't have something already)
  • An email [o_o]

Usage

1) Deploy to Netlify

2) Fill in environment variables:

During the initial site setup at step 3 you should be able to set environment variables by clicking "show advanced" > "new variable".

Basic Authorization:
Name:       Value:
AUTH_USER   <some made up but secure username>
AUTH_PASS   <some made up but secure password>

This helps provide some protection to the endpoint so only your cron job can access the function. The function checks for an authorization header in requests, it will use AUTH_USER and AUTH_PASS to work out what the appropriate header value a legitimate request would have.

NOTE: This does not have to be your twitter user name or password, it is probably best if it isn't.

Learn more about HTTP basic auth here.

Twitter Authentication
Name:           Value:
TWITTER_KEY     <twitter api key>
TWITTER_SECRET  <twitter api secret>

The function uses app only auth. You'll need a twitter developer account to get these.

Twitter List ID
Name:            Value:
TWITTER_LIST_ID  <twitter list id>

If you look in the address bar when you are on your list: eg. https://twitter.com/i/lists/1245290837988315136

The TWITTER_LIST_ID will be 1245290837988315136

Email
Name:      Value:
MY_EMAIL   <youremail>@<mailprovider>.<tld>

The email you'd like the digest to be sent to, for example [email protected]

NOTE: When you get the first email, you may have to check your spam folder initially and mark the email as "not spam"

Sendgrid Authentication
Name:          Value:
SENDGRID_KEY   <sendgrid api key>

Your API key from sendgrid. You can find a tutorial on how to get this here

3) Schedule request to the function

You can use any cron job service that allows HTTP basic authentication (most of them do). In the tutorial I used https://cron-job.org. You should specify a user and a password (should be the same as AUTH_USER and AUTH_PASS) to enable HTTP basic auth.

If you are using some other method (maybe your own server/machine) to schedule the request, you need to set the Authorization header (remember to encode your 'user:password' string after 'Basic ' to base64!).

Local Development

Create a .env file in the root of the directory to store the environment variables. Create a webpack.functions.js like the one here Run the following commands

npm install
npm run start:lambda //to test locally

Possible Todos/Ideas (contribution ideas):

  • Add a since_id prop to the twitter API call in order to avoid getting duplicate tweets (would need some persistence of the id for the last fetched tweet, preferably free).
  • Make the html email look nicer ? (looks simple enough already but maybe it could look better).
  • Swap out sendgrid API for just smtp with nodemailer (or an alternative).
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].