image-description
Return to Blog

How I Created a Blood Donation Database Using Google Sheet and PHLO

TAGS :
, Written by

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:

  1. Google Account (Free)
  2. PHLO by Plivo (Free Creation and Hosting)
  3. Zapier Account (Free)

Step 1: Setting up a Zap

  1. Search “Webhooks” from Zapiers Built In apps

  2. Select “Catch Hook” and click on “Next”

  3. Copy the webhook. This would be used later when setting up PHLO.

  4. Skip the “Edit” option. This is required if we need to customise the data which is not the case here.

  5. 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

  1. Log in to your Plivo Account. Select PHLO from your Dashboard.

  2. Select “Create new PHLO” and “Build my Own”.

  3. The incoming SMS node should be connected to the “HTTP Request” component on PHLO.

  4. Click on the information section on HTTP Request (‘i’ icon) to customise the webhook.

  5. 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/”

  6. The Header, Auth and Params field should be ignored. We would update the “body”.

  7. Body Type would be JSON and the “KEY:VALUE” as below: MessageUUID: From: To: Text:

  8. These are essentially the parameters from the incoming SMS which would be pushed to Zapier.

  9. To test the Zap, click “Fetch Response” below the key:value pair. This would trigger a POST request to the Zapier Webhook.

  10. 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:

  11. Toggle back to Zapier and you would find a new entry to test and set-up the Zap.

  12. 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

  1. Back to the Zapier. Our basic Zap is set-up. This needs to be connected to an action.

  2. Create an new Google Sheet and name it.

  3. Click on “Action” on your Zap and select Google Sheet.

  4. Select “Crete Spreadsheet Row”. On the next step, authenticate your GMail account on Zapier and select the relevant sheet.

  5. Next, we edit the Google Sheet Template. We need to input values which would be passed to the Zap using PHLO.

  6. 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/


comments powered by Disqus