<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Akshay090</title>
    <description>The latest articles on DEV Community by Akshay090 (@akshay090).</description>
    <link>https://dev.to/akshay090</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F107906%2F551cda45-1e5a-48cf-9032-8f797abef2f5.png</url>
      <title>DEV Community: Akshay090</title>
      <link>https://dev.to/akshay090</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/akshay090"/>
    <language>en</language>
    <item>
      <title>Things I learned while building my side project</title>
      <dc:creator>Akshay090</dc:creator>
      <pubDate>Sun, 05 Jul 2020 19:25:15 +0000</pubDate>
      <link>https://dev.to/akshay090/things-i-learned-while-building-my-side-project-3nil</link>
      <guid>https://dev.to/akshay090/things-i-learned-while-building-my-side-project-3nil</guid>
      <description>&lt;p&gt;&lt;strong&gt;TLDR :&lt;/strong&gt; I build this project called gitify, by which you can interact with Git from browser extension. Check it out and give it a ⭐ if you like it.&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vJ70wriM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/github-logo-ba8488d21cd8ee1fee097b8410db9deaa41d0ca30b004c0c63de0a479114156f.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/Akshay090"&gt;
        Akshay090
      &lt;/a&gt; / &lt;a href="https://github.com/Akshay090/gitify"&gt;
        gitify
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Interact with Git from browser extension.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;h1&gt;
🚀 Gitify&lt;/h1&gt;
&lt;p&gt;Interact with Git from browser extension.&lt;/p&gt;
&lt;h3&gt;
🙋‍♂️ Made by &lt;a href="https://twitter.com/aks2899" rel="nofollow"&gt;@Akshay090&lt;/a&gt;
&lt;/h3&gt;

&lt;h2&gt;
🌟 Features&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Gitify makes working with Git fast ⚡ and easy.&lt;/li&gt;
&lt;li&gt;Execute basic git commands from browser extension.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
🤔 How it works&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;The browser extension interacts with a &lt;a href="https://github.com/Akshay090/gitifyServer"&gt;server&lt;/a&gt; running locally to execute git commands for you.&lt;/li&gt;
&lt;li&gt;The &lt;a href="https://github.com/Akshay090/gitifyServer"&gt;gitifyServer&lt;/a&gt; works only on windows currently.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
Browser Support&lt;/h2&gt;
&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;a href="https://raw.githubusercontent.com/Akshay090/gitify/master//"&gt;&lt;img src="https://camo.githubusercontent.com/26846e979600799e9f4273d38bd9e5cb7bb8d6d0/68747470733a2f2f7261772e6769746875622e636f6d2f616c7272612f62726f777365722d6c6f676f732f6d61737465722f7372632f6368726f6d652f6368726f6d655f34387834382e706e67" alt="Chrome"&gt;&lt;/a&gt;&lt;/th&gt;
&lt;th&gt;&lt;a href="https://raw.githubusercontent.com/Akshay090/gitify/master//"&gt;&lt;img src="https://camo.githubusercontent.com/6087557f69ec6585eb7f8d7bd7d9ecb6b7f51ba1/68747470733a2f2f7261772e6769746875622e636f6d2f616c7272612f62726f777365722d6c6f676f732f6d61737465722f7372632f66697265666f782f66697265666f785f34387834382e706e67" alt="Firefox"&gt;&lt;/a&gt;&lt;/th&gt;
&lt;th&gt;&lt;a href="https://raw.githubusercontent.com/Akshay090/gitify/master//"&gt;&lt;img src="https://camo.githubusercontent.com/96d2405a936da1fb8988db0c1d304d3db04b8a52/68747470733a2f2f7261772e6769746875622e636f6d2f616c7272612f62726f777365722d6c6f676f732f6d61737465722f7372632f6f706572612f6f706572615f34387834382e706e67" alt="Opera"&gt;&lt;/a&gt;&lt;/th&gt;
&lt;th&gt;&lt;a href="https://raw.githubusercontent.com/Akshay090/gitify/master//"&gt;&lt;img src="https://camo.githubusercontent.com/826b3030243b09465bf14cf420704344f5eee991/68747470733a2f2f7261772e6769746875622e636f6d2f616c7272612f62726f777365722d6c6f676f732f6d61737465722f7372632f656467652f656467655f34387834382e706e67" alt="Edge"&gt;&lt;/a&gt;&lt;/th&gt;
&lt;th&gt;&lt;a href="https://raw.githubusercontent.com/Akshay090/gitify/master//"&gt;&lt;img src="https://camo.githubusercontent.com/0ce36027011ed5c3eb5d92484af3151f60550f44/68747470733a2f2f7261772e6769746875622e636f6d2f616c7272612f62726f777365722d6c6f676f732f6d61737465722f7372632f79616e6465782f79616e6465785f34387834382e706e67" alt="Yandex"&gt;&lt;/a&gt;&lt;/th&gt;
&lt;th&gt;&lt;a href="https://raw.githubusercontent.com/Akshay090/gitify/master//"&gt;&lt;img src="https://camo.githubusercontent.com/c75915168a72f40ef5607e57ae4ea18919a7cdea/68747470733a2f2f7261772e6769746875622e636f6d2f616c7272612f62726f777365722d6c6f676f732f6d61737465722f7372632f62726176652f62726176655f34387834382e706e67" alt="Brave"&gt;&lt;/a&gt;&lt;/th&gt;
&lt;th&gt;&lt;a href="https://raw.githubusercontent.com/Akshay090/gitify/master//"&gt;&lt;img src="https://camo.githubusercontent.com/66390bddd9d98d513e0dd9ebd75acb61d23a9997/68747470733a2f2f7261772e6769746875622e636f6d2f616c7272612f62726f777365722d6c6f676f732f6d61737465722f7372632f766976616c64692f766976616c64695f34387834382e706e67" alt="vivaldi"&gt;&lt;/a&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;49 &amp;amp; later ✔
&lt;/td&gt;
&lt;td&gt;52 &amp;amp; later ✔
&lt;/td&gt;
&lt;td&gt;36 &amp;amp; later ✔
&lt;/td&gt;
&lt;td&gt;79 &amp;amp; later ✔
&lt;/td&gt;
&lt;td&gt;Latest ✔
&lt;/td&gt;
&lt;td&gt;Latest ✔
&lt;/td&gt;
&lt;td&gt;Latest ✔
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;h2&gt;
📽 Demo&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://player.vimeo.com/video/435355152" title="Gitify Demo" rel="nofollow"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--XJW-pJHU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/Akshay090/gitify/master/.github/images/demo.jpg" alt="Gitify Demo"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
🚀 Get Started&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Download extension for your browsere&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Download it from &lt;a href="https://github.com/Akshay090/gitify/releases"&gt;release page.&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Load extension in browser&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;h3&gt;
Chrome&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Go to the browser address bar and type &lt;code&gt;chrome://extensions&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Check the &lt;code&gt;Developer Mode&lt;/code&gt; button to enable it.&lt;/li&gt;
&lt;li&gt;Click on the &lt;code&gt;Load Unpacked Extension…&lt;/code&gt; button.&lt;/li&gt;
&lt;li&gt;Select directory chrome.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;h3&gt;
Firefox&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Load the Add-on via &lt;code&gt;about:debugging&lt;/code&gt; as temporary Add-on.&lt;/li&gt;
&lt;li&gt;Choose the &lt;code&gt;manifest.json&lt;/code&gt; file in the directory&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;h3&gt;
Opera&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Load the extension via &lt;code&gt;opera:extensions&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Check…&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/Akshay090/gitify"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;Few months back I had discussed this idea of a browser extension with my friends from which I could clone and open a GitHub repository in VsCode instantly, as I like to check out projects form GitHub and it would be cool to interact with Git from browser.&lt;/p&gt;

