OpenSearch icon

OpenSearch

Consume the OpenSearch API

Actions9

Overview

This node integrates with the OpenSearch API to update documents within a specified index. It allows users to modify existing documents by specifying the index and document IDs, then providing new data either by explicitly defining fields or by automatically mapping input data to document fields.

Common scenarios for this node include:

  • Updating records in an OpenSearch index when source data changes.
  • Synchronizing external data sources with OpenSearch documents.
  • Performing bulk updates efficiently to improve performance.

For example, you might use this node to update user profiles stored in OpenSearch after receiving updated information from another system, or to correct or enrich indexed data dynamically.

Properties

Name Meaning
Index ID The identifier of the OpenSearch index containing the document to update.
Document ID The unique identifier of the document within the index that should be updated.
Data to Send Method to provide update data:
- Define Below for Each Column: Manually specify each field and its value.
- Auto-Map Input Data to Columns: Automatically map incoming input properties to document fields.
Inputs to Ignore (Shown only if "Auto-Map Input Data to Columns" is selected) Comma-separated list of input property names to exclude from the update. Leave empty to send all input properties.
Fields to Send (Shown only if "Define Below for Each Column" is selected) A collection where each entry specifies a field name and the corresponding value to update in the document.
Options Additional options:
- Bulk Update: Whether to perform the update as a bulk operation.
- Refresh: Controls shard refresh behavior after update:
- True: Refresh immediately.
- Wait For: Wait for refresh.
- False: Do not refresh.

Output

The node outputs JSON data representing the result of the update operation(s). This typically includes metadata about the updated document such as the document ID, index, and status of the update request.

If bulk update is enabled, the output contains an array of results for each individual update operation, including any errors encountered.

No binary data output is produced by this node.

Dependencies

  • Requires an active connection to an OpenSearch instance.
  • Needs an API authentication token or key configured in n8n credentials to authorize requests to OpenSearch.
  • The node uses OpenSearch REST API endpoints to perform update operations.

Troubleshooting

  • Error: Document not found — Ensure the provided Index ID and Document ID are correct and that the document exists in OpenSearch.
  • Invalid JSON in 'Query' option — If using advanced query options elsewhere, verify JSON syntax carefully.
  • Bulk operation errors — When using bulk updates, partial failures may occur; enable "Continue on Fail" in n8n to handle these gracefully.
  • Refresh option issues — Setting refresh incorrectly can cause delays or stale data visibility; choose the appropriate refresh strategy based on your use case.
  • Authentication errors — Verify that the API key or token credential is valid and has sufficient permissions.

Links and References

Discussion