Jump to content

ChatGPT with Alfred 5.5

Recommended Posts

That message is not in the workflow, meaning it is being returned by the API. In other words, you’ll have to ask OpenAI why your key isn’t working. The given link (also not in the workflow) has some hypothesis but only you or OpenAI can know the cause.

Link to comment

I also got some weird issues with the API key. I get this message in the workflow:



[Incorrect API key provided: xxxxxxxxxxxxxxxxxx. You can find your API key at https://platform.openai.com/account/api-keys.]


I'm pretty sure, I pasted the API correctly. 😁 Also: If I enter a new key in the workflow prefrences (just to be sure), it is still using the "old" key. I even uninstalled and re-installed the complete workflow. Is this a known issue?


Any ideas?


Link to comment
40 minutes ago, evortex said:

Also: If I enter a new key in the workflow prefrences (just to be sure), it is still using the "old" key.


What exactly do you mean by this? Are you editing the default value in the configuration builder? Don’t, that should be left empty. But yes, even if doing that it would still use the key set in the correct place, that’s working as intended.


As per above, that error message is not in the workflow, it’s being returned by OpenAI themselves. Make sure you’re not using an old or invalid key or pasting extra stuff. That’s an issue which can only be solved from your side.

Link to comment

When I first got this error from OpenAI, I logged in and generated a new API key (just to be sure). I entered this new key in the field "OpenAI API Key:" (as seen in my screenshot). Interestingly enough it still comes up with the error message referring to the first api key. I can see it, because the keys start with a total different number-letter-combination.




So, for whatever reason: Looks like the key actually isn't updated after being changed. Therefore I wanted to know where the settings are actually saved, in which config-file.


Sorry for bothering you :(

Link to comment

  1. Remove the workflow. 
  2. Try to use it. This step is important to make sure you don’t have e.g. some duplicate copy that you’re calling.
  3. Install it again, from the Gallery page. Make sure it’s version 2024.3 and that the configuration field for the key is empty.
  4. Add your API key to the configuration field.
  5. Try again.

What do you get now? If you’re still getting a notice with the old key after that you may have to contact OpenAI. Maybe they’re correlating both keys and sending an incorrect message. But the workflow only uses whatever string in pasted into the configuration, nothing else.

Link to comment
17 minutes ago, evortex said:

I repeated all the steps above.


And just to be sure: on step 2 you got no results?

Had another idea: Try setting the API key to something obviously wrong, like fake_key. What do you get then when using the workflow?

Link to comment

Even after revoking the key and entering the new one into the preference pane, the error message is the same. It keeps referring to the original API-Key. I tried the new key in "MacBot" and my ChatGPT-Shortcut and the key itself works just fine.

Link to comment

Are you syncing your preferences? Because the only other thing that occurs to me would be that your sync service would be mangling the file and reverting to an old version. Perhaps try setting your sync folder to somewhere local and repeating the process. Also, as a last resort you can try editing the prefs.plist file directly in a text editor. I don’t recommend this because that is managed by Alfred but you could inspect it as a last resort.

Ultimately, there’s something specific about your macOS set up or OpenAI account that is causing the issue, and that’s what you need to figure out. The workflow isn’t doing anything weird, it uses the most basic tried-and-true methods for configuration that have been in place for a long time.

Link to comment

No, I'm not using any sync-services except iCloud.


I checked the prefs.plist file and it looks like this:


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">


So… The value is correct (the intentionally wrong key), but the error message still refers to the long gone old key:




Interesting, isn't it?


I will uninstall and re-install the Workflow and Alfred 5.

Link to comment

Hello there,


I'm using this workflow and have some problem. I'm pretty sure my API key is copy correctly, and the resposne is always CONNECTION STALL. Within the Alfred workflow debug window, it says constantly till it reach 5 seconds time limits, then return the final connection stall.

[23:39:20.752] ChatGPT / DALL-E[Text View] Script with argv 'tell me the time' finished
[23:39:20.760] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true}}


I'm pretty sure the internet is good as I can connect to OpenAI API directly with my browser. How should i solve it? Any suggestion?

Link to comment

@evortex I just had a thought. After changing the key did you try asking a new question? Because if not, you’re just seeing the old message that was part of the conversation. You have to try to get something new. Use ⌘↩ to clear the chat.

Link to comment

Yes, of course. I tried it but I still can't get it to work. If you want, I could set up a Zoom call so you can see for yourself. Send me an e-mai if you you would like to o this.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...