Skip to content

About

n8n community nodes for Haystack Enterprise Platform: chat with AI services, AI Agent chat model, file and index management. n8n Cloud eligible.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

@deepset-ai/n8n-nodes-haystack-enterprise

This package contains n8n community nodes. They let you query AI services and manage files on a Haystack Enterprise Platform workspace from your n8n workflows.

Haystack Enterprise Platform is a platform for building production-ready AI-powered applications and managing them across the full lifecycle — from prototyping to large-scale production. You get everything you need to work with your data, choose your models, build and evaluate, share prototypes with users, and run and monitor your apps in production. It is built by deepset, the company behind Haystack, the open source AI orchestration framework.

New to Haystack Enterprise Platform? Start with the getting started guide.

n8n is a fair-code licensed workflow automation platform.

Contents

Supported n8n versions

This package supports n8n 2.16 and later in the 2.x series. We also check the package against the latest n8n release.

Installation

Follow the installation guide in the n8n community nodes documentation and enter the package name @deepset-ai/n8n-nodes-haystack-enterprise.

The package is n8n Cloud eligible and also works on self-hosted n8n.

Prerequisites

  • A Haystack Enterprise Platform account with access to a workspace.
  • Either an API key (Settings → API Keys), or an OAuth2 client set up by a Haystack Enterprise admin so you can sign in with your account (n8n 2.19.2 or later). See Credentials.

Operations

The package ships two nodes:

  • Haystack Enterprise AI — works with these resources and operations:
    • Service — Get, Get Many, List Models (Chat Completions), Chat, Chat (Streaming), Chat Completions.
    • File — Upload, Get, Get Many, Delete, Delete Many, Get Metadata, Update Metadata, Update Metadata (Bulk).
    • Index — Get, Get Many.
    • Search Session — Create, Get Many, Delete.
  • Haystack Enterprise Chat Model — a language-model sub-node for n8n's AI Agent. It runs Chat Completions on a Haystack Enterprise service, the same Service operation as on Haystack Enterprise AI. Connect it to the Agent's Model input; the Agent owns conversation history.

API reference per operation

Each operation maps to one endpoint of the Haystack Enterprise API:

Resource Operation
Service chat
Service chatStream
Service chatCompletions
Service get
Service getAll
Service listModels
File upload
File getAll
File get
File getMeta
File updateMeta
File updateMetaBulk
File delete
File deleteMany
Index get
Index getAll
Search Session create
Search Session delete
Search Session getAll

Example workflows

The example workflows are not part of the npm package. They live in the repository, in test/examples/:

  • chat-example.json — a form-triggered workflow that submits a question straight to Chat and shows the answer. The simplest example to start with.
  • chat-with-auto-created-search-session-example.json — the simplest chat workflow: leaves Search Session ID empty and lets Chat (Streaming) create one automatically, remembering the returned ID for the rest of the conversation.
  • chat-with-search-session-example.json — the same conversation-history pattern, but managing the Search Session explicitly (create/list/delete) instead of relying on auto-creation.
  • haystack-chat-model-agent-example.json — recommended for conversational chat: n8n AI Agent with Haystack Enterprise Chat Model on the Model port (deployment chat completions) and Simple Memory. Use this instead of wiring Chat Completions directly to a Chat Trigger.
  • agent-with-chat-tools-example.json — an AI Agent with two separate tool instances of this node, one running Chat for a one-off question and one running Chat (Streaming) for a conversational follow-up, so it can pick whichever fits the user's request.
  • mirror-files-in-google-drive-example.json — a nightly scheduled workflow that diffs a Google Drive folder against files already indexed in Haystack Enterprise, uploading new files, updating changed ones, deleting removed ones, and waiting for indexing to finish before reporting.

