Resources · n8n integration

Elasticsearch n8n integrationAutomate Elasticsearch with n8n.

Your search index is only as fresh as the pipeline that feeds it. The Elasticsearch n8n integration gives you a node with 9 operations across 2 resources, documents and indices, so a workflow can index, update, read or drop data on a schedule you control.

Verified Trustpilot reviews · AI, automation & growth agency

Why automate

What does the Elasticsearch n8n integration actually do?

The Elasticsearch node ships inside n8n and talks to an Elasticsearch deployment over its API, using a basic auth credential built from a username, a password and the deployment base URL. It covers 2 resources. On documents it can create, get, get many, update and delete. On indices it can create, get, get many and delete. That is 9 operations, with no plugin to install on either side.

Scenario one, a searchable mirror of a business table. A Schedule Trigger reads the new rows of a Postgres table every night, and document.create pushes each row into an index with Bulk Create turned on, so several documents go through the bulk operation instead of one request each. Search stays close to the source and nobody exports a file by hand.

Scenario two, a document that follows its object. When a support ticket changes state earlier in the workflow, document.update rewrites the stored fields for that Document ID, and document.get reads the result back before the branch continues. The same shape works for a catalog item enriched from MongoDB or a customer record pulled from MySQL.

Scenario three, index housekeeping. index.getAll lists what already exists, index.create opens a dated index with its Mappings and Settings, and index.delete removes the oldest one. A rotation job like that runs on a schedule and never asks anyone to open a terminal.

Where the node stops is easy to describe. Searching happens through the Query option of Get Many, written in Elasticsearch Query DSL, and the node exposes documents and indices only. Anything outside those 2 resources is outside the list of 9 operations. For those calls, the HTTP Request node reaches any endpoint of the Elasticsearch API and reuses the same credential through predefined authentication, which keeps the username and password in one place.

One more thing to plan around: this node has no trigger, so nothing here reacts on its own to a change made inside Elasticsearch. The workflow starts elsewhere, from a Schedule Trigger at a fixed interval, from an n8n Webhook (a URL another service calls) or from the trigger of another app, and the Elasticsearch node then does the writing or the reading. If you are still comparing platforms before committing, the n8n review covers that ground.

Connect

How do you connect Elasticsearch to n8n?

  1. 01

    Create the Elasticsearch credential

    In n8n, open the Credentials menu and add an Elasticsearch credential. The node supports basic auth only, so what you need is a Username and a Password from an Elasticsearch account that already has a deployment. A credential is created once and reused by every workflow, which is why the node offers it later in a dropdown instead of asking again.

  2. 02

    Copy the deployment endpoint

    The third field is the Base URL, the endpoint of your Elasticsearch application. In Elasticsearch, go to Deployments, select your deployment, then Manage this deployment. In the Applications section, copy the endpoint shown for the Elasticsearch application and paste it into n8n as the Base URL. No other field is involved.

  3. 03

    Pick the resource in the node

    Drop an Elasticsearch node on the canvas and select the credential from its list. Choose the resource, Document or Index, then the operation. Every operation except Get Many on indices asks for an Index ID, and n8n stops the execution when a required field is left empty, so point it at a fixed name or at an expression such as {{ $json.index }}.

Actions

The 9 operations of the Elasticsearch node

The Elasticsearch node exposes 9 operations across 2 resources. For each one: the node as you configure it in n8n, the required fields, and our field notes.

Resources × operations matrix
ResourceCreateGetGet ManyUpdateDelete
Document✓✓✓✓✓
Index✓✓✓✓

Document

5 operations
01

Create a document

document.create

What you see in n8n

Notes & use cases

Indexes a new document into an existing index, and returns the identifier Elasticsearch assigned to it.

Key parameters

  • Index ID: the index that receives the document, often {{ $json.index }} when the name comes from an earlier node.
  • Data to Send: Auto-Map Input Data to Columns sends the incoming item as it arrives when its properties already match the document fields, while Define Below for Each Column lets you set each Field Name and Field Value by hand.
  • Bulk Create: uses the bulk operation to create several documents in one go.
Use cases
feeding a search index from a nightly database export, one document per row.
02

Delete a document

document.delete

What you see in n8n

Notes & use cases

Removes one document from an index. The deletion is targeted: the index itself stays in place with everything else it holds.

Key parameters

  • Index ID: the index that contains the document to delete.
  • Document ID: the exact identifier of the document, not a field value that happens to read like a title.
  • Bulk Delete: switches to the bulk operation when a single run has to clear several documents.
Use cases
dropping the indexed copy of a record archived upstream, so search results stop pointing at something that no longer exists.
03

Get a document

document.get

What you see in n8n

Notes & use cases

Reads a single document by identifier and hands its stored fields to the next node.

Key parameters

  • Index ID and Document ID: both required, they locate the document precisely, without any search involved.
  • Simplify: trims the response. Easier to map downstream than the raw payload.
  • Source Includes and Source Excludes: comma-separated lists of source fields to keep or to leave out of the response.
Use cases
checking the indexed version of a product sheet before deciding whether an update is worth sending.
04

Get many documents

document.getAll

What you see in n8n

Notes & use cases

Searches one index and returns the documents that match, which is the only search entry point of the node.

