Setup session automation on iOS and MacOS with Apple Shortcuts

Philip Young

In this guide, you'll learn how to integrate Session with Apple Shortcut. If you don't know about Session automation yet, you can learn more from Automate your workflow with Session Automation.

You can learn how to make your iOS Shortcut from internet / YouTube. We'll write a guide soon.

1. Apple Shortcuts naming

There's 9 scenarios where automation ran. They are:

  1. Your session has started: session_start
  2. Your paused session: session_pause
  3. Your unpaused session: session_unpause
  4. Your unpaused session: session_went_too_long
  5. Your session has ended: session_end
  6. Your break has started: break_start
  7. Your unpaused session: break_went_too_long
  8. Your break has ended: break_end
  9. Called whenever session_end or break_end not called. Example, from abandon Session : stop_working

What you probably use is session_start, session_end, stop_working, and possibly break_start.

Simply made a shortcut with the matching name above. Session will run it for you.

2. Enable Shortcuts you've made

  1. Go to Session > Settings (Gear icon) > Automation,
  2. check all shortcuts you want to run,
  3. make sure you have matching file name on your Apple shortcuts.
  4. Note that if you check it and have no Shortcut with matching file name, Session won't do anything.

3. Shortcut input data

As of Session v2.3, you will receive additional data from Session on shortcut like Session title, start date, end date, category title, etc

You can those data on shortcut by choosing Get dictionary from input and choose the input as Shortcut input.

Then you can get these individual data from Get Dictionary Value. Available data:

  • title: your session intention
  • type: fullFocus, partialFocus, pause, rest, or endEarly
  • category
    • id: Category ID
    • title: Category title
    • status: active | archived
    • hex_color: Color of the category
  • start_date: start date
  • pause_date: pause date if exists
  • end_date: ended date (only on session_end and break_end)
  • notes: the notes
  • meta: pauses with start date and end date if exists
  • duration_second: session duration you choose
  • passed_second: total passes second since start date
  • from_another_device: If the event comes from your other devices via real time sync

3. Enjoy your automation!

Congratulations! Now you've automated your workflow based on Session current state!