Browse the docs

Coming from Alfred

How Alfred's workflows, keywords, script filters, web searches and feature hotkeys map to Switchboard, and what the import keeps, notes or leaves out.

Alfred runs a workflow when you type its keyword, press its hotkey or call it from another workflow. Switchboard's palette (⌥Space) does the same with a macro that has a keyword, so gh swift actors still opens the GitHub search. Import reads Alfred's open formats and shows a review first; nothing is added until you click Import.

Choose File › Import… and pick:

  • a .alfredworkflow file (double-click one in Finder, or export it from Alfred), or a workflow folder;

  • the Alfred.alfredpreferences folder (Alfred › Preferences › Advanced shows where it lives): every workflow in it, your custom web searches, the hotkeys of Clipboard History and File Search, and your snippets;

  • or switchboard import file.alfredworkflow, switchboard import --alfred (the preferences on this Mac), --dry to read the review as JSON.

Importing the same thing again replaces the macros and adds no duplicates.

How a workflow reads #

A workflow is one group. Each trigger or input in it (a keyword, a hotkey, an external trigger) is one macro, and the objects connected after it become its steps, in the order of the connections.

  • Keywords keep their text. The macro has a query input; whatever you type after the keyword goes into it. A required argument opens the form when you press Return without one.

  • Hotkeys become hotkey triggers. Alfred's "argument" option (selection, clipboard, text) becomes the query. A selection is read by pressing ⌘C first, which replaces your clipboard.

  • Script filters run their script once with the text after the keyword and show the items it prints as a list. Your pick's arg is the query for the next step, and its variables become variables. Alfred re-runs the script on every keystroke; live filtering is a later palette feature.

  • Conditionals become If steps. Two outgoing connections are then and else.

  • A connection taken with a modifier key (⌘↩ does something else) becomes a list that asks which action. The palette has no per-row modifier keys yet.

  • Several connections out of one object run one after another, each in its own group, with a note.

  • Calling another workflow becomes Run Macro when that workflow is part of the same import.

Scripts and variables #

A script gets $query and {query} as the typed text, and each workflow variable it names as an environment variable, so $1, $query, {var:token} and $token all work. The values reach the script as data, never pasted into the shell text, so a quote in what you type cannot break it. Scripts in other languages (Python, Ruby, PHP, Perl, AppleScript, JavaScript) are run from a temporary file with the query as the first argument; when one has {query} pasted into its source, as Alfred does, the review says so.

A workflow's own settings: plain values become variables set at the start of each macro. Anything labelled API key, token, password or secret is asked for once, by a Set up … macro in the group (run it from the palette), and stored in the Keychain. It is never written into a macro or the review.

What each object becomes #

Alfred objectBecomesFidelity
trigger.hotkeya hotkey trigger; the argument option becomes the querymapped
trigger.keyworda palette keyword and a query inputmapped
trigger.externala macro other macros run (runMacro)mapped
trigger.actiona macro run by name (Universal Actions have no equivalent)attention
trigger.fallbacka macro run by name; turn on Fallback in its palette settingsattention
trigger.snippeta macro run by nameattention
trigger.remotea macro run by name (Alfred Remote has no equivalent)attention
trigger.contacta macro run by name (Contacts triggers have no equivalent)attention
input.keyworda palette keyword and a query inputmapped
input.scriptfilterthe script, a list prompt of its items, the pick's arg as the queryattention
input.filefiltera file chooserattention
input.listfiltera list prompt of the fixed itemsmapped
input.dictionarynothing (Alfred's dictionary lookup)unsupported
action.scripta shell step, or the script run by its interpretermapped
action.applescriptan appleScript stepmapped
action.openurlan openURL stepmapped
action.openfilean openFile stepmapped
action.launchfilesopenFile stepsmapped
action.revealfilea file.reveal stepmapped
action.browseinalfredan openFile step (Alfred's file browser has no equivalent)attention
action.terminalcommanda Terminal window running the commandattention
action.systemcommandthe system step of the same namemapped
action.runworkflowa runMacro stepmapped
action.defaultwebsearchan openURL web searchattention
action.callautomationnothing (Automation Tasks)unsupported
action.itunescommandnothing (Alfred's Music commands)unsupported
utility.conditionalan if stepmapped
utility.filterthe text passes throughattention
utility.delaya wait stepmapped
utility.argumentvariable steps for the query and variablesmapped
utility.junctionnothing: the branches joinmapped
utility.splita group per branch, run in orderattention
utility.debugnothingmapped
utility.transforma text step that changes nothing: pick the transformattention
utility.replacea text replacement on the querymapped
utility.jsona variables.fromJSON stepattention
utility.hotkeycombinationa pressKeys stepmapped
output.clipboarda clipboard stepmapped
output.notificationa notify stepmapped
output.largetypea hud stepmapped
output.playsounda shell step running afplaymapped
output.aftertexta typeText stepmapped

Fidelity: mapped reads the same, attention works with a difference the review names, unsupported is left out with a note.

Hotkeys and take over #

Alfred still owns its hotkeys while it runs. Keyword macros come in on; anything with a hotkey comes in off. When you have turned the workflow off in Alfred, tick Take over in the review (or --take-over) to switch them on.

What is not imported #

Alfred Remote, themes and appearance, Alfred's file navigation window, Automation Tasks, Universal Actions and Contacts triggers (the macro is kept, run by name), and the Music commands. A number-coded System Command is left out rather than guessed: add it from the palette's System rows (Sleep, Lock Screen, Empty Trash and the rest).

See also #

Coming from TextExpander or Alfred, Coming from Raycast, Open URL, Ask for input, Keychain password