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

# n8n

> Installing the ChatNorris community node for n8n: credentials, operations and trigger.

ChatNorris publishes an **n8n-verified node** for [n8n](https://n8n.io) (`n8n-nodes-chatnorris`, [open source](https://github.com/ChatNorris/n8n-nodes-chatnorris), MIT). It works on n8n Cloud and on self-hosted instances. Unlike Zapier —where you build the logic piece by piece against a handful of triggers and one action—, the n8n node covers almost all of the API v2: agents, messages, conversations, leads and knowledge base, with real pagination and date filters.

> [!NOTE]
>
> Requires an API key with access to the API v2 — available on the **Standard** and **Premium** plans (see [Introduction to the API](https://docs.chatnorris.ai/en/api-referencia/introduccion.md)).

***

## Install the node

**From the nodes panel (n8n Cloud and recent self-hosted versions):**

1. In a workflow, open the nodes panel (**+** button).
2. Search for **ChatNorris**: it appears as a verified node.
3. Click **Install**. You need to be an owner or admin of the n8n instance.

**From Settings (self-hosted):**

1. Go to **Settings → Community Nodes → Install**.
2. Enter the package name: `n8n-nodes-chatnorris` and confirm.

More details in the [n8n documentation on community nodes](https://docs.n8n.io/integrations/community-nodes/installation/).

***

## Set up the credential

1. In ChatNorris, go to **Settings → API Keys** and create a key.
2. In n8n, create a credential of type **ChatNorris API**.
3. Paste the key into **API Key**. The **Base URL** field defaults to `https://app.chatnorris.ai` — you only change it if you use your own environment.
4. The credential always authenticates with `Authorization: Bearer <key>` and is tested against `GET /api/v2/project`.

### Permissions each operation uses

| Operation | Scope |
| - | - |
| Chatbot: Get / Get Many · Knowledge Source: Get Many · agent dropdown | `chatbots:read` |
| Message: Send | `chat:write` |
| Conversation: Get / Get Many / Get Messages · Trigger “New Conversation” | `conversations:read` |
| Lead: Get / Get Many · Trigger “New Lead” | `leads:read` |
| Knowledge Source: Add / Delete / Resync | `chatbots:write` |

API keys created in **Settings → API Keys** have full access (`*`), so they cover all these operations: you don't need to choose permissions.

***

## “ChatNorris” node (actions)

| Resource | Operations |
| - | - |
| Chatbot | Get, Get Many |
| Message | Send — `message`, optional `conversation_id` (to continue an existing conversation) and optional attachment. Returns `reply` and `conversation_id` |
| Conversation | Get, Get Many (filters: agent, status, *Created After*, *Order By*), Get Messages |
| Lead | Get, Get Many (filters: agent, *Created After*) — includes `channel`, `contact_properties` and `custom_fields` |
| Knowledge Source | Get Many, Add (URL, text or FAQ), Delete, Resync |

* List operations support **Return All** or **Limit**, with automatic pagination (100 items per page) — no need to build a manual loop.
* The *Send Message* attachment has to be a URL returned by `POST /api/v2/chatbots/:id/attachments` (uploading the file is a previous step, not something this node handles on its own).
* There's no operation to update a lead: the API v2 doesn't expose that endpoint yet.

### Use it as an AI agent tool

The “ChatNorris” node can be connected as a **tool** of an n8n *AI Agent* node. That way an n8n agent can, for example, look up today's leads or send a question to your ChatNorris agent and use its reply. Keep in mind that the API key has full access to your organization: use a dedicated key for that flow, so you can delete it independently.

***

## “ChatNorris Trigger” node (polling)

Events: **New Lead** and **New Conversation**, with an optional agent filter.

* It uses `created_after` and stores a cursor in the workflow's static data. It goes through all the pages needed on each poll so nothing is missed between one query and the next, and it deduplicates by `id`.
* It emits items from oldest to newest.
* The first time you activate the workflow, the trigger only records the starting point —it doesn't emit the whole existing history.
* A manual “Execute step” returns the most recent item, useful for mapping fields without waiting for the next real poll.
* **New Conversation** also includes conversations created through the API itself (`api` channel), for example those started by the *Send Message* operation.

***

## Example workflows

* **New lead → CRM or internal chat alert:** `ChatNorris Trigger (New Lead)` → your CRM or Slack, using `{{$json.email}}` and `{{$json.contact_properties.company}}`.
* **Reply from another channel:** `Webhook` → `ChatNorris (Message → Send)` → reply with `{{$json.reply}}`, saving the `conversation_id` to continue the thread in the next message.
* **Keep the knowledge base up to date:** `Schedule` → `ChatNorris (Knowledge Source → Add, URL)` to index a page every week.

***

## See also

* [Introduction to the API](https://docs.chatnorris.ai/en/api-referencia/introduccion.md) — authentication, scopes and response format.
* [Zapier](https://docs.chatnorris.ai/en/api-referencia/zapier.md) — a lighter, no-code alternative for triggers and sending messages.
* [Node repository on GitHub](https://github.com/ChatNorris/n8n-nodes-chatnorris) — source code, changelog and development guide.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.