I live in Contra Costa County in the San Francisco Bay Area. The county has setup a web site with Covid-19 information for its residents. The main page shows key Covid-19 data updated daily. I have been visiting this page almost daily. This is how it looks for Friday, June 19, 2020:
I wanted to build an application that would email me this data every day. To continue my no-code journey I built a no-code application that sends me a daily email with the latest data. I didn’t need to write a single line of code!
These are the tools I used to build the application:
- Simplescraper – to scrap data from the county web site and turn it into an API
- Parabola – build a flow to invoke the API and send the email
This is how the application flow looks in Parabola:
Let’s review the application flow.
API Import step
The API Import step allows to invoke any external API. In this application I invoke an API for a custom scraper I built to scrape the county web site for latest Covid-19 data. Simplescraper is an easy-to-use tool that allows to scrape a web site and create an API for it.
This is how the JSON response from the API looks:
[{ "current\_hospital": "26", "index": 1, "total\_cases": "2,111", "total\_deaths": "55", "total\_tested": "53,049", "url": "https://www.coronavirus.cchealth.org/", "url\_uid": 1 }]
Now invoking Simplescraper API in the API Import step:
We are almost ready to send the email. Before we do that we only need to add the email address.
Add Columns step
In this step a new column is added with the email address where to send the email.
Next step is sending the email.
Send Emails step
In the last step I’m using Parabola built-in Send Emails step to send the email, creating the email message using data from the API response:
You can test any flow right away. You can also schedule a flow to run periodically.
Scheduling
I scheduled this flow to run once a day (weekdays) at 12pm PT:
I get an email that loos like this:
Summary
It’s incredible how fast you can build this application using no-code tools. My next step is to create a video that shows how to build this application. I also want to modify the application to include data from the previous day to get a better idea which direction the numbers are changing.
I did have to spend a little extra time learning how to use Simplescraper. It’s mostly due to the county web site not having a good structure. I had to set CSS selectors manually for Simplescraper. In general you can just click on an element on a page and Simplescraper picks it up automatically. This approach also worked but required a few extra steps in Parabola (the API response had to be cleaned and formatted). I reached out to Simplescraper support (which is great!) and they helped me setup a more elegant scraper using CSS selectors.
Top comments (0)