Resources · n8n integration

n8n Embeddings Hugging Face Inference nodeConfigure Embeddings Hugging Face Inference in n8n.

Retrieval only works when the text has been turned into vectors first. The n8n Embeddings Hugging Face Inference node does that job, with 2 parameters and no main input of its own. It attaches to the Embeddings port of a root node, and it fits teams putting their own documents behind an assistant.

Verified Trustpilot reviews · AI, automation & growth agency

Why automate

What does the n8n Embeddings Hugging Face Inference node do?

The node calls the Hugging Face Inference service to turn a piece of text into an embedding, that is a list of numbers that places the text in a space where similar meanings sit close together. It never runs on its own: it is a sub-node, a small node you attach to a bigger one instead of wiring it into the main flow, and the bigger node asks it for vectors when it needs them.

The first scenario is indexing. A vector store node reads your documents, hands each chunk of text to this node, and stores the vector it gets back. Nothing visible happens in the canvas, yet that pass is what makes a later question answerable. The catalogue counts 2 parameters on the node, which says how little there is to configure once the credential exists.

The second is answering. A root node queries the same store, embeds the incoming question through this node, and compares it with what was indexed. The rule that trips people up is simple: the text you index and the question you ask must go through the same model, so the Model Name you set here has to match the one used at indexing time. Two different models produce vectors that cannot be compared.

The third is cost control at the edge of a chain. Embedding a short question is cheap compared with a full model call, which is why a semantic cache sits in front of an AI Agent and checks whether a similar question was already answered. The public template 10887 wires exactly that with a Redis Vector Store, an OpenAI Chat Model and this node.

When would another sub-node suit better? If your chat model already comes from a provider you pay for, say OpenAI, keeping the embeddings on that same provider means one credential instead of two. Pick this node when you want a Hugging Face model, your own inference endpoint, or a provider chosen explicitly through the Options collection.

Two limits are worth knowing before you build. The node is at version 1 and exposes nothing beyond the model name and its options: no batch size, no dimension setting, no retry control. And because it has no main input, you cannot test it by clicking it alone, you run the root node and watch what the store receives. Teams who want a second opinion on the platform itself can read the n8n review, and the n8n training covers the vector store chain end to end.

Connect

What do you connect before the node runs?

  1. 01

    Create the Hugging Face credential

    Open the Credentials menu in n8n and add the Hugging Face credential the node asks for. n8n stores it once and every workflow on the instance can reuse it, so a second embedding node later needs no new setup. The account behind that credential is what the Hugging Face Inference service bills, according to its own terms; n8n adds nothing on top.

  2. 02

    Select it on the node

    Drop the node on the canvas from the Embeddings port of your root node, then pick the credential in the field at the top of the panel. The node has no authentication selector of its own, so there is one choice to make and nothing else. A credential left empty stops the root node at run time rather than the sub-node, which is why the error often points one node too far.

  3. 03

    Run one document through it

    Before indexing a whole folder, send a single item into the root node and check that the store holds a vector afterwards. It is the cheapest way to catch a credential that was saved but never selected, or a model name typed with the wrong casing. Once that pass is clean, the same branch handles the rest of the documents without further changes.

Connections

Where does the node attach?

n8n AI workflows follow a root and sub-node model: a root node sits in the main flow and receives the items, while sub-nodes hang off its ports, one type of sub-node per port. This node has no main input at all, only the output below.

Output (what it plugs into)

  • Embeddingsai_embedding
01EmbeddingsThis is the connection the node exists for. The root node asks it for vectors, both when it stores text and when it searches, and the node answers without ever appearing in the main line of the workflow.

This is the connection the node exists for. The root node asks it for vectors, both when it stores text and when it searches, and the node answers without ever appearing in the main line of the workflow.

Key parameters

  • Required: a root node with an Embeddings port, otherwise the sub-node has nothing to answer to and stays inert on the canvas.
