Back
Button widget Button press. iOS Health Log sleep.

Log sleep in iOS Health with one tap in the IFTTT app.

Connect

How this automation works

Track your sleep effortlessly each night. This Applet runs whenever you press the Button widget in the IFTTT app, logging your sleep duration and time in the iOS Health app automatically. Perfect for users who want a quick way to record sleep without opening multiple apps. Note: Install the IFTTT app and add the Button widget to your home screen.

If
Button widget icon
Realtime trigger
Realtime Applets run after the trigger service notifies IFTTT of a new trigger event. Since IFTTT is notified proactively of new trigger events, realtime Applets normally run within a few seconds of a trigger event occurring.
This trigger fires every time you press the button.
ShareURL Latitude Longitude LocationMapURL LocationMapImageURL OccurredAt
Then
iOS Health icon
Action
An action is the task your Applet carries out after the trigger occurs. It defines what happens as the result of your automation and completes the workflow.
This action logs sleep to your iPhone's Health app.
sleep_duration asleep_at date_sleep_ended

Services used in this Applet

Create your own Button widget and iOS Health workflow

Create custom workflows effortlessly by selecting triggers, queries, and actions. With IFTTT, it's simple: “If this” trigger happens, “then that” action follows. Streamline tasks and save time with automated workflows that work for you.

5 triggers, queries, and actions

Button press

Realtime trigger
Realtime Applets run after the trigger service notifies IFTTT of a new trigger event. Since IFTTT is notified proactively of new trigger events, realtime Applets normally run within a few seconds of a trigger event occurring.
This trigger fires every time you press the button.

Log calories consumed

Action
An action is the task your Applet carries out after the trigger occurs. It defines what happens as the result of your automation and completes the workflow.
This action logs calories consumed to your iPhone's Health app.

Log sleep

Action
An action is the task your Applet carries out after the trigger occurs. It defines what happens as the result of your automation and completes the workflow.
This action logs sleep to your iPhone's Health app.

Log weight

Action
An action is the task your Applet carries out after the trigger occurs. It defines what happens as the result of your automation and completes the workflow.
This action logs body mass in pounds or kilograms to your iPhone's Health app.

Log workout

Action
An action is the task your Applet carries out after the trigger occurs. It defines what happens as the result of your automation and completes the workflow.
This action logs a workout to your iPhone's Health app. Choose the type of activity, calories burned, duration, and more to customize your workouts.

Button press

Realtime trigger
Realtime Applets run after the trigger service notifies IFTTT of a new trigger event. Since IFTTT is notified proactively of new trigger events, realtime Applets normally run within a few seconds of a trigger event occurring.
This trigger fires every time you press the button.

Log calories consumed

Action
An action is the task your Applet carries out after the trigger occurs. It defines what happens as the result of your automation and completes the workflow.
This action logs calories consumed to your iPhone's Health app.

Log sleep

Action
An action is the task your Applet carries out after the trigger occurs. It defines what happens as the result of your automation and completes the workflow.
This action logs sleep to your iPhone's Health app.

Log weight

Action
An action is the task your Applet carries out after the trigger occurs. It defines what happens as the result of your automation and completes the workflow.
This action logs body mass in pounds or kilograms to your iPhone's Health app.

Log workout

Action
An action is the task your Applet carries out after the trigger occurs. It defines what happens as the result of your automation and completes the workflow.
This action logs a workout to your iPhone's Health app. Choose the type of activity, calories burned, duration, and more to customize your workouts.

Build an automation in seconds!

You can add delays, queries, and more actions in the next step!

More on Button widget and iOS Health

About Button widget

Make buttons and control other services with a single tap. This service creates widgets that you can use from the home screen of your Android or iOS device.

Explore Button widget

More integrations with Button widget

About iOS Health

The iPhone's Health app consolidates health data from iPhone, Apple Watch, Apple Health, and other apps so you can track your progress in one convenient place. This service requires the IFTTT app for iOS.

Explore iOS Health

More integrations with iOS Health

IFTTT helps all your apps and devices work better together

Get started for free