Build Family Events Notification with WhatsApp and Smart Bulb
In this blog, we learn how to create a family events reminder app and get a notification by WhatsApp message and Yeelight smart bulb. No single coding is required!
The notification will be triggered in 15 minutes before the due date and time. User shall be getting the WhatsApp message and the smart bulb will be turned on. User need to reply WhatsApp message saying “acknowledge” to turn off the light.
- SAP Cloud Platform Open Connectors
- Google Forms
- Google Sheets
- Google Calendars
- Yeelight Smart LED Bulb
Install the light and add it in your app. Make sure you can control the light from the app.
Create an account in IFTTT and setup two applets:
Navigate to Webhooks setting and take note the Maker Key below. We will use this information in the subsequent steps later on.
Create an account in Twilio and configure the WhatsApp sandbox.
Once you have done, take note the Account SID and Authorization Token We will use it when we configure SAP Open Connectors.
There is one more step we need to complete when we configure WAOffLight Zap step later on.
SAP Cloud Platform Open Connectors
Create a connector to Twilio and set the account SID and authorization token.
On API Docs, configure and test the Post message to send the WhatsApp message.
Check the output from Curl command. We will need the following information to setup Zapier.
"Authorization: User xxxxxxxxxx, Organization yyyyyyyyyy, Element zzzzzzzzzz"
Create a form like this.
Test the form and check the response in Google Sheets.
Create three Zaps: Calendar, MyPhone and WAOffLight.
To create an event in Google Calendar from Google Forms entry.
- Trigger New or Updated Response in Spreadsheet
- Action Create Detailed Event.
Trigger: New or Updated Response in Spreadsheet
Watch for new entry from Google Forms.
Action: Create Detailed Event.
Create an event in Google Calendar.
To monitor events in Google Calendar and trigger payloads (sending WhatsApp message & turn on Yeelight smart bulb).
- Trigger: Event Start
- Action: Post (to send WhatsApp message)
- Action: Get (to turn on the Yeelight)
Trigger: Event Start
Check any events for 15 minutes before the due date & time.
Action: Post (To send WhatsApp message)
Send WhatsApp message.
Action: Get (To turn on Yeelight smart bulb)
Get the Maker Key from step IFTTT Setup and put it in the URL field (Step 3 – Set up Webhooks by Zapier GET).
To monitor incoming WhatsApp message and to turn off the light if the message reply is “acknowledge”.
- Trigger: Catch Hook
- Filter : Only Continue If…
- Action: Get (to turn off the Yeelight smart bulb)
Trigger: Catch Hook
Wait for new post request from Twilio WhatsApp sandbox to Zapier webhook url.
On Step 3 – Connect Webhooks by Zapier take note the Zapier webhook URL:
Open Twilio console and navigate to Sandbox for WhatsApp, enter this URL information in “When a message comes in” and save it. Any incoming message from WhatsApp will be sent to Zapier webhook.
We only interested on the Body message content.
Filter: Only Continue If…
Only process if the reply is “acknowledge” from the message Body.
Send an event “light_off” to IFTTT.
It is very easy to setup and I think is useful to have this platform for your family members. I hope you enjoy to setup and integrate multiple components.