&lt;p&gt;Then after procrastination for months I decided to work on this, coincidentally there was also an &lt;a href="https://github.com/Akshay090/gitify"&gt;online hackathon&lt;/a&gt; that weekend by MLH. Trust me if it wasn't for the hackathon I doubt if I would have ever started this project. That feeling to make a MVP in limited time is truly something. &lt;/p&gt;

&lt;p&gt;I started out by listing the basic features I needed to implement : Git Clone, Open in VsCode. Hmm.. why not add Git Push and Pull, this covers most of the Git commands I use.&lt;/p&gt;

&lt;p&gt;A browser extension alone can't communicate with Git, I also had to implement a server, this would run on the user system.&lt;/p&gt;

&lt;h2&gt;
  
  
  Building Browser Extension
&lt;/h2&gt;

&lt;p&gt;The GitHub UI has changed recently. So I decided to not to go with the approach of injecting buttons into page and keep everything in browser extension Popup.&lt;/p&gt;

&lt;p&gt;I decided to go with this starter repo : &lt;a href="https://github.com/abhijithvijayan/web-extension-starter"&gt;web-extension-starter&lt;/a&gt;, this is a really good starter project for building cross browser extension. I starter working with the react-typescript setup in it.&lt;/p&gt;

&lt;p&gt;I was fairly new to both TypeScript and React Hooks, working with them was a really good learning experience. TypeScript can be annoying but trust me it's really worth it.&lt;/p&gt;

&lt;p&gt;The most helpful and annoying tool was eslint. If it wasn't for eslint my Hooks code would have looked completely different. In the begining I would frequently use&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;// eslint-disable-next-line react-hooks/exhaustive-deps&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;I took some time to understand React Hooks, read this article by &lt;a href="https://overreacted.io/a-complete-guide-to-useeffect/"&gt;Dan Abramov&lt;/a&gt;, tried to solve the bugs where the Effect would fire multiple times and finally managed to work without using the exhaustive-deps. &lt;/p&gt;