To use one, either:

  • open the file on GitHub, click Copy raw file, and paste it onto the n8n canvas (Ctrl/Cmd+V), or
  • clone the repository (git clone https://github.com/deepset-ai/n8n-nodes-haystack-enterprise.git) and, in the n8n editor, open the menu (⋮ in the top right) → Import from File and select the JSON file.

You'll still need to add your own credentials, and to set up any other service-specific nodes (for example, Google Drive) with your own credentials and settings.

Haystack Enterprise MCP companion node

Use these nodes to query services and manage files on your workspace. To give an AI Agent access to your pipelines as MCP tools, use the companion package @deepset-ai/n8n-nodes-haystack-enterprise-mcp (source). It works on self-hosted n8n only and is not n8n-verified, so it can't run on n8n Cloud.

Credentials

Both nodes (Haystack Enterprise AI and Haystack Enterprise Chat Model) have an Authentication dropdown offering two ways to authenticate. API Key is the simplest and works for most users.

API Key

  1. In Haystack Enterprise Platform, go to Settings → API Keys and generate a key. See Generate an API key.
  2. On the node, choose API Key and create a Haystack Enterprise API credential.
  3. Paste the key into the credential.

Make sure the key has permission for the workspaces and resources your workflow uses.

Using a private Haystack Enterprise deployment? Change Server URL to your API origin, for example https://api.your-company.com.

OAuth2 (sign in with your Haystack Enterprise account)

OAuth2 credentials require n8n 2.19.2 or later and an OAuth2 client created by a Haystack Enterprise admin. You can't register a client yourself, so ask your admin to create one before you start.

  1. On the node, choose OAuth2 and create a Haystack Enterprise OAuth2 API credential.
  2. Copy the OAuth Redirect URL shown on the credential and send it to your admin. They add it as a redirect URI on a new OAuth2 client. It should be a PKCE client, and a public one needs no client secret.
  3. Ask your admin for the client's Client ID, Authorization URL and Access Token URL (and the Client Secret, if the client is confidential). Enter them in the credential, set Grant Type to PKCE (don't use Client Credentials; the nodes run as a signed-in user), and leave Scope at its default.
  4. Click Connect and sign in with your Haystack Enterprise Platform account.

The nodes run as the signed-in user, with that user's workspace access and permissions.

Using a private Haystack Enterprise deployment? Change Server URL to your API origin and use an OAuth2 client registered on that deployment.

Usage

Chat and search sessions

Chat and Chat (Streaming) both take an optional Search Session ID (under Additional Fields), used to store a chat history. Leave it empty and the node starts a session automatically, returning its ID in the output's search_session_id field — feed that back into Search Session ID on the next call to continue the conversation. For a one-off question, leave it empty and ignore the returned ID. To manage sessions explicitly instead (e.g. to list or delete them later), create one with the Search Session resource's Create operation (API reference) and pass its ID in from the start.

Chat (API reference) returns one JSON result when generation finishes. Chat (Streaming) (API reference) returns the answer incrementally; with Simplify Output on, that is one item whose content is the concatenated answer.

Chat Completions (API reference) is the OpenAI-compatible alternative: you send the full conversation as messages (the client owns history — there is no search session) and get a chat.completion back. Turn Stream on (under Additional Fields) to receive OpenAI SSE chunks instead of a single JSON response. Use List Models (Chat Completions) (API reference) to discover valid model values ({workspace}/{deployment_id}) for Chat Completions in that workspace.

For multi-turn chat on an AI Agent, use Haystack Enterprise Chat Model: it runs Chat Completions on the selected service; n8n's Agent and Simple Memory build messages for you.

Using Haystack Enterprise AI as an AI Agent tool

Any operation of Haystack Enterprise AI can be connected to an AI Agent's Tool input instead of the main flow — the agent decides whether and when to call it, and with what arguments, based on the conversation.

To make a Haystack Enterprise service the Agent's language model (not just a tool), connect Haystack Enterprise Chat Model to the Agent's Model input. See haystack-chat-model-agent-example.json.

Resources

Version history

See the changelog.

Contributing

Developing or testing changes locally? See CONTRIBUTING.md. Report security issues as described in SECURITY.md.

About

n8n community nodes for Haystack Enterprise Platform: chat with AI services, AI Agent chat model, file and index management. n8n Cloud eligible.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages