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

# n8n

> Connect n8n workflow automation to Myrmex with an API key — create the key and add the integration.

import { Note, Steps, Step, CardGroup, Card, Tip } from '@mintlify/components';

Connect **n8n** so Myrmex can work with your automation workflows. Myrmex operates the n8n REST API live using an API key — reading and acting on demand, with nothing stored on the Myrmex side. For a self-hosted n8n on your private network, reach it through a [Collector](/documentation/agent-endpoint-security/collector-mode).

## What Myrmex Can Do

<CardGroup cols={2}>
  <Card title="Inspect workflows" icon="diagram-project">
    List workflows and review their configuration on demand.
  </Card>

  <Card title="Check executions" icon="list-check">
    Look up execution history and status when you ask.
  </Card>

  <Card title="Trigger automation" icon="play">
    Run workflows as part of an automated response — with approval, via [Hydra](/documentation/multi-agent-system/integration-specialist-agent).
  </Card>

  <Card title="Orchestrate" icon="link">
    Connect n8n automations to your other integrations.
  </Card>
</CardGroup>

## Before You Start

* Your n8n **base URL** (for example `n8n.your-domain.com`).
* An n8n account that can create an **API key**.
* A **Collector** if the n8n instance is on your private network.

## Step 1 — Create the API Key in n8n

n8n authenticates with an API key that Myrmex sends in the `X-N8N-API-KEY` header.

<Steps>
  <Step title="Sign in to n8n">
    Log in with an account that can manage API keys.
  </Step>

  <Step title="Open the API settings">
    Go to **Settings → n8n API**.
  </Step>

  <Step title="Create and copy the key">
    Create an API key, label it (for example `Myrmex`), and copy it — keep it somewhere safe.
  </Step>
</Steps>

<Tip>
  You can revoke or rotate the key from the same screen at any time.
</Tip>

## Step 2 — Add the Integration in Myrmex

From the **Directory**, choose **Add Integration → n8n**, then fill in:

| Field           | Description                                                                                         |
| --------------- | --------------------------------------------------------------------------------------------------- |
| **Name**        | A unique name for this n8n instance.                                                                |
| **Description** | Optional note to identify it.                                                                       |
| **API Token**   | The API key from Step 1.                                                                            |
| **Protocol**    | `https` (default).                                                                                  |
| **URL**         | The n8n host (for example `n8n.your-domain.com`).                                                   |
| **Port**        | API port (default `443`).                                                                           |
| **Collector**   | Optional [Collector](/documentation/agent-endpoint-security/collector-mode) for a private instance. |

<Note>
  The authentication type (`api-key`) and header name (`X-N8N-API-KEY`) are preset for this connector — you only provide the key itself.
</Note>

## Connect

Click **Connect** to validate the connection and finish. n8n then appears under **Environment → Integrations**. New to integrations? See the [Integrations overview](/documentation/integrations/overview).
