Using Automator to Batch-Download from Safari on macOS
Yes, Automator workflows on macOS can still interact directly with the Safari web browser to batch-download linked images and URLs from an active webpage. This article provides a straightforward guide on how this functionality works in modern versions of macOS, the exact Automator actions required to build the workflow, and the updated system permissions you must enable to ensure Safari and Automator communicate properly.
Despite Apple shifting its primary automation focus to the Shortcuts app in recent years, Automator remains pre-installed on macOS and retains its legacy Safari integration. You can extract content from an active Safari tab using a built-in sequence of actions without writing a single line of code.
How to Batch-Download Images from an Active Safari Tab
To create a workflow that grabs images from the webpage you currently have open in Safari, follow these steps:
- Open the Automator app on your Mac and select New Document.
- Choose Workflow (to run it inside the Automator app) or Quick Action (to run it from the Safari Services menu) and click Choose.
- In the Actions library on the left, select the Internet category.
- Drag and drop the Get Current Webpage from Safari action into the main workflow area on the right.
- Next, drag the Get Image URLs from Webpages action directly below the first action.
- In this second action, look at the dropdown menu that reads "Get URLs of images". Change this to linked from these webpages if you want high-resolution linked images, or leave it as on these webpages to grab the images currently displayed directly on the page.
- Finally, drag the Download URLs action to the bottom of the workflow and select the folder where you want the downloaded files to be saved (such as your Downloads or Desktop folder).
With Safari open to your target webpage, click the Run button in the top right corner of Automator. The workflow will pull the active URL, scrape the image links, and download them to your specified folder.
How to Batch-Download Linked URLs
If you want to download files linked on a page (such as PDFs, ZIP files, or other documents) rather than images, you only need to swap out the middle action:
- Start with the Get Current Webpage from Safari action.
- Add the Get Link URLs from Webpages action. You can check the box to "Only return URLs in the same domain as the starting page" to avoid downloading external website links.
- (Optional) Add the Filter URLs action from the
Internet library. This is highly recommended so Automator doesn't
download entire HTML webpages. You can set the filter to only pass
through URLs whose path ends with
.pdf,.zip, or.mp3. - End with the Download URLs action and choose your destination folder.
Required macOS Security Permissions
While the actions themselves have not changed, modern macOS security protocols block apps from controlling one another by default. If your workflow fails to run, you must adjust your settings:
- Automation Permissions: The first time you run the workflow, macOS should prompt you to allow Automator to control Safari. If you missed this or denied it, go to System Settings > Privacy & Security > Automation. Find Automator in the list and ensure the toggle switch for Safari is turned on.
- Full Disk Access: If Automator fails to save the files to your chosen directory, go to System Settings > Privacy & Security > Files and Folders and ensure Automator has permission to write to your Desktop or Downloads folder.
Limitations with Modern Websites
It is important to note that Automator’s built-in actions rely on reading standard HTML source code. If you are trying to batch-download images from a modern, dynamic website that uses heavy JavaScript, lazy-loading, or infinite scrolling (such as Instagram or Pinterest), the standard Get Image URLs from Webpages action may fail to detect the files. Automator only sees the initial HTML document, not the elements dynamically generated by scripts after the page loads. For standard HTML directories, galleries, and blogs, however, the tool remains fully functional.