IFTTT

1. What it does

Allows you to use Sleep as Android as a trigger for IFTTT tasks.

We use the IFTTT Webhooks (formerly Maker) channel to send triggers/events from Sleep as Android.

2. Where to find it

Settings → Services → IFTTT

When you enable the option, you will be taken to its settings.

3. Guide

3.1. Setup

  1. In Settings → Services → IFTTT, tap on Retrieve. An IFTTT login screen will show up below.

  2. Enter your email and password and tap Sign in.

    Note Don’t use Google/Facebook login. It doesn’t work when the web browser window is embedded inside our app.
    If you don’t want to fill your email/password inside our app, you can copy the needed ID from your own browser. Check https://ifttt.com/services/maker_webhooks/settings – the ID is in the page’s URL, after /use/)
  3. Your ID gets loaded automatically and “IFTTT connected” message will appear.

  4. Now you can add IFTTT recipes on the IFTTT create page.

    • Click on +THIS and select Webhooks > Receive a web request.

    • In the “event name” field, type one of the events below. Click Create trigger.

    • Click on +THAT and choose your desired action.

      Note In +THAT, you can also add variables (or "ingredients" as IFTTT calls them) from the event. For example with alarm_alert_start, we are sending the alarm timestamp and label.

3.2. Events that Sleep as Android posts to IFTTT

sleep_tracking_started

…​

sleep_tracking_stopped

…​

sleep_tracking_paused

…​

sleep_tracking_resumed

…​

alarm_snooze_clicked

…​

time_to_bed_alarm_alert

Fires when you get a bedtime notification

alarm_alert_start

Fires when alarm starts.
We are sending the following IFTTT variables:

  • Value1: UNIX timestamp of the alarm start time, example: "1582719660934"

  • Value2: alarm label, example: "label" (Any tabs and newline characters in the label will be removed before sending)

alarm_alert_dismiss

Fires when you dismiss alarm (after you solve CAPTCHA, if it’s set)

rem

Fires when we estimate the start of REM phase

antisnoring

Fires when we detect snoring

smart_period

Fires 45 minutes before the smart wakeup period starts