Automation Tasks series: Using the "Quit All Except" Action

Alfred's Automation Tasks are the non-coder's secret weapon.

With 231 Automation Tasks at your fingertips and more being added regularly, you can create powerful workflows with little to no need to know how to script or code anything!

We've created a series of 3 posts to help you discover a few of the ways you could use Automation Tasks as building blocks to speed up your work.

Completely new to workflows?

Take a look at our Getting Started Guides, which will show you how to connect, configure and use workflow objects, the canvas and palette.

In this first post, we'll create a workflow to quit all apps on your Mac except for a few select ones. This is a great way to quickly settle into a focused work environment by quitting all unnecessary distractions.

Setting up your workflow

This workflow consists of only two objects; A Keyword Input and an Automation Task.

Workflow for Quit All Except

The Keyword object is configured with:

  • The keyword quitx
  • The Argument dropdown is set to No Argument
  • A Title: Quit all apps except Safari and Mail
  • Optional subtext for clarity (or alternative actions, more on that later)

Keyword object configuration

For the Automation Task, we'll select the task Quit All Apps, with Exceptions from Core Automation Tasks > macOS.

In this example, we'll keep Safari and Mail open by typing their app names in. We'll also ensure that Alfred and Finder are checked so that they continue to run in the background.

Automation Task configuration

Customisation Tip:

You can add different apps to the "Do Not Quit" list to suit your preferred work habits.

We can now test the workflow by typing quitx into Alfred to trigger the workflow.

Adding an Alternative Action: Leisure Mode

Life isn't just about work, right? To wrap up this workflow, we'll add an alternative action to the same keyword.

Connect a second Automation Task from the Keyword object; We'll set this AT to use the Quit Apps task from Core Automation Tasks > macOS, and set the app names that relate to work, such as XCode and Slack.

Set an alternative action by double-clicking the circle halfway down the connection between the Keyword and second Automation Task. This brings up a configuration panel for the connection.

We'll choose as our modifier key, and set the Subtext to "Leisure mode activated!"

Alternative action

After saving your change, pop up Alfred, type quitx but instead of just pressing (Return), hold the key first. You'll notice the subtext changes to our alternative path. Pressing while holding will trigger this alternative path and quit all your work apps.

That's it, you've created a workflow with two Automation Tasks!

Next time, we'll look at extracting text from an image with OCR - again, using Alfred's immensely useful Automation Tasks.

Latest Blog Post:

Automation Tasks series: Using the "Quit All Except" Action

CacheFly Campaign Monitor

"Alfred" is a registered trademark of Running with Crayons Ltd. ©2025 Running with Crayons Ltd. All rights reserved.

Terms & Conditions, Privacy Policy, Cookies.