Skip to content

Issue with configuring Hugging Face credentials for local n8n #15246

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Pei-Jie8888 opened this issue May 9, 2025 · 18 comments
Open

Issue with configuring Hugging Face credentials for local n8n #15246

Pei-Jie8888 opened this issue May 9, 2025 · 18 comments
Labels
in linear Issue or PR has been created in Linear for internal review Needs Feedback Waiting for further input or clarification.

Comments

@Pei-Jie8888
Copy link

Bug Description

Hi there,

I’m trying to use a Hugging Face model in n8n, but I’m unable to set up the credentials successfully.

I obtained my Hugging Face token (which begins with hf_) and pasted it into the API Key field under Hugging Face credentials in n8n. However, when I save it, I receive the error message: “Couldn’t connect with these settings. More details.” Even after clicking the “Retry” button, the same error persists.

I found that others have encountered the same issue when using n8n locally. However, I’m not sure if it’s caused by running n8n on localhost. I’ve tried updating n8n, but the problem persists.

Does anyone knows how to resolve it?

Here are some related discussions:

Image

To Reproduce

  1. Get the API token from the hugging face.
  2. Create hugging face credentials.
  3. Copy the API token from the hugging face and pasted it into the API Key field under Hugging Face credentials in n8n.
  4. Click the save button and get the error message.
  5. Click Retry button still get the same error message.

Error Message: Couldn’t connect with these settings More details

Expected behavior

Able to set up the Hugging Face credentials without any issues.

Operating System

Windows 11

n8n Version

1.91.3

Node.js Version

22.14.0

Database

SQLite (default)

Execution mode

main (default)

@Joffcom
Copy link
Member

Joffcom commented May 9, 2025

Hey @Pei-Jie8888,

We have created an internal ticket to look into this which we will be tracking as "GHC-1922"

@Joffcom Joffcom added the in linear Issue or PR has been created in Linear for internal review label May 9, 2025
@anazkhan
Copy link

anazkhan commented May 9, 2025

I am also facing the same error. Kindly help me fix this.

Image

@Davulz
Copy link

Davulz commented May 15, 2025

Any estimate on when this will be fixed? OR a workaround that works?

@sandeep231004
Copy link

Same Issue

Image

@Pei-Jie8888
Copy link
Author

Looks like we need to wait for N8N to fix the problem.

@barl0g
Copy link

barl0g commented May 18, 2025

I'll wait too

@DamusAI
Copy link

DamusAI commented May 19, 2025

Also having this issue - confirmed the key is valid and does work, just not inside of n8n node. Commenting to bump up so n8n can fix

@tgenaitay
Copy link

Watching for resolution :)

@FrankMarkwort
Copy link

Hallo n8n-Team,

ich habe beim Einrichten der Hugging Face Credentials in n8n einen neuen interessanten Wert entdeckt, der bei fehlerhafter API-Key-Übernahme auftaucht: _n8n_BLANK_VALUE. Das sieht so aus, als ob n8n intern den Key versehentlich durch einen Platzhalter ersetzt, was die Verbindungsprobleme verursacht.

Vielleicht hilft dieser Hinweis bei der Fehlerbehebung und der Validierung von Credential-Feldern.

@FrankMarkwort
Copy link

WORKAROUND

{{ "hf_xxxxxxx" }}

@barl0g
Copy link

barl0g commented May 22, 2025

WORKAROUND

{{ "hf_xxxxxxx" }}

Could you expand your thought?

@FrankMarkwort
Copy link

FrankMarkwort commented May 22, 2025

Workaround für n8n-Fehler bei Hugging Face API Key:
Wenn man den API-Key eingibt und speichert, wird er beim erneuten Öffnen des Eingabefensters als "n8n_BLANK_VALUE_xxxxx " angezeigt – der ursprüngliche Key ist dann verloren.
Lösung: Statt den Key direkt ins Feld zu schreiben, nutze Expression Mode und gib ihn als festen String im JS Format ein:
{{ "hf
..." }}
So bleibt der Key erhalten.

@jakerios
Copy link

Workaround für n8n-Fehler bei Hugging Face API Key: Wenn man den API-Key eingibt und speichert, wird er beim erneuten Öffnen des Eingabefensters als "n8n_BLANK_VALUE_xxxxx " angezeigt – der ursprüngliche Key ist dann verloren. Lösung: Statt den Key direkt ins Feld zu schreiben, nutze Expression Mode und gib ihn als festen String im JS Format ein: {{ "hf..." }} So bleibt der Key erhalten.

I tried this and it seems to pull the API key correctly, but wont allow me to do anything. i get the "error fetching blob" message whenever running an embedding node

@barl0g
Copy link

barl0g commented May 23, 2025

Workaround für n8n-Fehler bei Hugging Face API Key: Wenn man den API-Key eingibt und speichert, wird er beim erneuten Öffnen des Eingabefensters als "n8n_BLANK_VALUE_xxxxx " angezeigt – der ursprüngliche Key ist dann verloren. Lösung: Statt den Key direkt ins Feld zu schreiben, nutze Expression Mode und gib ihn als festen String im JS Format ein: {{ "hf..." }} So bleibt der Key erhalten.

Excellent! It works!

@schrothbn
Copy link
Contributor

Hello everyone,
The proposed workaround will only skip the credential test but as @jakerios pointed out there are more issues. The underlying problem is that Huggingface updated their API and SDK. Langchain is currently adjusting to it, we will adjust the nodes as soon as they release the fixes on their side. Their PR can be tracked here: langchain-ai/langchainjs#8237

@Joffcom Joffcom added the Needs Feedback Waiting for further input or clarification. label May 23, 2025
@Oceaneyes123
Copy link

I also have same issue. Any fix?

@jakerios
Copy link

jakerios commented Jun 3, 2025

Nope, looks like we're still waiting on Langchain who has not posted any updates in a while according to the PR linked by @schrothbn above

@jakerios
Copy link

jakerios commented Jun 4, 2025

The issue I'm facing and what I believe many others are is that I am using the HuggingFace embedding model, and as of right now n8n does not support an HTTP node for embedding. This makes it basically impossible to run a RAG agent with a HuggingFace model as of right now with the current issues. Hopefully this can be resolved soon, its been over a month now facing this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in linear Issue or PR has been created in Linear for internal review Needs Feedback Waiting for further input or clarification.
Projects
None yet
Development

No branches or pull requests

13 participants