This workflow allows you to open a URL in Google Chrome via Alfred.
https://sw.cowtech.it/alfred-chrome
To trigger the workflow, type chrome or cr. Optionally you can add a URL.
Between the results you will a list of profiles to use to open the URL (or simply to open a new window).
If you hold the Alt key while selecting the result item, the window will be open using incognito mode.
This workflow has been tested on Alfred 3, 4 and 5.
Double click (or open in Alfred settings) the Alfred Chrome.alfredworkflow file.
If macOS says the developer cannot be verified or Apple cannot verify that alfred-chrome is free of malware, allow the helper through System Settings. On recent macOS versions the warning only offers Move to Trash and Done; right-clicking Open does not bypass it.
cr in Alfred once.alfred-chrome, authenticate if prompted, and confirm Open.cr again in Alfred.If the entry is missing, open Alfred preferences, select the workflow, and choose Open in Finder from its context menu. Try opening the alfred-chrome helper, then return to Privacy & Security. On older macOS versions, the equivalent controls are under System Preferences → Security & Privacy → General. Managed Macs may require assistance from the administrator.
See Apple's instructions for opening an unidentified developer's app for the current Gatekeeper exception procedure.
Chrome is launched through macOS Launch Services so camera, microphone, and network permissions are associated with Chrome. After upgrading from an older workflow, fully quit Chrome and reopen it with cr before checking these permissions.
Profile names use Chrome's Local State metadata, including account and custom names, with per-profile preferences as a fallback. Duplicate display names include the profile directory to distinguish them.
If cr shows no profiles and the workflow debugger reports Not suitable profiles found. Nothing to do! :(, check that Alfred has permission to access Chrome's profile files.
cr again.This can affect Alfred even when the helper works from Terminal, because macOS grants file access separately to each application. If the problem persists, confirm Chrome has an existing profile and ALFRED_CHROME_NAME identifies the intended browser.
Remove the workflow via Alfred settings.
If you use Canary version of Chrome or similar applications, like Chromium, you can instruct the workflow to use it.
To do it:
Configure workflow and variables by clicking on the second icon on right section of the workflow header.Workflow Environment Variables section, create a variable called ALFRED_CHROME_NAME and enter the same name you see in your Applications folder.Save and you're good to go! :)Copyright (C) 2013 and above Shogun (shogun@cowtech.it).
Licensed under the MIT license, which can be found at https://choosealicense.com/licenses/mit.