Donating blood is a rewarding process. According to the American Red Cross, one donation can save as many as three lives. Every two seconds someone in the U.S. needs blood. But supply can’t always meet demand because only about 10% of eligible people donate blood yearly. Then, there is the problem of storage and distribution.
The solution is hyperlocal. I have created a project which would store the details of blood group and type of an entire community.
The idea is simple. A community could be an office, a school or a small neighbourhood. Members of the community would send an SMS to a number with their Name and Blood Group. The community manager would manage the database. The details would get registered over a Google Sheet.
Before you get started, you would need:
- Google Account (Free)
- PHLO by Plivo (Free Creation and Hosting)
- Zapier Account (Free)
Step 1: Setting up a Zap
Search “Webhooks” from Zapiers Built In apps
Select “Catch Hook” and click on “Next”
Copy the webhook. This would be used later when setting up PHLO.
Skip the “Edit” option. This is required if we need to customise the data which is not the case here.
To test the set-up, Zapier looks for live webhooks. Our hook is triggered from PHLO, hence, we would set up the PHLO sequence and pause the Zap here.
Step 2: Setting up PHLO
Log in to your Plivo Account. Select PHLO from your Dashboard.
Select “Create new PHLO” and “Build my Own”.
The incoming SMS node should be connected to the “HTTP Request” component on PHLO.
Click on the information section on HTTP Request (‘i’ icon) to customise the webhook.
HTTP Request component should be updated with the hook created on Zapier. In my case, this is a POST request to “https://hooks.zapier.com/hooks/catch/2965822/qfbtl9/”
The Header, Auth and Params field should be ignored. We would update the “body”.
Body Type would be JSON and the “KEY:VALUE” as below:
These are essentially the parameters from the incoming SMS which would be pushed to Zapier.
To test the Zap, click “Fetch Response” below the key:value pair. This would trigger a POST request to the Zapier Webhook.
I would like to acknowledge and thank the community member for their intent. Hence, I have added a response over SMS. The final PHLO looks like this:
Toggle back to Zapier and you would find a new entry to test and set-up the Zap.
Name your PHLO and save it. This should complete the basic set-up. Attach the PHLO to a phone number from your Plivo account and your PHLO set-up is ready.
Step 3: Create and link a Google Sheet
Back to the Zapier. Our basic Zap is set-up. This needs to be connected to an action.
Create an new Google Sheet and name it.
Click on “Action” on your Zap and select Google Sheet.
Select “Crete Spreadsheet Row”. On the next step, authenticate your GMail account on Zapier and select the relevant sheet.
Next, we edit the Google Sheet Template. We need to input values which would be passed to the Zap using PHLO.
The last step is to test this set-up. In essence, send a test message to your Plivo Number and see the values getting populated on the Google Sheet.
Your community database is ready in under 5 minutes.
When a natural disaster strikes, whether it’s a superstorm, or a rash of exceptionally bad wildfires, internet connectivity is a big problem. SMS on the other hand have high availability. The community manager could broadcast outbound messages and reach the members of community at the hour of need.
We have another blog for outbound SMS using Google Sheet: https://www.plivo.com/blog/Send-templatized-SMS-from-a-Google-spreadsheet-using-Plivo-SMS-API/
Read more about PHLO here: https://www.plivo.com/blog/announcing-phlo/