One thing that we desperately need when dealing with COVID-19 infection is constant monitoring of 3 vitals i.e.
- Blood Oxygen
- Pulse
- Temperature
Not only monitoring but this data is also needed to be shared by you with your close relatives and doctors.
Below simple steps would come in handy, and I hope it eases a few data gathering and sharing problems that you experience with infection.
Steps to achieve the below result
Step — 1 Google Sheets familiarity
First thing first, head over to sheets.google.com; you can dive in right away by creating a new sheet there using the button like shown here.
Newly created sheet should like this.
Please head over the title section in your new sheet to change it to something more relevant to the task at hand.
The sheet is where we would see our data collected, but we would create a simple google form to ease our data entry part as well; for doing so, follow along like shown.
Once the form gets generated your existing sheet should get transformed into something that looks like this
Now we can check out the form we created from a few additional options available to us now.
Your basic form should look somewhat similar to the below sample form.
🚀 Great Start, almost with those steps outs; trust me, only a few more left to get ourselves in ease of bringing joy to data collection here.
Step — 2 Google Forms familiarity
We need to do not much on the Google Forms interface but instead jump directly to Script Editor here.
Your Apps Script editor should have opened for you, and the interface should look like
Again please rename your script project to a more relevant name
Enter your project name in dialog opened.
You should be able to see a renamed project like this.
Step — 3 Time For Some Code
We can add a few lines of code directly from the Gist below to your project and fix us up.
Copy the Gist above in Apps Script Project and hit save.
On saving the script, the Apps Script Editor allows us to run and debug our code script.
On running the script, you should see a dialog asking you to review permissions required for running our script and please complete the following to continue the script’s run
The first thing would be Sign-In with Google screen asking you to select your google account.
Next, it can show you a warning about the app hasn’t been verified, and here you need to open the advanced options.
Post Advanced Clicked it should allow you to proceed to the next step.
At the last step, before we get redirected back to Apps Script Code Editor, we are allowed to check the permissions needed to run the script.
Finally, after completing all the above authorizations and permissions review, you should see logs of your script execution. 🥳
Step — 4 Understanding Code Script
Before diving deeper into code, let’s first see how exactly the current script is looking in the actual form rendered from it.
Q1. How can you add/delete family members?
Ans. Using allMembers
, that’s the array that controls the drop-down items
Q2. How can you add/delete form input sections?
Ans. Items of the form addTextItem()
, you can add or delete the existing ones based on you requirements
Q3. Checking out the form rendered?
Ans. On Run
, a published URL is generated in the execution log; that’s the URL we can use to see the final rendered form.
Q4. Post Form Submissions Trigger?
Ans. When the form is finally submitted postFormSubmission()
, is called, and here we are sending email’s to our relatives or doctors, or you can configure any other needful actions here.
Step — 5 Post Form Submission Actions
As we called out, we are interested in sending out notifications to our near and dear ones once we have submitted the form. That’s the final configuration we are trying to set up here.
Firstly, you need to reach to triggers section of the Apps Script Editor Interface.
You can start creating your trigger by using the Add Trigger Option
The dialog would list your code script functions to get your choice to use once the trigger event gets fired.
After that, we need to select and tell that trigger function needs calling post form gets submitted.
That’s it, and you should have added a new trigger that’s ready to do its job post you save and close.
That’s All To It
But if you have followed along, you pretty much should be able to use our setup, as shown at the start of the blog.
Share and like in kind.