I'd like to provide myself with periodic checkins during the day by loading a page with some questions in Notion.
However, I'd like to delay the checkins while the "Flow" app has an active timer, so I do not interrupt my focus sessions.
I see that the Flow app supports a getphase method, which returns "flow" when a timer is active.
While I'm familiar with JavaScript for the web, I'm new to using it for application scripting. I tried creating a periodically while logged in trigger, with a pause until conditions are met action, but I'm uncertain how to use JXA (I'm assuming the JAX reference in the app is in error) to check the condition.
Additionally, I'm not sure if there's any way to determine how often the the condition checks are made, or if it's possible to reset the periodic timer once the conditions are met. So if I want the checkins to happen every hour, but the active timer delays it 20 minutes, the next checkin should come an hour after the delay.
Flow is indeed a MacOS App. I'm unsure how to access the getphase method at this point, I just know it exists by looking at the scripting library for the app, and I'm guessing the return based on a similarly named Shortcuts method.
Interesting approach on checking every minute. I guess I'll need to store the time in a variable and do some date math.