- Home
- Resources
- Integrations
- Elasticsearch
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
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.
How do you connect Elasticsearch to n8n?
- 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.
- 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.
- 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 }}.
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.
Operations index
Document
5 operationsCreate a document
document.createWhat 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.
Delete a document
document.deleteWhat 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.
Get a document
document.getWhat 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.
Get many documents
document.getAllWhat 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:directionpairs.
Update a document
document.updateWhat 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.
Index
4 operationsCreate an index
index.createWhat 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.
Delete an index
index.deleteWhat 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.
Get an index
index.getWhat 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.
Get many indices
index.getAllWhat 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.
Need help automating Elasticsearch with n8n?
A person reads every message.


