Switch branches/tags
Nothing to show
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
..
Failed to load latest commit information.
bin
include
lib/python2.7
.Python
Readme.md
deploy.sh
google_sheets_to_sns.py
pip-selfcheck.json

Readme.md

Google Sheets to AWS SNS

This is a lambda function to pull from a Google Sheets spreadsheet, compare some times in cells, and then send any that match to AWS SNS.

Specifically built for querying a medication tracking system and sending the needed medications to caregivers over SMS.

It is made to be used with this Data tracking/input Google Sheet: Caregiving: Medication Tracker

For information on the complete system, checkout this blog post: Med tracking and Reminders: How to Avert human Error

Modifications

  1. Obtain oauth2 credentials to the Google Sheets API

http://gspread.readthedocs.io/en/latest/oauth2.html

  1. Copy the service account JSON you are given to the json = {} block on line 34

  2. Replace the following on line 11 with the names from the sheet you are working with. I have made them the default for the public sheet linked above.

sheet_name = "<sheet_name>"
meds_worksheet = '<meds_worksheet_name>'
meds_dashboard_worksheet = '<dashboard_worksheet_name>'
  1. Replace topicArn on line 15 with the ARN of your SNS topic from the AWS SNS Console.

  2. Run ./deploy to create the AWS Lambda deployment zip file.

  3. Upload to AWS Lambda and run. Make sure your lambda function has publish permissions to your SNS topic.