> ## Documentation Index
> Fetch the complete documentation index at: https://www.algolia.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Algolia for n8n

> Automate indexing and search workflows with the Algolia node for n8n.

Use the [Algolia node for n8n](https://github.com/algolia/n8n-nodes-algolia) to manage and query your indices from any n8n workflow. Whenever data changes in your other tools, such as a CMS, database, CRM, or spreadsheet, a workflow can add, update, or delete the matching records in Algolia, without writing custom code. Workflows can also search your indices, to route content, trigger alerts, or retrieve context for AI workflows.

n8n is a workflow automation platform with a visual editor. You can use [n8n Cloud](https://n8n.io) or [self-host n8n](https://docs.n8n.io/hosting/).

## Before you begin

You need:

* An n8n instance (Cloud or self-hosted)
* On self-hosted n8n, community nodes turned on by an instance owner
* Your Algolia application ID and an [API key](/doc/guides/security/api-keys)

## Install the Algolia node

1. In the n8n workflow editor, click **+** to open the node panel.
2. Search for **Algolia**, then click **Install node**.

To install the node from the command line instead, for example when you manage a self-hosted instance, use the npm package name `@algolia/n8n-nodes-algolia`. See [Install community nodes](https://docs.n8n.io/integrations/community-nodes/installation/) in the n8n documentation.

## Connect your Algolia account

1. Add the **Algolia** node to your canvas, then click the node to open its parameters.
2. In the **Credential for Algolia API** menu, click **Create new credential**.
3. Fill in the credential fields:
   * **Application ID**: your Algolia application ID
   * **Admin API Key**: an Algolia API key with permissions for the operations you want to automate
4. Click **Save**.

The credential is stored in n8n and reused by every Algolia node in your workflows.

Despite its name, the **Admin API Key** field accepts any Algolia API key. Only the API keys and Vaults operations need your Admin API key. For indexing and search, use a key restricted to the indices and operations your workflows need.

When you save the credential, n8n tests it by listing your application's API keys, which requires your Admin API key. With any other key, the test reports an error even though the credential is saved and your workflows run with it.

## Available operations

The Algolia node covers the [Search API](/doc/rest-api/search). Pick a **Resource**, then an **Operation**.

<AccordionGroup>
  <Accordion title="Records">
    * **[Add a new record (with auto-generated object ID)](/doc/rest-api/search/save-object)**: add a record and let Algolia assign its `objectID`
    * **[Add or replace a record](/doc/rest-api/search/add-or-update-object)**: add a record, or overwrite the record with the same `objectID`
    * **[Add or update attributes](/doc/rest-api/search/partial-update-object)**: change some attributes of a record and leave the rest untouched
    * **[Retrieve a record](/doc/rest-api/search/get-object)**: get one record by its `objectID`
    * **[Retrieve records](/doc/rest-api/search/get-objects)**: get several records, from one index or from different indices
    * **[Delete a record](/doc/rest-api/search/delete-object)**: delete one record by its `objectID`
    * **[Delete records matching a filter](/doc/rest-api/search/delete-by)**: delete every record that matches a filter
    * **[Delete all records from an index](/doc/rest-api/search/clear-objects)**: empty an index but keep its settings, synonyms, and rules
    * **[Batch indexing operations on one index](/doc/rest-api/search/batch)**: add, update, or delete many records in one request
    * **[Batch indexing operations on multiple indices](/doc/rest-api/search/multiple-batch)**: the same, across several indices
  </Accordion>

  <Accordion title="Search">
    * **[Search an index](/doc/rest-api/search/search-single-index)**: run a query against one index and return the hits
    * **[Search multiple indices](/doc/rest-api/search/search)**: send several queries in one request
    * **[Search for facet values](/doc/rest-api/search/search-for-facet-values)**: find values of a facet attribute, for example to build a filter list
    * **[Browse for records](/doc/rest-api/search/browse)**: page through every record in an index
  </Accordion>

  <Accordion title="Indices">
    * **[List indices](/doc/rest-api/search/list-indices)**: list the indices in your Algolia application
    * **[Copy or move an index](/doc/rest-api/search/operation-index)**: duplicate an index, or rename it
    * **[Delete an index](/doc/rest-api/search/delete-index)**: delete an index and its settings
    * **[Retrieve index settings](/doc/rest-api/search/get-settings)**: read the settings of an index
    * **[Update index settings](/doc/rest-api/search/set-settings)**: change the settings of an index
    * **[Check task status](/doc/rest-api/search/get-task)**: find out whether an indexing task has finished
  </Accordion>

  <Accordion title="Synonyms">
    * **[Create or replace a synonym](/doc/rest-api/search/save-synonym)**: add one synonym, or overwrite it
    * **[Create or replace synonyms](/doc/rest-api/search/save-synonyms)**: add or overwrite several synonyms in one request
    * **[Retrieve a synonym](/doc/rest-api/search/get-synonym)**: get one synonym by its ID
    * **[Search for synonyms](/doc/rest-api/search/search-synonyms)**: find the synonyms of an index
    * **[Delete a synonym](/doc/rest-api/search/delete-synonym)**: delete one synonym by its ID
    * **[Delete all synonyms](/doc/rest-api/search/clear-synonyms)**: delete every synonym of an index
  </Accordion>

  <Accordion title="Rules">
    * **[Create or replace a rule](/doc/rest-api/search/save-rule)**: add one rule, or overwrite it
    * **[Create or update rules](/doc/rest-api/search/save-rules)**: add or overwrite several rules in one request
    * **[Retrieve a rule](/doc/rest-api/search/get-rule)**: get one rule by its ID
    * **[Search for rules](/doc/rest-api/search/search-rules)**: find the rules of an index
    * **[Delete a rule](/doc/rest-api/search/delete-rule)**: delete one rule by its ID
    * **[Delete all rules](/doc/rest-api/search/clear-rules)**: delete every rule of an index
  </Accordion>

  <Accordion title="Dictionaries">
    * **[Add or delete dictionary entries](/doc/rest-api/search/batch-dictionary-entries)**: change the entries of your plurals, segmentation, or stop word dictionaries
    * **[Search dictionary entries](/doc/rest-api/search/search-dictionary-entries)**: find standard and custom dictionary entries
    * **[Retrieve dictionary settings](/doc/rest-api/search/get-dictionary-settings)**: read which standard entries are turned off
    * **[Update dictionary settings](/doc/rest-api/search/set-dictionary-settings)**: turn standard entries on or off for a language
    * **[List available languages](/doc/rest-api/search/get-dictionary-languages)**: list supported languages, their dictionary types, and their number of custom entries
  </Accordion>

  <Accordion title="API keys">
    * **[List API keys](/doc/rest-api/search/list-api-keys)**: list the API keys of your Algolia application
    * **[Create an API key](/doc/rest-api/search/add-api-key)**: create a key with specific permissions and restrictions
    * **[Retrieve API key permissions](/doc/rest-api/search/get-api-key)**: read the permissions and restrictions of a key
    * **[Update an API key](/doc/rest-api/search/update-api-key)**: replace the permissions of a key
    * **[Delete an API key](/doc/rest-api/search/delete-api-key)**: delete a key
    * **[Restore an API key](/doc/rest-api/search/restore-api-key)**: restore a deleted key
  </Accordion>

  <Accordion title="Vaults">
    These operations configure the [Algolia Vault](/doc/guides/security/algolia-vault) firewall, an Enterprise add-on.

    * **[List allowed sources](/doc/rest-api/search/get-sources)**: list the IP addresses allowed to access your Algolia application
    * **[Replace allowed sources](/doc/rest-api/search/replace-sources)**: replace the whole list of allowed IP addresses
    * **[Add a source](/doc/rest-api/search/append-source)**: allow one more IP address
    * **[Delete a source](/doc/rest-api/search/delete-source)**: stop allowing an IP address
  </Accordion>

  <Accordion title="Advanced">
    * **[Retrieve log entries](/doc/rest-api/search/get-logs)**: read your application's API logs
    * **[Check application task status](/doc/rest-api/search/get-app-task)**: find out whether an application-level task has finished
  </Accordion>
</AccordionGroup>

## Build an indexing workflow

This example keeps an index in sync with content from another app. The same pattern works with any n8n trigger.

<Steps>
  <Step title="Create a new workflow">
    In n8n, create a workflow and give it a name.
  </Step>

  <Step title="Add a trigger">
    Add a [trigger node](https://docs.n8n.io/integrations/builtin/trigger-nodes/) for your data source, for example:

    * **Webhook**: your app calls n8n when content changes.
    * **Schedule Trigger** with a database or HTTP node: poll your source on an interval.
    * An app trigger such as **Airtable**, **Notion**, or **Google Sheets**: react to new or updated items.
  </Step>

  <Step title="Transform items into records">
    Add a **Set** or **Code** node to shape each item into a record. Keep only the attributes that are useful for searching, displaying, filtering, or ranking. Map the `objectID` attribute to a unique, stable identifier from your source data, such as a primary key.

    Algolia replaces a record that already has the same `objectID`, so a stable identifier means re-running the workflow updates your index instead of filling it with duplicates. For more information, see [Prepare your records for indexing](/doc/guides/sending-and-managing-data/prepare-your-data).
  </Step>

  <Step title="Send records to Algolia">
    Add the **Algolia** node and configure it:

    * **Resource**: Records
    * **Operation**: [Batch indexing operations on one index](/doc/rest-api/search/batch), which adds or replaces every item in a single API request
    * **Index name**: your destination index
  </Step>

  <Step title="Test the workflow, then turn it on">
    Run the workflow once, then inspect the new records in the [Algolia dashboard](https://dashboard.algolia.com/explorer). If the records match what you expect, toggle **Active** to run the workflow automatically.
  </Step>
</Steps>

### Handle deletions

To remove records when items are deleted at the source, add a second path or workflow that triggers on deletion and uses the [**Delete a record**](/doc/rest-api/search/delete-object) operation with the same `objectID`.

## Search from your workflows

The Algolia node isn't limited to sending data. Use the [**Search an index**](/doc/rest-api/search/search-single-index) operation to retrieve records as part of a workflow, for example:

* **Deterministic workflows**: search an index and act on the results, such as routing content, deduplicating entries, or enriching items in other tools.
* **Retrieval-augmented generation (RAG)**: search an index for relevant records and pass them as context to an LLM node, grounding responses in your own data.

### Let an AI agent choose the queries

For workflows built around n8n's **AI Agent** node, where the agent decides which tools to call, use the [Algolia Public MCP server](/doc/guides/model-context-protocol/public-mcp) instead of the Algolia node. Connect it with n8n's generic **MCP Client Tool** node. This lets agents search your indices and return recommendations, choosing their own queries and parameters at runtime.

In short: the Algolia node when your workflow defines the query, the Algolia Public MCP server when the agent does.

## Example workflows

| Workflow | What it does | Nodes |
| - | - | - |
| CMS sync | Keeps search in sync with published content | Webhook trigger → transform → batch indexing |
| Search-driven alerts | Notifies you when new records match a query | Schedule Trigger → Algolia search → filter → Slack |
| Settings promotion | Automates configuration changes | Retrieve settings from a staging index → update settings on production |
| Web content indexing | Indexes pages from a site you don't control | Schedule Trigger → a scraping node such as Firecrawl or HTTP Request → transform → batch indexing |
| RAG chatbot | Answers questions grounded in your indexed content | Chat Trigger → Algolia search → LLM node |

## Limitations

* Records have a [size limit](/doc/guides/scaling/algolia-service-limits#application-record-and-index-limits) that depends on your plan.
* Batch operations are subject to the [same limits as the API](/doc/guides/sending-and-managing-data/send-and-update-your-data#send-records-in-batches).
* n8n executions have memory limits that depend on your plan or instance configuration. For large imports, prefer an [API client](/doc/libraries/sdk/install) or [connector](/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/overview).

## See also

* [Algolia workflow templates](https://n8n.io/integrations/algolia/) in the n8n library
* [Algolia for Zapier](/doc/integration/zapier)
* [Algolia for Make](/doc/integration/make)