Key parameters

  • Index ID: the index to search in.
  • Query: the query itself, written in Elasticsearch Query DSL, for example { "query": { "term": { "user.id": "john" } } }.
  • Return All: on, n8n walks the pages of the API and brings back every hit; off, Limit caps the number of documents returned.
  • Sort: a comma-separated list of field:direction pairs.
Use cases
exporting every order document of a given status into a report.
05

Update a document

document.update

What you see in n8n

Notes & use cases

Rewrites the fields of a document that already exists, leaving the rest of the index untouched.

Key parameters

  • Document ID: the document to modify, usually carried from the node that found it.
  • Fields to Send: the list of fields to write, each one a Field Name and a Field Value.
  • Refresh: True refreshes the affected shards so the change is visible to search right away, Wait For waits for a refresh, False does nothing.
  • Bulk Update: uses the bulk operation for a batch of documents.
Use cases
keeping a stock level current on an indexed product.

Index

4 operations
06

Create an index

index.create

What you see in n8n

Notes & use cases

Opens a new index, with its structure defined at creation time rather than patched afterwards.

Key parameters

  • Index ID: the name of the index to create, often built from a date in an expression.
  • Mappings: the mapping object that types the fields, such as { "mappings": { "properties": { "field1": { "type": "text" } } } }.
  • Settings: the index settings object, shard and replica counts included.
  • Aliases: the alias object that attaches one or more aliases to the index.
Use cases
creating the monthly index of an event log before the first document lands in it.
07

Delete an index

index.delete

What you see in n8n

Notes & use cases

Drops an entire index and every document inside it. There is nothing to undo afterwards, so this one belongs behind a condition or a manual approval step.

Key parameters

  • Index ID: the only field, and it expects the index name, not an alias you happen to use in your queries.
Use cases
closing a retention cycle by removing the oldest dated index once the rotation job has confirmed a newer one exists.
08

Get an index

index.get

What you see in n8n

Notes & use cases

Returns the definition of one index: its mappings, its settings and its aliases as Elasticsearch stores them.

Key parameters

  • Index ID: the index to inspect.
  • Include Defaults: on, the response also carries every default setting, useful when you are comparing two clusters.
  • Flat Settings: returns the settings in flat format instead of a nested object.
  • Ignore Unavailable: decides whether a request aimed at a missing index returns an error.
Use cases
reading the current mapping before a workflow writes a field that may not be typed yet.
09

Get many indices

index.getAll

What you see in n8n

Notes & use cases

Lists the indices of the deployment. This is the one operation that asks for no identifier at all, which makes it the natural first step of a maintenance workflow.

Key parameters

  • Return All: on, every index comes back; off, Limit sets the maximum number returned.
Use cases
listing existing indices, then looping over the result to decide which dated ones a cleanup branch should delete.
Need help

Need help automating Elasticsearch with n8n?

A person reads every message.

FAQ

Elasticsearch and n8n, the questions that come next

01Is the Elasticsearch n8n integration free?
Yes on the n8n side. The Elasticsearch node ships with n8n, so there is nothing to install and no extra cost, whether you run n8n Cloud or a self-hosted instance under the Community Edition and its Sustainable Use licence. A workflow behaves the same in both cases, which means you can build it on one and move it to the other. What Elasticsearch itself costs depends on your own deployment and is not covered here. The credential you create stays inside your n8n instance and is reused by every workflow that talks to the cluster.
02What credentials do you need for the Elasticsearch node?
Basic auth, and nothing else. The credential asks for a Username, a Password and a Base URL, which is the endpoint of your Elasticsearch application. You find that endpoint in Elasticsearch under Deployments, by selecting your deployment, opening Manage this deployment, and copying the endpoint listed in the Applications section. There is no OAuth option and no API key option on this node. One detail catches people out: n8n only connects when SSL certificate validation succeeds, so a cluster with a self-signed certificate needs the Ignore SSL Issues switch turned on in the credential.
03What are the limits of the Elasticsearch node in n8n?
The node covers 2 resources, documents and indices, for a total of 9 operations, and that is the whole surface. Reading many documents goes through Get Many with a Query written in Elasticsearch Query DSL, and Return All is what makes n8n walk every page of results instead of stopping at Limit. Anything the node does not expose stays reachable: the HTTP Request node calls any endpoint of the Elasticsearch API and reuses the same credential through predefined authentication, so you keep one set of secrets for both.
04Can n8n react in real time when a document changes in Elasticsearch?
No, because this integration has no trigger node. Nothing in n8n listens to the cluster and fires when a document is written or deleted. A workflow that involves Elasticsearch starts from something else: a Schedule Trigger that runs at a fixed interval, an n8n Webhook, meaning a URL another service calls when an event happens on its side, or the trigger of another application already in your stack. From there the Elasticsearch node reads or writes. In practice, a scheduled Get Many that compares the result with a previous run is how most teams approximate change detection here.
05n8n or Make for Elasticsearch?
It depends on where your data has to live. Make is hosted only, with no self-hosting option, and it bills by operation, so a workflow that indexes thousands of documents a night is priced by volume. n8n runs on Cloud or on your own server, which matters when the cluster sits in a private network and you would rather not send its documents through an external platform. On the visual side, both build flows on a canvas. Look at the hosting question, the data control question and the cost model first, then pick.