# n8n nodes

The **Zocton nodes for n8n** (package `n8n-nodes-zocton`) let an n8n workflow work with
**Entayo CRM**: create and find contacts and companies, manage list members, and start a workflow
when a new contact or company arrives. They call the [Entayo CRM API](https://www.zocton.com/docs/developers/api) with a
Zocton API key. Other Zocton apps are not in the nodes yet.

## Install

The package is not listed on npm yet, so it cannot be installed from n8n's **Settings → Community
Nodes** list today. When it is listed, install it there by its name, `n8n-nodes-zocton`. Until then,
use the [Entayo CRM API](https://www.zocton.com/docs/developers/api) from n8n's HTTP Request node with the same key.

## Authenticate

1. On the Zocton Dashboard, make a key under **API Keys** with **Entayo CRM** set to
   **Read & change** — see [API keys](https://www.zocton.com/docs/shared/api-keys).
2. In n8n, add a **Zocton API** credential:

| Field | What to put |
|---|---|
| **Data Centre** | **Asia Pacific**, **Europe** or **North America** — where your workspace lives. |
| **API Key** | Your `zk_` key. |

n8n tests the credential against the CRM, so the key needs Entayo CRM access to pass.

## The Zocton node

Every operation has a **Project ID**: the Entayo CRM project's number. Leave it empty for the CRM's
Default project. The node can also be used as a tool by n8n's AI Agent.

| Resource | Operation | What it does |
|---|---|---|
| **CRM Contact** / **CRM Company** | **Create** | Creates a person or company from field and value pairs (at least one). |
| **CRM Contact** / **CRM Company** | **Get Many** | Finds records by search text, or in a list or segment, newest first, up to the limit you set. |
| **CRM List** | **Get Lists** / **Get Segments** | The project's lists, or its segments. |
| **CRM List** | **Add Members** / **Remove Members** | Adds or removes records in a list, by their record ids (comma-separated). |

## The Zocton Trigger

| Event | What starts the workflow |
|---|---|
| **New CRM Contact** | A person added to the project. |
| **New CRM Company** | A company added to the project. |

The trigger checks for new records on a schedule (every minute by default); it does not use
webhooks. When you first switch the workflow on, it remembers the newest record and starts from
there — nothing older is sent. A manual test run sends only the newest record.

## A worked example

Add every new contact to a "New leads" list:

1. **Zocton Trigger** — **New CRM Contact**.
2. **Zocton** — **CRM List** → **Add Members**, list "New leads", Record IDs `{{ $json.id }}`.

## Good to know

- **Use the record's `id`** for list members.
- **The list dropdown shows the Default project's lists.** For another project, put the list id in
  as an expression.
- **Get Many reads one page.** For more records, narrow the search or the list.
- **Busy projects:** each check reads the newest records only, so if very many arrive between two
  checks, the oldest of them can be missed.

## Related

- [API keys](https://www.zocton.com/docs/shared/api-keys)
- [Entayo CRM API](https://www.zocton.com/docs/developers/api)
- [Zocton MCP](https://www.zocton.com/docs/shared/mcp) — for AI apps, and for apps the nodes do not cover yet.