&lt;p&gt;React Hooks are really easy to understand but difficult to master. They feel like black magic sometimes. I had to use this &lt;a href="https://github.com/Akshay090/gitify/blob/fd3285391da652b5ad1ebaa1d05fa0986cef29f0/source/utils/index.ts#L95"&gt;useEffectDebugger&lt;/a&gt; to figure out some bugs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Building the Server
&lt;/h2&gt;

&lt;p&gt;Recently I started learning Golang, totally on a whim as I saw it on Coursera. I made some notes on it too, you can &lt;a href="https://github.com/Akshay090/golang-notes"&gt;find it here&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;So as you have guessed, I decided to write the server in Golang, as Golang generates binary it would be easy to distribute and install. &lt;/p&gt;

&lt;p&gt;I used this &lt;a href="https://github.com/enricofoltran/simple-go-server"&gt;simple-go-server&lt;/a&gt; as a starter. Initially I used to perform the git operation using &lt;a href="https://github.com/go-git/go-git"&gt;go-git&lt;/a&gt; which is A Git implementation in pure Go, but later on I switched to os/exec.&lt;/p&gt;

&lt;p&gt;To make it easy to use for others I had to convert this server code to something which can run in background so that it won't be too annoying. I came accross this project : &lt;a href="https://github.com/kardianos/service"&gt;kardianos/service&lt;/a&gt;. I tried out the example code and it worked perfectly in my system, but apparently I didn't know how to convert my server code to a system service, as there were no proper blog post on how to use it, with windows in particular.While researching I made &lt;a href="https://gist.github.com/Akshay090/d4f2e0f91a99b516d9d638a1e1a60a0d"&gt;this gist&lt;/a&gt; of projects which use kardianos/service. &lt;/p&gt;

&lt;p&gt;I decided to switch to other options, like system tray.&lt;br&gt;
To implement the System tray I choose &lt;a href="https://github.com/cratonica/trayhost"&gt;trayhost&lt;/a&gt;, as I found it comparatively faster than the alternative &lt;a href="https://github.com/getlantern/systray"&gt;systray&lt;/a&gt;. Then I added an icon to the generated exe by refering &lt;a href="https://gitlab.com/gozoo/rc-demo"&gt;this repo&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I used &lt;a href="https://gopherize.me/"&gt;gopherize.me&lt;/a&gt; to generate the logo/icon, you should definitely check it out.&lt;/p&gt;

&lt;h2&gt;
  
  
  Releasing with GitHub actions.
&lt;/h2&gt;

&lt;p&gt;I used &lt;a href="https://github.com/anton-yurchenko/git-release"&gt;anton-yurchenko/git-release&lt;/a&gt; to Publish a GitHub Release, it publishes assets and works along with a Changelog.md file making the relases descriptive.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://github.com/Akshay090/gitifyServer"&gt;gitifyServer&lt;/a&gt; runs the GitHub action in a windows runner and the one in &lt;a href="https://github.com/Akshay090/gitify"&gt;gitify&lt;/a&gt; repo runs in ubuntu runner.&lt;/p&gt;

&lt;p&gt;This project was really fun to build, it currently works on windows only as I don't have either mac or linux to test on them. If you would like to add support it would be really appreciated.  &lt;/p&gt;

</description>
      <category>showdev</category>
      <category>github</category>
      <category>extension</category>
      <category>githunt</category>
    </item>
    <item>
      <title>Here's how I made a CLI tool to work with Google Colab notebooks.</title>
      <dc:creator>Akshay090</dc:creator>
      <pubDate>Wed, 08 Apr 2020 21:21:16 +0000</pubDate>
      <link>https://dev.to/akshay090/here-s-how-i-made-a-cli-tool-to-work-with-ipynb-and-google-colab-12jm</link>
      <guid>https://dev.to/akshay090/here-s-how-i-made-a-cli-tool-to-work-with-ipynb-and-google-colab-12jm</guid>
      <description>&lt;h2&gt;
  
  
  What I built
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/Akshay090/colab-cli" rel="noopener noreferrer"&gt;colab-cli&lt;/a&gt; : a cli tool to automate workflow of google colab, create, download or add notebooks to google colab and organize them in google drive from cli.&lt;/p&gt;

&lt;h2&gt;
  
  
  How I built it
&lt;/h2&gt;

&lt;p&gt;Hi, I recently started learning deep learning and google colab was my go-to place to try out all those notebooks's. I didn't like the entire UX of opening the projects from GitHub repos, saving to drive and then creating folders in the drive to organize all those notebooks's. &lt;/p&gt;

&lt;p&gt;These were not the only problem if I had to commit my current version of the repo I had only one option to save a copy of GitHub, no option for GitLab or other services. &lt;/p&gt;

&lt;p&gt;So the solution I came up to solve all those issues is &lt;a href="https://github.com/Akshay090/colab-cli" rel="noopener noreferrer"&gt;colab-cli&lt;/a&gt;, with this tool I could easily open any notebook in google colab from my terminal with command &lt;code&gt;colab-cli open-nb filename.ipynb&lt;/code&gt;. &lt;/p&gt;

