index/delete FormID 20303
Permanently delete an index and every document it contains. This operation is irreversible — all data in the index is lost. Routes to the error port if the index does not exist.
When to Use
- Data retention policy: A scheduled workflow identifies time-series indices older than a defined retention window (e.g.
app-logs-*older than 90 days) and deletes them to reclaim storage. - Environment teardown: A CI/CD or test-environment cleanup workflow deletes all indices provisioned for a test run once the run completes.
- Full re-index: When changing mappings incompatibly (Elasticsearch does not support mapping changes on existing indices), delete the old index, recreate it with updated mappings via
index/create, and re-populate it withdocument/create. - Tenant offboarding: A tenant's data is purged — delete all tenant-specific indices as part of the offboarding workflow.
index/get before this node to verify you have the correct index name, especially when the name is built from an expression. Never use wildcard expressions in automated deletion workflows without an explicit confirmation gate.
Configuration
Connection
| Field | Required | Description |
|---|---|---|
Host | Required | Elasticsearch cluster URL, e.g. https://localhost:9200. |
Username | Optional | Elasticsearch username (required if security is enabled). |
Password | Optional | Password for the specified username. |
IgnoreSSL | Optional | Default false. Skip TLS validation. Development use only. |
Operation
| Field | Required | Description |
|---|---|---|
IndexName | Required | The exact name of the index to delete. Supports BizFirst expressions for dynamic names, e.g. {{ $json.indexName }}. Double-check the resolved value before executing in production. |
Validation Errors
| Error Code | Cause |
|---|---|
VAL_MISSING_INDEX_NAME | IndexName is empty. |
Output
Success Port
Returns the Elasticsearch delete index response confirming the deletion. The response includes an acknowledged: true field when the cluster has confirmed the index is removed.
Error Port
Fires when the index does not exist (404), authentication fails, or the configured user lacks delete permissions. The error output contains errorCode and message fields.
{{ $output.deleteIndex.errorCode }} to distinguish "not found" from other failures.
Examples
Delete a Specific Index
{
"resource": "index",
"operation": "delete",
"IndexName": "temp-import-staging"
}
Deletes the temporary staging index after a data import workflow completes. Connect the success port to a completion notification node.
Retention Policy — Delete Old Log Index
{
"resource": "index",
"operation": "delete",
"IndexName": "{{ $json.indexName }}"
}
Used inside a loop node iterating over indices returned by index/getMany. The outer workflow filters indices by name pattern and age, then passes each to this delete node. Only process indices you have explicitly identified as safe to delete.
Re-Index Pattern — Delete Before Recreate
{
"resource": "index",
"operation": "delete",
"IndexName": "products"
}
Step 1 of a re-index workflow: delete the existing index. Connect the success port to an index/create node with updated mappings. Connect the index/create success port to a document/create bulk node to re-populate with fresh data. Always validate the new mappings in a non-production environment first.