Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Mac Automation: Handle Repetitive Tasks

· 5 min read · Home Automation

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

If you find yourself doing the same clicks, keystrokes, or file operations over and over, macOS has built-in tools that can do them for you. This guide shows you how to automate repetitive tasks using Shortcuts, Automator, and a few keyboard tricks — no coding required. You'll save time and reduce errors by letting your Mac handle the busywork.

What You'll Need

  • A Mac running macOS Monterey (12.0) or later for the Shortcuts app. Older versions can use Automator.
  • Basic familiarity with your Mac's file system and menu bar.
  • An idea of which task you want to automate (e.g., renaming files, resizing images, copying text).

Step-by-Step

  1. Identify the repetitive task. Write down exactly what you do each time. For example: "I need to resize a batch of images to 1200px wide and save them as JPEGs in a folder called 'Web'." Clear steps make automation easier.
  2. Open the Shortcuts app. Click the Launchpad icon in the Dock, type "Shortcuts" in the search field, and press Return. If you're on an older macOS, open Automator instead (found in Applications).
  3. Create a new shortcut. In Shortcuts, click the + button in the top-left corner. In Automator, choose "New Document" and select "Quick Action" or "Workflow".
  4. Add actions from the library. On the right side, search for actions like "Resize Images", "Rename Finder Items", or "Extract Text from Image". Drag the action you need into the workflow area on the left.
  5. Configure each action. Click on the action's settings. For example, in "Resize Images", set the width to 1200 and choose "JPEG" as the format. Make sure the settings match your task exactly.
  6. Add more actions if needed. You can chain multiple actions. For instance, after resizing, add a "Move Finder Items" action to put the files into your "Web" folder. Click the + button below an action to add another one.
  7. Test the shortcut. Click the play button (▶) at the bottom of the Shortcuts window. If it asks for input, provide a sample file. Watch for errors and adjust the actions accordingly.
  8. Save and name your shortcut. Give it a clear name like "Resize for Web". In Automator, choose File > Save and pick a name.
  9. Run it from the menu bar or keyboard. In Shortcuts, right-click your shortcut and select "Add to Menu Bar" to access it from the menu bar icon. You can also assign a keyboard shortcut in System Settings > Keyboard > Keyboard Shortcuts > Services (or in Shortcuts preferences).
  10. Use it with Finder. For Quick Actions, you can right-click a file in Finder and find your shortcut under "Quick Actions". This works for files you select.

Common Mistakes

  • Not testing with a copy. Automations that move or delete files can be destructive. Always test on a copy first.
  • Ignoring file formats. If your action expects a certain file type (e.g., PNG), it may fail on JPEGs. Add a "Get File Type" action or filter by extension.
  • Forgetting to set the workflow receives input. In Automator, make sure the Quick Action is set to receive "files or folders" in "Finder" if you want to right-click it.
  • Overcomplicating. Start with a single action. Once it works, add more. Trying to build a complex workflow all at once often leads to confusion.

Tips

  • Use variables. In Shortcuts, you can use the "Ask Each Time" option for inputs like a folder name. This makes your shortcut flexible.
  • Combine with Automator for older tasks. Some Automator actions (like "Combine PDF Pages") are not in Shortcuts. You can still use Automator for those.
  • Schedule with Calendar. You can set a shortcut to run at a specific time by creating a calendar event and adding an "Automation" alarm that triggers the shortcut.
  • Share your shortcuts. Right-click a shortcut and choose "Share" to send it to a colleague or another Mac.

Troubleshooting

  • Action fails with no error. Check that the input files are in the expected format. Add a "Get File Type" action to verify. Also, ensure the action has permission to access the folder (System Settings > Privacy & Security > Files and Folders).
  • Shortcut not showing in right-click menu. In Shortcuts, go to Shortcuts > Settings > Advanced and enable "Use Quick Actions in Finder". Also, ensure the shortcut is set to receive "files or folders" in Finder.
  • Keyboard shortcut doesn't work. The shortcut might conflict with an existing one. Go to System Settings > Keyboard > Keyboard Shortcuts and look for your shortcut under Services. Change it to something unique like ⌥⌘R.
  • Automator workflow runs but does nothing. Check the action's settings. For example, if you used "Rename Finder Items", make sure you've set the new name and that the files are not read-only.
  • Shortcut runs on the wrong files. If you selected multiple files, make sure the workflow is set to receive "files or folders" and not "text" or "images". You can add a "Filter Finder Items" action to narrow down by name or type.

Frequently Asked Questions

Can I automate tasks that require typing text?

Yes, use the "Run Shell Script" action in Automator or the "Run JavaScript" action in Shortcuts to simulate keystrokes. However, this can be fragile; it's better to use actions that interact with files directly.

Is Automator still supported?

Yes, Automator still works on current macOS versions, and it's useful for tasks that Shortcuts doesn't cover. However, Apple has shifted focus to Shortcuts, so new features are added there.

Can I share my shortcuts with others?

Yes, you can right-click a shortcut in the Shortcuts app and choose "Share" to send it via AirDrop, Messages, or email. The recipient needs to have macOS Monterey or later.

Do I need to know programming to use Shortcuts?

No, the Shortcuts app uses a visual, drag-and-drop interface. You don't need to write code. However, you can add "Run Script" actions if you want to use shell commands.

Can I automate tasks that involve multiple apps?

Yes, Shortcuts can interact with multiple apps. For example, you can take a photo in the Camera app, then use the "Extract Text" action to copy the text to the clipboard. Just add actions from different apps.

What if my task is too complex for Shortcuts?

For complex tasks, consider using AppleScript with the "Run AppleScript" action in Automator. You can also use third-party tools like Keyboard Maestro, but those are not built-in.