Use cases
a Default Data Loader chunks a PDF, the store calls this node for each chunk, and an agent answers questions from what was indexed.
Parameters

Which parameters do you actually set?

The Embeddings Hugging Face Inference node has 2 parameters. For each one: the node as you configure it in n8n, what the parameter changes, and our field notes.

01

Model Name

modelName

What you see in n8n

Notes & use cases

This field names the model to use from the Hugging Face library. It decides how the text is turned into vectors, so keep it identical between the branch that indexes and the branch that searches.

Key parameters

  • Model Name: the model name to use from the Hugging Face library, typed as a string, or pulled from an earlier node with {{ $json.model }} when a workflow has to switch models per client.
Use cases
a support base indexed once with a chosen model, then queried every day by an agent that uses the same value.
02

Options

options

What you see in n8n

Notes & use cases

Options is the collection you open with Add Option when the default call is not enough. Left closed, the node calls the Hugging Face Inference service with the model name and nothing else, which covers most indexing branches.

Key parameters

  • Custom Inference Endpoint: the URL of a model you deployed on Hugging Face; once it is set, n8n ignores Model Name and calls that endpoint.
  • Provider: picks who serves the inference, from hf-inference to groq, together, cohere or replicate, with auto leaving the choice open.
Use cases
a team with a private model behind its own endpoint points the node at that URL and keeps the rest of the chain untouched.
Need help

Need help automating Embeddings Hugging Face Inference with n8n?

A person reads every message.

FAQ

Questions people ask next

01Is the Embeddings Hugging Face Inference node included in n8n?
Yes. It ships inside the n8n AI package, so it is there on n8n Cloud and on a self-hosted instance alike, with nothing to install and no extra charge from n8n. Self-hosting runs on Docker or npm under the Community Edition and its Sustainable Use licence, and a workflow behaves the same way in both setups. What does get billed sits on the other side: the Hugging Face Inference service charges its own API calls under its own terms, and embedding a large document library means a lot of calls. Nothing in the node changes that, it only decides which model receives the text.
02What do you need for it to work?
A Hugging Face credential, created once in the Credentials menu of n8n and then reusable across every workflow on the instance. The node has no authentication selector, so there is no method to pick, just the credential to attach. You also need a root node with an Embeddings port, because this is a sub-node: it has no main input, never runs on its own, and only answers when a vector store or a chain asks it for vectors. If a run fails with nothing produced, check the credential first, then check that the sub-node is actually attached to the port and not just sitting next to it.
03What are the limits of this node?
It stays deliberately small. The catalogue lists version 1 with 2 parameters, a model name and an options collection holding Custom Inference Endpoint and Provider. There is no batch size, no dimension setting and no retry option to tune from the panel. It also cannot be tested alone, since it has no main input: you execute the root node and read what reached the store. One more constraint comes from embeddings themselves rather than from n8n, the model used to index and the model used to search have to match, so changing Model Name on a populated store means indexing that content again.
04What do you plug the n8n Embeddings Hugging Face Inference node into?
Into the Embeddings port of a root node, which in practice means a vector store or a chain that stores and retrieves text. Starting with Simple Vector Store keeps the first test short, since nothing outside n8n has to be provisioned before you see whether indexing worked. Once the branch is proven, swapping in Supabase Vector Store or Redis Vector Store changes where the vectors live without touching this node. On the query side, the same sub-node is reused by the root node that serves an agent, so one embedding configuration covers both indexing and searching.
05n8n or Make for this kind of AI workflow?
The honest answer is that it depends on three things. Hosting comes first: n8n runs on your own server through Docker or npm as well as on n8n Cloud, while Make is hosted only, so documents that cannot leave your infrastructure point one way. Cost model comes second, Make bills per operation, which an embedding pass over a document library multiplies quickly. Data control comes third, and it is usually the one that decides for regulated teams. Make remains pleasant to build in visually, and plenty of workflows never touch either constraint.
Hack'celeration Lab

Get our weekly integration tips.

No spam. Unsubscribe anytime.