IFTTT Integration

If This, Then That (IFTTT) is a useful Nightscout integration. By using IFTTT, you can have single button presses that you can deploy from your iPhone to put a note in your NS site, enter low treatments, log a site change, or log a sensor change.

IFTTT Setup for phones

The following info should be filled in:

URL: https://yoursite.herokuapp.com/api/v1/treatments.json (change the "yoursite" part to your NS info)

Method: POST

Content Type: application/json

Body: The content of the body will depend on the action that you would like this particular button press to perform. You can only do ONE of the actions per button. There are many recipes available, but not all will work with Loop and NS together. For example, you can use the Low Treatment recipe to log carbs to NS...but Loop will not read/use those carbs. That may still be helpful though for remote care givers to leave an indication of when they gave uncovered carbs to treat a low. You could also set temp targets in NS using IFTTT (recipes can be found on OpenAPS docs), but Loop does not read temp targets from Nightscout at this time. Some sample content for actions that may be useful in Loop:

Pump Site Change

{"enteredBy": "IFTTT-button", "eventType": "Site Change", "duration": 0, "secret": "your_hashed_api_goes_here!!!"}

CGM Sensor Start

{"enteredBy": "IFTTT-button", "eventType": "Sensor Start", "duration": 0, "secret": "your_hashed_api_goes_here!!!"}

Note

{"enteredBy": "IFTTT-button", "eventType": "Note", "notes": "Hi mom, please don't text me for a bit. I'm taking a test.", "secret": "your_hashed_api_goes_here!!!"}

Low Treatment

{"enteredBy": "IFTTT-button", "reason": "low treatment", "carbs": 15, "secret": "your_hashed_api_goes_here!!!"}

Enable IFTTT in your Nightscout site


Install IFTTT app on your iPhone/Android

If you end up with more than four IFTTT applets, they will appear in reverse-order of when they were created...which may not be the same as you'd prefer them to appear on your widget bar. If you'd like to reorder them:

Alexa integration