The power of GPT in everything
I grew tired of seeing applications claiming to be chatGPT for mail, messenger, whatsapp and so on. Some of them quite expensive as well. So as an experiment I built a small workflow using the Alfred application to enable the power of GPT and chatGPT everywhere where I work with text.
So how does it work?
First of all, this is a Mac application. Sorry, I only use Mac so I won't build a Windows version. Secondly I use the Alfred productivity application. I'm in not any way affiliated with Alfred, I just like the application.
So when running my workflow I can select text in any application and hit my keyboard shortcut. A small dialogbox will pop up where I type my instructions to GPT, like "summarize this text" or "reply nicely to this email". Then I wait a few seconds and when GPT is done I will get a huge notification with the reply from GPT and the reply will aslo be copied to my clipboard so I can just paste it where I want it.
Once you have Alfred up and running you can download my workflow from here. Unzip it and double click it to install it.
Now you have the workflow and it should look something like this.
To define which hotkey you want to use double click on the green thing at number 1.
The things at number 2 strips whitespaces and garbage characters from whatever that is selected. Number 3 displays a small pup up box where you can enter instructions if you want to. If the selcted content includes instructions you don't need to enter anything here.
Number 4 is the script that sends the request to OpenAI's API. Here you need an API key. You sign up for an API key here: https://openai.com/api/. Once you have the API key you double click on the icon by number 4 and enter your key where is says [INSERT YOUR API KEY HERE].
Number 5 and 6 are two different outputs, one that shows the result in a really large output and one that copies it to the clipboard. There are several more output options available in Alfred so feel free to experiment with it.
One final thing before you can run it I utilize a small tool called jq to parse the result from the OpenAI API. It is free and can be downloaded from here https://stedolan.github.io/jq/download/. It can also be installed with Homebrew and Macports. Depending on which version you install you might need to change the path to it in the script at number 4 but most likely not.
How does it work?
Once up and running I just select the text in whatever application there are text and hit my keyboard shortcut. I type in my instruction, wait and boom. Done.
This was built mainly as a proof of concept but turned out to be really useful. Several things can be added ad improved and it might or might not be done by me. Feel free to create your own version of this. If you find it useful then feel free to do a small donation by using the button below.