An Alfred workflow for generating simple Amazon Affiliate links with your own tag. Designed for anyone who generates a lot of custom links from URLs. This workflow will clean up all the parameters from an amazon.com URL, and then append the configured tag to it.
The keyword trigger alink code will set a new affiliate code, which all subsequent calls to alink will use.
The keyword trigger alink will strip extra junk from the URL (all the query params, which aren't necessary for Amazon product links), and append "tag=your-affiliate-tag" to it, copying the result to the clipboard.
You will get an error message if you haven't set an affiliate code yet (see above), or if the target link is not a valid Amazon link.
Download the compiled workflow directly at http://cl.ly/image/2F3I3w3s0E1F
Visit the repository for the full source code at https://github.com/wkoffel/alfred-amazon-affiliate-links/
In theory, I've bundled all the necessary ruby gems in the workflow package proper, so it should be a simple double-click install. If you do need to install manually, please let me know. To install manual dependencies, you would run just "sudo gem install alfredo addressable", and that should suffice.
This has been tested on OS X 10.13 High Sierra. The necessary gems for earlier ruby versions may still be bundled, so give it a try. Reach out if anything doesn't work for you, so we can update these notes.
Thanks to Bryan McKelvey for the simple Alfredo Gem Thanks to phyllisstein for Alleyoop
- v1.0 (Feb 24, 2014) - Initial release
- v1.1 (Mar 24, 2018) - Support for Alfred 3 and macOS 10.13
- v1.2 (Oct 27, 2019) - Update for Alfred preferred JSON format, support for macOS 10.15 Catalina


