macOS Automation Guide 2026: Complete Workflow Automation

Published: March 27, 2026 | Reading time: 15 min

macOS is built for automation. From simple keyboard shortcuts to complex workflows connecting dozens of apps, automation can save hours of repetitive work. This guide covers the complete automation toolkit available on your Macβ€”from beginner-friendly Shortcuts to powerful AppleScript and shell scripting.

macOS Automation Tools Overview

Tool Difficulty Best For
Shortcuts Beginner No-code automation, app integration
Automator Beginner-Intermediate Visual workflow builder
AppleScript Intermediate Deep app control, logic
Shell Scripting Intermediate-Advanced System tasks, file processing
Python/Perl Advanced Complex processing, API integration

Shortcuts: The Modern No-Code Automation

Shortcuts (formerly Workflow) is Apple's visual automation app, perfect for connecting apps and automating repetitive tasks.

Getting Started with Shortcuts

Shortcuts comes pre-installed on macOS Monterey and later. Find it in Applications or use Spotlight.

Essential Shortcuts Actions

# Example: Image Optimization Shortcut
# 1. New Shortcut β†’ Name: "Optimize Images"
# 2. Add actions:
#    - "Get Selected Files" (from Finder)
#    - "Resize Image" (Width: 1200, maintain aspect)
#    - "Compress Images" (Quality: medium)
#    - "Save Images" (to Desktop/Optimized)
# 3. Assign keyboard shortcut: Cmd+Shift+O

# Example: Daily Screenshot Organizer
# 1. Watch Folders for ~/Desktop/Screenshots
# 2. Move to ~/Pictures/Screenshots/YYYY-MM-DD/
# 3. Open folder in Finder

Popular Shortcuts Ideas

Automator: Visual Workflow Builder

Automator has been a Mac staple for years, offering visual workflow building with hundreds of actions.

Automator Workflow Types

Example: Auto-Resize Images

# Automator Workflow Steps:
# 1. File β†’ New β†’ Workflow
# 2. Add actions:
#    - "Ask for Finder Items" (specify image types)
#    - "Scale Images" (by percentage or size)
#    - "Copy Finder Items" (to output folder)
#    - "Open Finder Items" (preview results)
# 3. Save as Application

# Now drag any image onto the app to resize!

Example: Folder Action - Auto-Zip Downloads

# Folder Action Setup:
# 1. Right-click on ~/Downloads β†’ Folder Actions Setup
# 2. Attach workflow: "Compress items in folder"
# 3. Files added to Downloads auto-compress
# 4. Saves space and keeps Downloads organized

AppleScript: Deep Application Control

AppleScript is Apple's scripting language designed to control applications and automate complex workflows.

AppleScript Basics

# Basic AppleScript syntax
tell application "Finder"
    activate
    make new Finder window
    set target of front window to path to documents folder
end tell

# Getting user input
display dialog "Enter your name:" default answer ""
set userName to text returned of result
display notification "Hello, " & userName

# Working with files
tell application "Finder"
    set selectedItems to selection
    repeat with itemRef in selectedItems
        -- Process each selected file
    end repeat
end tell

Example: Batch File Renamer

-- Batch Rename Script
tell application "Finder"
    set sourceFolder to folder "Macintosh HD:Users:username:Documents:ToRename:"
    set fileList to every file of sourceFolder
    
    repeat with aFile in fileList
        set originalName to name of aFile
        set newName to "Processed_" & originalName
        set name of aFile to newName
    end repeat
    
    display notification "Renamed " & (count fileList) & " files"
end tell

Example: Automated Backup Script

-- Simple Backup to External Drive
tell application "Finder"
    set sourceFolder to folder "Macintosh HD:Users:username:Documents:"
    set backupFolder to folder "Backup:Documents Backup:"
    
    -- Use shell for robust copy
    do shell script "rsync -av --delete " & POSIX path of sourceFolder & " " & POSIX path of backupFolder
    
    display notification "Backup completed!"
end tell

Shell Scripting for Mac

Shell scripting (bash, zsh) provides powerful system-level automation for Mac.

macOS-Specific Shell Features

#!/bin/zsh
# macOS-specific commands

# Open apps and files
open -a "Safari"
open "~/Documents/report.pdf"

# Use macOS utilities
mdfind "kind:pdf modified:>today"  # Spotlight search
mdls document.pdf  # Show file metadata

# Notification
osascript -e 'display notification "Backup complete" with title "Mac Automation"'

Example: Daily Cleanup Script

#!/bin/zsh
# daily-cleanup.sh

# Clean Downloads of files older than 30 days
find ~/Downloads -type f -mtime +30 -empty -delete
find ~/Downloads -type f -mtime +90 -delete

# Organize Desktop
mkdir -p ~/Desktop/ToProcess
find ~/Desktop -maxdepth 1 -name "*.txt" -exec mv {} ~/Desktop/ToProcess/ \;

# Empty trash securely
rm -rf ~/.Trash/*

echo "Daily cleanup complete" | osascript -e 'display notification'

Scheduling with launchd

# Create ~/Library/LaunchAgents/com.user.daily-cleanup.plist




    Label
    com.user.daily-cleanup
    ProgramArguments
    
        /bin/zsh
        /Users/username/scripts/daily-cleanup.sh
    
    StartCalendarInterval
    
        Hour
        9
        Minute
        0
    



# Load the job
launchctl load ~/Library/LaunchAgents/com.user.daily-cleanup.plist

Homebrew: Package Manager for Automation

Homebrew extends your Mac's command-line toolkit with thousands of utilities.

Essential Automation Packages

# Install popular automation tools
brew install wget curl jq yq fzf ripgrep fd bat

# File synchronization
brew install rsync

# Image processing
brew install imagemagick
brew install ghostscript  # PDF tools

# Video processing
brew install ffmpeg

# JSON processing
brew install jq
echo '{"name":"test"}' | jq '.name'

Making Your Choice

Task Best Tool
Simple app automation Shortcuts
File processing workflows Automator
Complex app logic AppleScript
System maintenance Shell Scripts
Scheduled tasks launchd

Getting Started Tips

  1. 🎯 Start with Shortcutsβ€”most users can build useful automations in minutes
  2. 🎯 Explore the Shortcuts Gallery for ready-made automations
  3. 🎯 Add frequently-used Automator workflows to Finder toolbar
  4. 🎯 Learn basic AppleScript syntax to open doors to deeper automation
  5. 🎯 Create shell aliases for commands you use daily
Affiliate Disclosure

This guide contains affiliate links. If you purchase through links, I may earn a commission at no extra cost to you.