# n8n

[**n8n**](https://n8n.io) is a workflow automation tool you can run on your own
server. The 42min community node lets a workflow react the moment someone
books, cancels or reschedules, and lets it read availability and create
bookings on your behalf.

Because n8n is self-hosted, your booking data goes from 42min straight to your
own server. It does not pass through anyone else's infrastructure.

<Callout type="tip">
Would rather an AI assistant worked with your account directly, with no workflow
to build? 42min has a built in MCP server. See
[AI assistants (MCP)](/help/ai-assistants/overview).
</Callout>

## What it does

The integration adds two nodes to n8n.

**42min Trigger** starts a workflow when something happens in your account:

- a booking is created, updated, canceled, rescheduled, or marked a no-show
- an event type is updated or deleted
- a routing form is submitted

**42min** reads and writes your account inside a workflow:

- **Bookings**: create, get, list, update, cancel, reschedule
- **Event types**: get one, or list them
- **Slots**: list bookable times over a date range, or check one specific time
- **User**: the profile the token belongs to

## Install it

1. In n8n, open **Settings → Community Nodes** and click **Install**.
2. Enter `n8n-nodes-42min` and confirm.

n8n installs the node into your own instance. It appears in the node panel as
**42min** and **42min Trigger**.

## Connect your account

The node authenticates with a personal access token, so there is nothing to
register and no redirect to configure.

1. In 42min, open [**API**](/360/api) and create a personal access token.
2. Give it the scopes the workflow needs. For everything the node offers:
   `user:read`, `event_types:read`, `slots:read`, `bookings:read`,
   `bookings:create`, `bookings:cancel`, `bookings:reschedule`,
   `bookings:update`, `webhooks:read`, `webhooks:write`.
3. In n8n, add a **42min API** credential and paste the token.
4. Click **Test** to confirm it works.

Leave **Base URL** alone unless you run a self-hosted 42min.

## What the trigger needs

Turning on a workflow with a **42min Trigger** registers a webhook subscription
automatically, and turning it off removes the subscription again. For that to
work, 42min has to be able to reach your n8n:

- n8n must be reachable at an `https://` address. Plain `http://` is refused.
- That address must resolve to a public IP. Deliveries to private ranges are
  refused.

If n8n is advertising the wrong address, set `WEBHOOK_URL` (or `N8N_PROTOCOL`
and `N8N_HOST`) and activate the workflow again.

The **42min** node has no such requirement. It only makes outbound calls, so it
works from behind a firewall even when the trigger cannot.

<Callout type="note">
Every delivery is checked against its signature before your workflow runs, and
anything that fails is rejected. Nothing else has to be configured for that: the
node stores the signing secret when it creates the subscription.
</Callout>

## Things worth knowing

**Trigger items and lookup items use the same field names.** A booking that
arrives from the trigger reads the same way as one fetched with **Get Booking**,
so you do not have to learn two names for the same thing.

**Deduplicate on `delivery_id`.** It is stable across retries. Both
`delivery_id` and `event_id` are attached to every trigger item.

**Check the slot before you book.** Use **Slot → Check** first. A time that was
free a moment ago may not be, and creating a booking sends real email and writes
to a real calendar.

**Updating a booking reads it first.** Only `metadata`, `responses` and the
attendee name can be changed. To move a booking use **Reschedule**, and to call
it off use **Cancel**.

**Get Event Type wants an ID, or a username and slug together.** A slug on its
own is not enough, because slugs are unique per user rather than per account.

## Where to look next

- The node's [README on GitHub](https://github.com/42min-us/n8n-nodes-42min)
- The [API reference](/help/api/overview), if you would rather call 42min directly
- The [webhooks reference](/help/api/webhooks), for what each event contains
