Skip to content
This repository has been archived by the owner on Jun 1, 2024. It is now read-only.

Google Cloud Function that receives a date from a web scraper on US Gov Travel Covid-19 restrictions page and notifies a list of email subscribers should the site has been updated recently

License

Notifications You must be signed in to change notification settings

gonzalofh/travelban-notification-gcloud-function

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description

Google Cloud Function that receives a date from a web scraper on US Gov Travel Covid-19 restrictions page and notifies a list of email subscribers should the site has been updated recently

User story

Given the US Gov Travel Covid-19 restrictions page:

us-gov-travel-covid-19

Let's say, yesterday, the Last updated date was June 23, 2021. And that's the date we have in our DataStore.

But today, the cron job runs again, triggers the web scraper, and returns a new date: June 24, 2021.

In this case, the whole list of people that have subscribed to this point, will receive an email like the following:

email-screenshot

Environmental variables

  • SENDGRID_EMAIL_API_KEY = (sendgrid API key, must be obtained from Sendgrid's website)
  • TRAVEL_SITE_URL = (link to US Gov Travel Covid 19 Restrictions page)
  • SENDER = (email account from which the subscribers will be notified)

Related repositories

Tools used

About

Google Cloud Function that receives a date from a web scraper on US Gov Travel Covid-19 restrictions page and notifies a list of email subscribers should the site has been updated recently

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages