Integrations
Elasticsearch
Index documents into Elasticsearch
Elasticsearch Integration
The Elasticsearch node allows you to push data directly from your Nodes2Cloud workflows into your Elasticsearch cluster for search and analytics.
How to get credentials
This node authenticates using an API Key.
- Log in to your Kibana dashboard.
- Navigate to Stack Management → Security → API keys.
- Click Create API key.
- Give it a name and assign the necessary privileges (e.g.,
writeprivileges to the target index). - Copy the generated Base64 encoded API Key.
- In Nodes2Cloud, create an Elasticsearch credential and paste this key.
1. Elasticsearch: Index Document
What the node does
Indexes a JSON document into a specific Elasticsearch index. If the index does not exist, Elasticsearch will typically create it automatically (depending on your cluster settings).
Options / Fields
- Credential: Your Elasticsearch API Key.
- Endpoint URL: The full HTTPS URL to your Elasticsearch cluster (e.g.,
https://my-deployment.es.us-east-1.aws.found.io). Do not include the index path here. - Index: The name of the Elasticsearch index where the document should be stored (e.g.,
logs,users). - Document (JSON): The actual data you want to index, formatted as a JSON object. Note that
{{ }}expressions are not resolved inside this field. You must use a Set node or Code node upstream to build your dynamic JSON object, and pass it in here. - Document ID: (Optional) If you provide a Document ID, the node will perform an idempotent upsert (
PUT /index/_doc/id). If left blank, Elasticsearch will auto-generate an ID and always create a new document (POST /index/_doc). - Refresh: (Optional) Controls when the indexed document becomes visible to search requests. Setting this to
Wait For Refreshensures it is searchable immediately before the node finishes executing, but may slow down indexing speed. - Routing: (Optional) A custom shard-routing key, if your index is sharded by a specific field other than
_id. - Ingest Pipeline: (Optional) The name of an ingest pipeline to process the document before indexing.
- Write Timeout: (Optional) Sets a custom timeout for the request (e.g.,
30s).
How to set it up
- Select your Credential and provide the Endpoint URL and Index.
- Supply the Document payload as a JSON object.
- Determine if you want Elasticsearch to generate the ID or if you want to explicitly define it via Document ID.
- The output will be the Elasticsearch receipt acknowledging the operation (e.g.,
{"result": "created", "_id": "..."}).
Common Troubleshooting
- Authentication Failed: Ensure you copied the entire Base64 encoded string from Kibana, not just the ID.
- Variables inside Document not resolving: The Document field expects strict JSON, so
{{ expressions }}inside the JSON string won't work. Instead, format your data in an upstream node (like a "Set" node) and map the entire JSON object into the field. - Self-Hosted Clusters refusing connection during testing: If you are running Nodes2Cloud Cloud and testing the workflow against a self-hosted Elasticsearch cluster running on
localhostor an internal network, the test run will fail. You must deploy the workflow to a worker that has network access to the cluster.
