How to automate repetitive tasks on your Mac
Match the tool to the task. For a quick action inside one app, use Shortcuts. For files that need sorting, use a folder rule. For a fixed routine of keystrokes and clicks, use a macro tool such as Keyboard Maestro. For work that spans two or three apps and changes a little each time, such as invoices, reports and trackers, use an AI agent, which Ditto AI can build from a recording of you doing the task once.
Start by writing the task down
Before choosing a tool, answer four questions about the task:
- What starts it? A time (every Monday), an event (a new email), or you deciding to do it.
- What changes each time? The file, the amount, the recipient, the date.
- Which apps does it touch? One app, or several.
- What’s the result? A file in a folder, a row in a sheet, a message sent.
A task that starts on a schedule, stays in one app and never changes is easy to automate with almost anything. A task that you start, that crosses three apps and that varies each week is the one most people still do by hand, and the one that needs the most flexible tool.
The options, from simplest to most flexible
| Tool | Good for | How you build it | Where it struggles |
|---|---|---|---|
| Shortcuts | Quick actions in apps that support it | Drag actions into a list | Apps without Shortcuts actions |
| Automator and AppleScript | Scriptable apps and file batches | Chain actions, or write a script | Apps that aren’t scriptable; a changing UI |
| Keyboard Maestro and other macro tools | Fixed keystroke and click routines | Record or assemble a macro | Anything that looks different next time |
| Folder rules (Folder Actions, Hazel) | Sorting, renaming and moving files | Set conditions on a folder | Work outside the file system |
| AI agents (Ditto AI) | Repeated work across several apps that varies | Do the task once while it records | Tasks it has never seen; Intel Macs |
Shortcuts
Shortcuts is Apple’s automation app, on the Mac since macOS Monterey. You build a shortcut by dragging actions into a list: resize these images, send this message, open these apps. Shortcuts can run from the menu bar, a keyboard shortcut, Spotlight or Siri.
It’s the right first stop for anything inside one app that offers Shortcuts actions. It gets harder when the task involves a website or an app with no actions, or when the steps depend on what you find along the way.
Automator and AppleScript
Automator is the older Apple tool that Shortcuts is replacing. Its workflows chain actions much like Shortcuts, and its Watch Me Do action records clicks and keystrokes and plays them back. AppleScript and JavaScript for Automation go further for apps that support scripting.
Both are strong for batches of files and scriptable apps. Recorded clicks, though, replay literally: if a window moves or a button changes, the replay clicks the wrong place.
Keyboard Maestro and other macro tools
Macro tools such as Keyboard Maestro run sequences of keystrokes, clicks, typing and app commands, triggered by a hotkey, a schedule or an app launching. They’re fast and dependable for routines that are exactly the same every time.
They don’t understand what’s on the screen. A macro that works on Monday can fail on Tuesday because a dialog appeared or a list was sorted differently.
Folder rules
Folder Actions, built into macOS, and apps such as Hazel watch a folder and act on what lands in it: rename a download, move a PDF, file a screenshot. For file tidying, nothing is simpler. They can’t reach into your email or a web app.
AI agents
An AI agent decides the next step by looking at what’s in front of it, then calls a tool to do it. That makes it the only option here that handles a task that varies: an invoice from a new vendor, a report with an extra section, a tracker with a new column.
Ditto AI builds that kind of agent on a Mac without prompts or code. You record yourself doing the task once. Ditto works out the steps and the inputs, finds a tool for each app, such as an MCP server for your Drive or Slack, checks each tool with a read-only call, and gives you an agent to review before it runs. See How Ditto AI works.
Which should you use?
- The task is inside one app and takes a few actions: Shortcuts.
- It’s about files landing in a folder: a folder rule.
- It’s exactly the same every time and runs on a hotkey or schedule: a macro tool.
- It crosses two or three apps and varies from week to week: an AI agent.
- It connects two web apps on a trigger and must run while your Mac is asleep: a cloud integration platform. See How to automate a workflow across several apps.
The tools combine well. A folder rule can tidy files that an agent later uploads, and a macro can open the apps an agent then works in.
One task, done four ways
Take a weekly chore: an invoice arrives by email as a PDF, you save it to a Drive folder, and you add the vendor, date and amount to an expenses sheet.
- Shortcuts can save an attachment and append text to a file, but reading the amount from the PDF and updating a web spreadsheet takes a lot of assembly.
- A macro can repeat your exact clicks, until the email is in a different position in the inbox.
- A folder rule can file the PDF once it’s downloaded, but can’t get it out of your email or into the sheet.
- An agent built from one recording opens the email, saves the file to the folder, and reads the vendor, date and amount into the sheet, including from a vendor it hasn’t seen before.
Tips for any automation
- Test on copies first. A duplicate sheet and a test folder cost nothing.
- Keep the manual path working. If the automation breaks on a busy day, you should still be able to do the task by hand.
- Start with reads, then add writes. Let it gather and draft before it sends or saves.
- Write down what it does. A short note on each automation saves the next person, or you, an hour.