How I automate and simplify my Mac and iOS workflow

CC0 1.0

Just sharing some tips on how I automate my workflow on Mac and iOS (maybe even Linux). I use a combination of Shortcuts, Automator, Apple Script and Shell scripting. It’s not actually that technical, you just need to play around with these apps. Let’s jump right in. I left a note about the history of Mac automation at the bottom for anyone interested. Like most notes I write, I will come back to edit it every now and then. Stay tuned.

Autoloading Websites Each Morning

I autoload my daily websites at 7am each morning. There are a few sites that I visit every morning, some for collecting login rewards, some just for news and info. So I script these. Use a cronjob to do these. Yes, I can do it with Automator too, but it is very simple with cron. This is how to do it.

  1. Open Terminal app. (Assuming you don’t know what I am talking about, you will see a black window where you can type some text.)
  2. Type the following (Copy and Paste), without the quotes: “env EDITOR=nano crontab -e”
  3. Then copy and paste the following lines into it. To exit the editor, click Control-X, Then “Y” to confirm the saving of the file. (Now you have created your cronjob.)
    In this example, it will open these 4 sites at 7am, your computer local time, with Safari browser.
0 7 * * *  open -a Safari http://www.bbc.com/news
0 7 * * * open -a Safari http://money.cnn.com
0 7 * * * open -a Safari https://flipboard.com/section/technology-c5o31di9kg9ea7p6
0 7 * * * open -a Safari https://www.macrumors.com

Keyboard Shortcuts

It is still quicker to just press a key to get certain things done when you are at your desk. I have mapped a few key functions to special key combinations. I am still a big fan of Microsoft Natural Keyboard after so many years. But too bad that they don’t write compatible drivers for Mac anymore, so I haven’t been able to use the special keys at the top.

For frequently used features, try to map it to a key that you can remember, then force yourself to use it many time. Here are my key mappings:

F5/F6 Change between Chinese and English input, both keys are the same, just switch from Sogou input to built-in English input.
F12 Mute/Unmute Button for Zoom. That’s my primary video conf platform and one key mute/unmute is useful.
F7 Direct FaceTime call home. New feature with macOS Shortcuts app. (example below, I will find ways to share the icloud link soon.)
⌃⇧⌘S
 Open Key Websites, similar to the daily cron job script, but this one is manually triggered. Can do that in automater easily (example below).
⌃⇧⌘D Shortdate, I like my YYYYMMDD date format, started using it long time ago when I was in London and had to deal with US formats. So fixing it to this format is always clear. (I don’t really like the 10.1 or 11.11 format for month and day, but I am slowly localising.)
⌃⇧⌘T Longdate, extending the above, but including 24 hour time. Both done with automator too (example below).
⌃⇧⌘K Open Keychain Access
⌃⇧⌘- 10 Dashes, I use 10 dashes to separate sections of my notes or text documents.

A quick reminder:
⌥ Option
⌃ Control
⇧ Shift
⌘ Command

Use Automator to create a Quick Action then map it to your keyboard shortcuts.
You can use Automator to open sites, but I just use it to trigger a Shell Script.
Another technical reason is, if you do it like this, you won’t have per app permission issues, Apple made it rather “difficult” to copy and paste with clipboard automation per app.
Can try to add this https://www.icloud.com/shortcuts/48dd2f6c62e74858bc7310e0161954de then map it to F7.

Use NFC to trigger iOS Shortcuts

Looking for an app on your iPhone is not too hard, I keep my 10–20 most used apps on the first page anyway. But still, if there is a particular app that you use only at a specific location, using NFC label to trigger it is much easier. You don’t have to unlock your phone, look for it, open it, etc. Just tap your phone on the NFC tag and it opens the specific app. Use Shortcuts to create it on iPhone, just make sure you have some NFC labels around. (Contact me if you need to buy some BeaconGo labels.)

I stuck an NFC label in my bathroom so I can trigger a Shortcut Automation to open the app for my digital scale.

Use Automator to watch out for Folder Actions

When I download files from the web, I am too lazy to file them properly. So I like to put certain filetypes into a folder for sorting later. For example, any ebooks, I will just move them to another folder.

Just open up Automator to create a new Folder Action.
You can filter by different criteria and then process them.

File Sharing and Access

Cloud is great for online storage, but I don’t put everything on the cloud. I have nearly 300GB of Photos, 100GB of photos and a few TBs of other files. iCloud, OneDrive, Baidu Pan and others all have options for over a terabyte of storage space. But I don’t trust them with all my files, don’t want the risk of someone getting access to every digital bits of me. Also, I have heard horror stories online of accounts having issues and all files and gmail disappeared. So I use a combination of these: 50GB of iCloud (1 buck a month), 1TB Microsoft OneDrive (part of my Office365 about 50 bucks a year), 10TB Baidu Drive (about 30 bucks a year), Resilio Sync to run my own P2P sync between devices and Cryptomator to encrypt/decrypt whole folder before uploading sensitive data to any of the cloud storage. Most files I put on cloud are not sensitive anyway, but when they might be more personal, I use Cryptomator to encrypt whole folder first. The even more sensitive ones will be protected at file level before adding to Cryptomator folders. (Remember to never lose your keys, you won’t get it back and will be hard/impossible to recover the files.)

I also setup Resilio Sync to on my desktop folders and screenshot folders so all my laptops and desktop computers have all the files I am working on. I considered using Syncthing, it hasn’t got a good iOS client, so I ruled it out, still great for server P2P sync.

https://www.resilio.com/individuals/ — Resilio Sync
https://cryptomator.org/ — Cryptomator

Other tools or services I use:

https://visualping.io/ — To monitor website changes. I use it to watch out for price changes, status changes, new versions, etc, of any particular website. It sends you an email when changes are detected. You can then link it with other workflows by processing the incoming emails.

https://www.selenium.dev/ — I am starting to play with WebDriver for Chrome and Safari. Used iMacro many years ago to automate web testing, taking screenshots, etc.

Background note: Apple has a long history of system automation for non-coders or low-coders. I am not hung up on old legacy tech like Hypercard, OpenDoc, Cyberdog, etc. AppleScript has been around for a very long time and it is still good for many simple tasks you want to do within any app as you can describe each step just as you would have in your mind when controlling the mouse clicks. (If you think python is easy, AppleScript is far more readable.) But the automation power, particular cross apps integration, was hugely improved with Automator, drag and drop, low code automation of macOS. But it came a little too late, just as everyone was switching over to iOS (and iPadOS) as their primary computing device. People who were already seriously using macOS automation were already deeply tangled with AppleScript. So when a third party app Workflow came along and did iOS automation and did it well, Apple was quick to buy it. Further integrated it into the system and renamed it as Shortcut (I guess Workflow sounds too serious). And the rest is history… (Oh, for those who think Apple was bad in killing off the automation market with buying Workflow, the ones who didn’t like them buying up startups like Shazham, Dark Sky, etc, Apple only buys the best and the talent behind it. It’s more honourable than many other acquisition strategies around.)

Leave a Reply

Your email address will not be published. Required fields are marked *