&lt;p&gt;This tool work by uploading the notebook to google drive with the same file structure as in the local git repo.&lt;/p&gt;

&lt;p&gt;When I'm done with my work in google colab I use &lt;code&gt;colab-cli pull-nb filename.ipynb&lt;/code&gt; in terminal to get all those changes locally. Now I'm free to git commit it and push it to anywhere.&lt;/p&gt;

&lt;p&gt;If I make some changes to the notebooks locally and then again want to get back to colab with the modified file it's as easy as &lt;code&gt;colab-cli push-nb filename.ipynb&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;And when I'm starting out with a project from scratch, I begin by initializing git repo in it with &lt;code&gt;git init&lt;/code&gt; as it's necessary. Then I can make a new ipynb by using &lt;code&gt;colab-cli new-nb my_nb.ipynb&lt;/code&gt;. This command creates a new notebook file both locally and in gdrive, also open's it in colab to start working.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://asciinema.org/a/314749?autoplay=1" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fasciinema.org%2Fa%2F314749.svg" alt="demo"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Link to Code
&lt;/h2&gt;

&lt;p&gt;The complete project is opensource and you can find it at &lt;a href="https://github.com/Akshay090/colab-cli" rel="noopener noreferrer"&gt;https://github.com/Akshay090/colab-cli&lt;/a&gt;&lt;br&gt;
Instructions to get started are in the readme.md&lt;/p&gt;

&lt;h2&gt;
  
  
  What's the stack? did I run into issues or discover something new along the way?
&lt;/h2&gt;

&lt;p&gt;It's written in python. I used &lt;a href="https://typer.tiangolo.com/" rel="noopener noreferrer"&gt;Typer&lt;/a&gt; to make this CLI tool. Typer has really good tutorials and documentation to get started. The part of dealing with google drive API is handled by &lt;a href="https://pythonhosted.org/PyDrive/quickstart.html" rel="noopener noreferrer"&gt;PyDrive&lt;/a&gt;. The packaging part is managed easily due to &lt;a href="https://python-poetry.org/" rel="noopener noreferrer"&gt;Poetry&lt;/a&gt;.   &lt;/p&gt;

&lt;p&gt;The main time-consuming part was writing this &lt;a href="https://github.com/Akshay090/colab-cli/blob/master/colab_cli/utilities" rel="noopener noreferrer"&gt;utilities&lt;/a&gt; to deal with folder and file creation and deletion. &lt;/p&gt;

&lt;p&gt;I also use &lt;a href="https://gitpython.readthedocs.io/en/stable/" rel="noopener noreferrer"&gt;gitpython&lt;/a&gt; to get the git root of the current directory, but later I removed it after moving files from it which I needed, as it had various other dependencies, which increased my package installation time.&lt;/p&gt;

&lt;p&gt;Some interesting things I learned from this project&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;folders are actually files with some metadata. &lt;/li&gt;
&lt;li&gt;To create a new colab notebook from API I had to know the mime type of google colab notebooks, which was apparently not documented anywhere like the &lt;a href="https://developers.google.com/drive/api/v3/mime-types" rel="noopener noreferrer"&gt;official google drive API page&lt;/a&gt; to get this mime type I searched across all the API request that google drive made to find that the mime type of google colab notebooks is: &lt;code&gt;application/vnd.google.colaboratory&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This was a really interesting weekend project. I would really appreciate if you try it and give your feedback or help improve it further. &lt;/p&gt;

&lt;h2&gt;
  
  
  Additional Resources/Info
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Typer Tutorial : &lt;a href="https://typer.tiangolo.com/tutorial/" rel="noopener noreferrer"&gt;https://typer.tiangolo.com/tutorial/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Building package with Poetry : &lt;a href="https://typer.tiangolo.com/tutorial/package/" rel="noopener noreferrer"&gt;https://typer.tiangolo.com/tutorial/package/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Post image source : &lt;a href="https://unsplash.com/photos/4SHxst61_Sg" rel="noopener noreferrer"&gt;https://unsplash.com/photos/4SHxst61_Sg&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>programming</category>
      <category>beginners</category>
      <category>python</category>
      <category>showdev</category>
    </item>
    <item>
      <title>Break the chain: SMS chatbot for awareness in times of COVID-19</title>
      <dc:creator>Akshay090</dc:creator>
      <pubDate>Sun, 05 Apr 2020 20:11:43 +0000</pubDate>
      <link>https://dev.to/akshay090/break-the-chain-sms-chatbot-for-awareness-in-times-of-covid-19-2e5p</link>
      <guid>https://dev.to/akshay090/break-the-chain-sms-chatbot-for-awareness-in-times-of-covid-19-2e5p</guid>
      <description>&lt;h2&gt;
  
  
  What I built
&lt;/h2&gt;

&lt;p&gt;Hi, I have built an SMS chatbot using Twilio, which helps the user to track COVID-19 cases across different states of India, get COVID-19 news and answers some questions on COVID-19.&lt;/p&gt;

