Qbserve logs your productivity automatically and can trigger other applications and web services when you reach certain thresholds. For example, 3 hours of total productive time, or 1 hour of total distracting time, or 45 minutes of activities in the "Design" category.
To setup an integration, create an alert in Preferences -> Notifications and then select it to add events. Two types of events are available: webhooks and AppleScript, you can set both of them for a single alert.
AppleScript is the powerful automation built into macOS. It can be used to do anything inside the system: launch or quit other apps, create or move files, switch playlist in iTunes, send emails, add Calendar events. You can find many ready scripts for your needs on Doug's Scripts, MacScripter, and StackOverflow.
A good use case for AppleScript would be connecting Qbserve to the Focus app, so you can block distracting websites after reaching a daily distraction limit. This script activates Focus with its default hotkey "Command + Option + Control + F":
tell application "System Events"
keystroke "f" using {command down, option down, control down}
end tell
Here are the steps to do it:
Now if Focus is running, it will block distracting sites on Qbserve alert. You may need to add some of the distracting domains to the Focus preferences since the apps have separate website lists.
Note that Qbserve itself also supports a few AppleScript commands: pause
in minutes, resume
, and getProductiveTime
, getNeutralTime
, getDistractingTime
in seconds.
Webhook is just a URL, usually obtained from some integration service like Zapier or IFTTT. On a Qbserve alert, a webhook event will call this URL once, sending from 0 to 3 parameters of your choice. Parameters are not required unless you want to pass some information in a key-value form. By default Qbserve suggests to send productivity or category and total minutes spent in it.
You have lots of possibilities for event results. For example: add a record to your team's time tracker, automate your status in Slack, log your daily goals to a Google spreadsheet, tweet something, save money, or change Philips Hue lights color.
Below you can see the steps for setting up a webhook on the mentioned services.
Zapier is really easy to setup:
IFTTT setup is a bit more complicated but once you create the first webhook, all others will be easier:
In the end you should have a link in this format:
https://maker.ifttt.com/trigger/EVENT_NAME/with/key/SECRET_KEY
For example:
https://maker.ifttt.com/trigger/distracting_30min/with/key/abcdEFgHij-kL-mN-oPq
You can now create webhooks for other alerts and only replace the event name in the URL above.