&lt;p&gt;The main idea of this project is to spread awareness regarding COVID-19 to a large number of people. So I decided to use Twilio SMS service for this project as an SMS facility is available to almost all mobile phones, this helps the information to reach people who don't use smartphones or computers.&lt;/p&gt;

&lt;p&gt;I named this project break-the-chain as public awareness is one of the major factors in the fight against COVID-19. People should stay alert regarding the disease spread and take precautions like social distancing to stop the spread of COVID-19 aka. break-the-chain of COVID-19.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--W-yykZRk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://raw.githubusercontent.com/Akshay090/break-the-chain/master/demo.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--W-yykZRk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://raw.githubusercontent.com/Akshay090/break-the-chain/master/demo.gif" alt="Demo Gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Link to Code
&lt;/h2&gt;

&lt;p&gt;The complete project is opensource and you can find it at &lt;a href="https://github.com/Akshay090/break-the-chain"&gt;https://github.com/Akshay090/break-the-chain&lt;/a&gt;&lt;br&gt;
Instructions to run project is in readme.&lt;/p&gt;

&lt;h2&gt;
  
  
  How I built it (what's the stack? did I run into issues or discover something new along the way?)
&lt;/h2&gt;

&lt;p&gt;I initially went to &lt;a href="https://www.twilio.com/code-exchange"&gt;twilio.com/code-exchange&lt;/a&gt; and searched for the chatbot, it showed me &lt;a href="https://www.twilio.com/code-exchange/sms-support-chatbot-using-autopilot"&gt;this project&lt;/a&gt;, I spent an hour with it trying to understand what it does, this project uses autopilot service of Twilio to apply NLP on SMS and calls actions bases on it. It felt too overwhelming for the basic idea I had. I learned a lot about express and pug from it.  &lt;/p&gt;

&lt;p&gt;So finally I decided to leave that project aside. I started working with flask as mentioned in &lt;a href="https://www.twilio.com/blog/build-a-sms-chatbot-with-python-flask-and-twilio"&gt;this blog post&lt;/a&gt; and &lt;a href="https://www.twilio.com/blog/build-a-whatsapp-chatbot-with-python-flask-and-twilio"&gt;also referred this post&lt;/a&gt; to send and receive messages through WhatsApp, as SMS rates to an international number(bought in Twilio) cost 5 ₹ each. I upgraded the base project as per my requirements.&lt;/p&gt;

&lt;p&gt;I looked across various public APIs for COVID-19 and realized I had to do web scraping to get details of COVID-19 cases of each state in India, as I didn't find any suitable working API for it.&lt;/p&gt;

&lt;p&gt;The scraping is done on &lt;a href="https://www.mohfw.gov.in/"&gt;https://www.mohfw.gov.in/&lt;/a&gt; through a flask script and data is stored in SQLite DB. There is also a flask script to get news from newsapi.org and store it in DB. After these two process, the user can interact with the bot from the preferred channel.&lt;/p&gt;

&lt;p&gt;The latest addition I made to this project is a library called &lt;a href="https://chatterbot.readthedocs.io/en/stable/"&gt;chatterbot&lt;/a&gt; it enables the bot to make small talks with a user with just 2 lines of code. This library was mentioned at the end of the second blog post mentioned above, else I would have missed it, 😅 thanks Twilio.&lt;/p&gt;

&lt;p&gt;The project is a flask app, it uses:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;SQLite database &lt;/li&gt;
&lt;li&gt;sqlAlchemy for dealing with database &lt;/li&gt;
&lt;li&gt;marshmallow for (de)serialization &lt;/li&gt;
&lt;li&gt;Twilio python library &lt;/li&gt;
&lt;li&gt;beautifulsoup4 for web scraping&lt;/li&gt;
&lt;li&gt;newsapi.org python client&lt;/li&gt;
&lt;li&gt;chatterbot for fallback small talks&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Categories of project
&lt;/h2&gt;

&lt;p&gt;This project falls into two categories&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;COVID-19 Communications: an app to help folks communicate during this challenging time, either to stay connected or to help resolve COVID-19 related challenges.&lt;/li&gt;
&lt;li&gt;Interesting Integrations: an app that integrates Twilio with at least one other API.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Additional Resources/Info
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Learn Flask : &lt;a href="https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-i-hello-world"&gt;https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-i-hello-world&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Automated responce to user Input : &lt;a href="https://chatterbot.readthedocs.io/en/stable/"&gt;https://chatterbot.readthedocs.io/en/stable/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.twilio.com/blog/build-a-sms-chatbot-with-python-flask-and-twilio"&gt;https://www.twilio.com/blog/build-a-sms-chatbot-with-python-flask-and-twilio&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.twilio.com/blog/build-a-whatsapp-chatbot-with-python-flask-and-twilio"&gt;https://www.twilio.com/blog/build-a-whatsapp-chatbot-with-python-flask-and-twilio&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>twiliohackathon</category>
      <category>opensource</category>
      <category>python</category>
      <category>flask</category>
    </item>
    <item>
      <title>How to build formiQR - leverage google form with help of firebase cloud function to be a complete event management platform</title>
      <dc:creator>Akshay090</dc:creator>
      <pubDate>Tue, 23 Apr 2019 14:11:29 +0000</pubDate>
      <link>https://dev.to/akshay090/how-to-build-formiqr-2798</link>
      <guid>https://dev.to/akshay090/how-to-build-formiqr-2798</guid>
      <description>&lt;p&gt;In this post I would go through what is formiQR and how to build formiQR.&lt;/p&gt;

&lt;p&gt;First of all what is formiQR and what problem it solves ?&lt;/p&gt;

&lt;p&gt;formiQR aims to leverages google form with help of firebase cloud function to be a complete event management platform. &lt;/p&gt;

&lt;p&gt;Initially I developed formiQR to help out a friend with an event, named MakerFest Vadodara. They needed a system, in which a user fills in the google form and then receive a personalized QR code, which they can scan at the event to conform their presence and also get other statistical data like how many people are present in the event, what age group they are, gender, etc.  &lt;/p&gt;

&lt;p&gt;Now,after successfully completing this project, I thought of organizing all the code and making a proper repo, as this might be helpful to someone.&lt;/p&gt;

&lt;p&gt;So the proper git repo of the end product is at &lt;a href="https://github.com/Club-DevBytes/formiQR"&gt;Club-DevBytes/formiQR&lt;/a&gt; and this is the blog post explaining it step by step.&lt;/p&gt;

&lt;p&gt;I plan to break down this into 4 parts:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Sending data filled in google form to firebase and using triggers in google sheets&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/akshay090/sending-personalized-email-from-cloud-function-50al"&gt;Sending personalized email from cloud function&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/akshay090/a-cloud-function-to-implement-a-counter-4i24"&gt;A cloud function to implement a counter&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/akshay090/android-app-to-scan-qr-and-update-data-in-firebase-and-display-it-18dd"&gt;Android app to scan QR and update data in firebase and display it&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  So lets begin with Part 1 :-)
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Sending data filled in google form to firebase and using triggers in google sheets
&lt;/h2&gt;

&lt;p&gt;We need to send the data in the google sheet linked to our google form to Firebase, for this we would be using Google Apps Script, which is a scripting language for light-weight application development in the G Suite platform.&lt;/p&gt;

&lt;p&gt;To do that lets switch to the Tools &amp;gt; Script editor in the top bar&lt;/p&gt;

&lt;p&gt;Then you need to add the following code in the Code.gs&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;p&gt;The important details which need to be added in above code are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;FirebaseUrl and database secret, we will get it in next part&lt;/li&gt;
&lt;li&gt;Your spreadsheet ID, which can be found in the url of the spreadsheet, as &lt;a href="https://docs.google.com/spreadsheets/d/your-spreadsheetID/edit"&gt;https://docs.google.com/spreadsheets/d/your-spreadsheetID/edit&lt;/a&gt;, you need to place this in the openById part of code.&lt;/li&gt;
&lt;li&gt;Adding the Firebase App Library to send the data to firebase, for this go to Resources &amp;gt; Libraries &amp;gt; paste MYeP8ZEEt1ylVDxS7uyg9plDOcoke7-2l in add library and add it. Select version 30 and you are done.&lt;/li&gt;
&lt;li&gt;The dataToImport json object, contains the are the coloums in spread sheet which you really care, with the column header, you can select a particular column form it no as in data[i][1] and so on.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now lets create a firebase project, so lets go to &lt;a href="https://console.firebase.google.com"&gt;https://console.firebase.google.com&lt;/a&gt; and add project with an appropriate name.&lt;br&gt;
Now click Database in the side Nav bar, and scroll down to Realtime Database and click create database(for now select test mode). &lt;/p&gt;

&lt;p&gt;Now you can get your Firebase url form the page, &lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--UuOI0AYf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.stack.imgur.com/IOYS8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--UuOI0AYf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.stack.imgur.com/IOYS8.png" alt="firebase url image, if broken then inform me"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Finally the last part, the database secret, for that &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;click on the settings/cog wheel icon next to your project name at the top of the new Firebase Console&lt;/li&gt;
&lt;li&gt;Click Project settings&lt;/li&gt;
&lt;li&gt;Click on the Service Accounts tab&lt;/li&gt;
&lt;li&gt;Click on Database Secrets&lt;/li&gt;
&lt;li&gt;Hover over the non-displayed secret and click Show&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Paste FirebaseUrl and database secret in the appropriate place in the code.gs and save it.&lt;/p&gt;

&lt;p&gt;Try to run the addNewData function by selecting in the&lt;br&gt;
&lt;br&gt;
 &lt;code&gt;Select function&lt;/code&gt;&lt;br&gt;
&lt;br&gt;
 and click the Run button beside it.&lt;br&gt;
Have a look at firebase Realtime Database and all those data should be there.&lt;/p&gt;

&lt;h2&gt;
  
  
  Adding trigger to google sheets
&lt;/h2&gt;

&lt;p&gt;Now we need a method where this function should run automatically on form submit.&lt;br&gt;
That's where Triggers come handy, to set a trigger onSubmit follow the steps,&lt;br&gt;
In the Script Editor:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Choose Edit &amp;gt; Current project's triggers. You see a panel with the message No triggers set up. Click here to add one now.&lt;/li&gt;
&lt;li&gt;Click the link.
Under Run, select the addNewData function which we want to be executed by the trigger. (That's onFormSubmit(), in this case.)
Under Events, select From Spreadsheet.&lt;/li&gt;
&lt;li&gt;From the next drop-down list, select On form submit.
Click Save.&lt;/li&gt;
&lt;li&gt;From this point on, the function will be triggered whenever a form is submitted to the spreadsheet.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you plan to share your script, each recipient will need to repeat these steps.&lt;/p&gt;

&lt;p&gt;Finally this is complete, now your data would be added to firebase on form submission.&lt;/p&gt;

&lt;p&gt;You can even add a SYNC button in your google sheets to run addNewData function &lt;a href="https://stackoverflow.com/a/6966272"&gt;refer this link&lt;/a&gt;. This might come handy when you manually enter data to sheets, or need to sync data to firebase, when you delete it there, during the testing phase. &lt;/p&gt;

&lt;p&gt;See you in &lt;a href="https://dev.to/akshay090/sending-personalized-email-from-cloud-function-50al"&gt;Part 2&lt;/a&gt; where we will be discussing Sending personalized email from cloud function.&lt;/p&gt;

</description>
      <category>email</category>
      <category>firebase</category>
      <category>cloudfunctions</category>
    </item>
    <item>
      <title>A cloud function to implement a counter</title>
      <dc:creator>Akshay090</dc:creator>
      <pubDate>Tue, 23 Apr 2019 14:10:44 +0000</pubDate>
      <link>https://dev.to/akshay090/a-cloud-function-to-implement-a-counter-4i24</link>
      <guid>https://dev.to/akshay090/a-cloud-function-to-implement-a-counter-4i24</guid>
      <description>&lt;p&gt;To add the counter we need to append the following code in the index.js, which we created in Part-2 post, please refer it before proceeding.&lt;/p&gt;

&lt;p&gt;Code to implement the counter &lt;/p&gt;
&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;p&gt;We would be creating the atEvent node in the next blog, where it would be generated when we scan the QR with the android app.&lt;/p&gt;

&lt;p&gt;To understand the path and the code in above gist, have a look at the Realtime database.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--9M_VfrgC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/mkw6ykisl8ojkdneydh2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--9M_VfrgC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/mkw6ykisl8ojkdneydh2.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Understanding how to get this done took an effort, so if you don't get it they feel free to ask me in comments. This code is just of few lines, but it did it job perfectly to give me a bad time 😰&lt;/p&gt;

&lt;p&gt;No lets us move to the next and the last part of this series &lt;a href="https://dev.to/akshay090/android-app-to-scan-qr-and-update-data-in-firebase-and-display-it-18dd"&gt;here&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>cloudfunction</category>
      <category>counter</category>
    </item>
    <item>
      <title>Android app to scan QR and update data in firebase and display it</title>
      <dc:creator>Akshay090</dc:creator>
      <pubDate>Tue, 23 Apr 2019 14:08:40 +0000</pubDate>
      <link>https://dev.to/akshay090/android-app-to-scan-qr-and-update-data-in-firebase-and-display-it-18dd</link>
      <guid>https://dev.to/akshay090/android-app-to-scan-qr-and-update-data-in-firebase-and-display-it-18dd</guid>
      <description>&lt;p&gt;Before we start, here are some pics of the UI of the app we are building, this may help you to understand what is going on.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Default(No Internet)&lt;/th&gt;
&lt;th&gt;Scanner&lt;/th&gt;
&lt;th&gt;Details Loaded&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flveg47yq7dzy2ri5m58w.png" width="800" height="1688"&gt;&lt;/td&gt;
&lt;td&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fonlywxzlixlsho0na5n5.png" width="800" height="1688"&gt;&lt;/td&gt;
&lt;td&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8j2mwiq8qjonmpvtosvh.png" width="800" height="1688"&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;To implement the QR Scanner I used the zxing library, which is the best way to do it,as per me. &lt;/p&gt;

&lt;p&gt;The code to this is at &lt;/p&gt;
&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--A9-wwsHG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/Club-DevBytes" rel="noopener noreferrer"&gt;
        Club-DevBytes
      &lt;/a&gt; / &lt;a href="https://github.com/Club-DevBytes/formiQR" rel="noopener noreferrer"&gt;
        formiQR
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Leverages google form with help of firebase cloud function to be a complete event management platform
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;div&gt;&lt;a rel="noopener noreferrer" href="https://github.com/Club-DevBytes/formiQR/blob/master/G-Form/formiQR.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--YlRAmDzN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://github.com/Club-DevBytes/formiQR/raw/master/G-Form/formiQR.png"&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;formiQR&lt;/h1&gt;
&lt;/div&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Leverages google form with help of firebase cloud function to be a complete event management platform&lt;/h2&gt;
&lt;/div&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;The problem formiQR solves&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;If you have been to any hackathon or similar event, there the initial time is wasted in registration desk, where we need to say our name and then they go around searching it up. But with formiQR it happens in an instant with a QR scan, plus it works alongside google form, what can be more awesome than that 😄&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;What is formiQR ?&lt;/h1&gt;

&lt;/div&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Overall Idea&lt;/h2&gt;

&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;First the user fills in the google form and instantly receives a QR code with an onboarding email.&lt;/li&gt;
&lt;li&gt;During the event day, user shows the QR to the organizer to confirm the presence.&lt;/li&gt;
&lt;li&gt;The organizer can see the real time statistics of the attendee present in the venue, with the specific details filled in the form initially, like age group, gender, grade,etc.&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Why&lt;/h2&gt;…&lt;/div&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/Club-DevBytes/formiQR" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;You should have a look at the structure of Realtime Database, this may be helpful &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwjtoaodesc53obnr2oyh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwjtoaodesc53obnr2oyh.png" width="755" height="596"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you are new to firebase and android, you can lookup how to connect them both, there is already more than enough content regarding this topic.&lt;/p&gt;

&lt;p&gt;If you need any help then feel free to ask in the comments.&lt;/p&gt;

</description>
      <category>android</category>
      <category>qr</category>
      <category>firebase</category>
    </item>
    <item>
      <title>Sending personalized email with dynamic QR from cloud function</title>
      <dc:creator>Akshay090</dc:creator>
      <pubDate>Tue, 23 Apr 2019 14:07:17 +0000</pubDate>
      <link>https://dev.to/akshay090/sending-personalized-email-from-cloud-function-50al</link>
      <guid>https://dev.to/akshay090/sending-personalized-email-from-cloud-function-50al</guid>
      <description>&lt;p&gt;This is the second part of the series named Building formiQR. &lt;/p&gt;

&lt;p&gt;By following the previous article, you may have a similar structure of Realtime Database,as &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--nVtArVmc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/6fc17b5u5bxluk4ug7i6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--nVtArVmc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/6fc17b5u5bxluk4ug7i6.png" alt="Firebase structure"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Note: You would not be having the atEvent and count node, as we would be writing code for them in other sections of the blog series.&lt;/p&gt;

&lt;p&gt;So looking at our maker node or let say registered users, we have their name and email id. Now we need to set a cloud function, which would be able to get the name and email, at on create trigger on the node and send personalized email to them.&lt;/p&gt;

&lt;p&gt;A small brief about firebase cloud function, if you are new to it, Cloud Functions for Firebase lets you automatically run backend code in response to events triggered by Firebase features. &lt;/p&gt;

&lt;p&gt;Here is a &lt;a href="https://firebase.google.com/docs/functions/get-started"&gt;post to get started&lt;/a&gt; with firebase cloud functions, you can follow it upto step 4 and then we need to add the following code to the index.js&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;p&gt;You can go through the code, its very straightforward to understand, and the important details are in the comment section. &lt;/p&gt;

&lt;p&gt;Before we proceed further, we need to make an email template, which we would be using to send personalized emails to our event attendees. &lt;/p&gt;

&lt;p&gt;To generate an awesome email template, you can use &lt;a href="https://stripo.email"&gt;https://stripo.email&lt;/a&gt; this is by far the best website I found to make email templates. PS: I am not sponsored by stripo, it's just that they are really awesome.&lt;/p&gt;

&lt;p&gt;After designing your email template, export it as HTML and add it under functions/templates/makerEmail.html &lt;/p&gt;

&lt;p&gt;Don't forget to add tags, which we would be replacing dynamically, like ##UNIQUE_NAME or ##UNIQUE_QR.&lt;/p&gt;

&lt;p&gt;This method of using data.replace(/##UNIQUE_NAME/g, "MyNameHere"); is the most easiest method I found to generate personalized emails.&lt;/p&gt;

&lt;p&gt;Finally we can deploy this cloud function, for that run&lt;br&gt;
&lt;br&gt;
 &lt;code&gt;firebase deploy --only functions:mailFxn&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;Now when ever a node is created, the cloud function would automatically send them the personalized emails. Wait, how to send email to the ones already present in firebase realtime database,before we added this cloud function. &lt;/p&gt;

&lt;p&gt;For that delete the nodes for the one already present, before adding the cloud function and press the SYNC button in the google sheet which we added at the end of previous article. That would recreate the onCreate Trigger and the cloud function would do the work.&lt;/p&gt;

&lt;p&gt;So finally its over, see you in the &lt;a href="https://dev.to/akshay090/a-cloud-function-to-implement-a-counter-4i24"&gt;next post&lt;/a&gt;. &lt;/p&gt;

</description>
      <category>chartsapi</category>
      <category>email</category>
      <category>firebase</category>
    </item>
  </channel>
</rss>
