---
meta:
  title: "n8n + Liveblocks"
  parentTitle: "Integrations"
  description:
    "Use n8n with Liveblocks to call REST API operations and start workflows
    from webhook events."
---

n8n is a workflow automation platform. Use n8n with Liveblocks to call the
[REST API](/docs/api-reference/rest-api-endpoints) from a workflow, or start a
workflow when Liveblocks sends a [webhook](/docs/platform/webhooks).

<PromptCta />

<Figure>
  <video autoPlay loop muted playsInline height={720} width={1060}>
    <source src="/assets/n8n-nodes/n8n-nodes.mp4" type="video/mp4" />
  </video>
</Figure>

## Install

Install our nodes as a
[community node](https://docs.n8n.io/integrations/community-nodes/installation/)
in your n8n instance.

1. Open n8n and go to **Settings** → **Community nodes**.
2. Select **Install** and enter `n8n-nodes-liveblocks` as the npm package name.
3. Check **☑︎ I understand…** and click **Install**.

_Liveblocks_ and _Liveblocks Trigger_ will now appear in the node palette.

<Figure>
  <video autoPlay loop muted playsInline height={720} width={1060}>
    <source src="/assets/n8n-nodes/n8n-nodes-install.mp4" type="video/mp4" />
  </video>
</Figure>

## Start with a webhook trigger

The most common workflow starts when something happens in Liveblocks, for
example when a comment is created.

1. Add **Liveblocks Trigger** to your n8n workflow.
2. Add your **Liveblocks Webhook Signing Secret API** credential.
3. Copy the trigger's webhook URL.
4. In the [Liveblocks dashboard](/dashboard), create a webhook endpoint with
   that URL.
5. Subscribe to [`commentCreated`](/docs/platform/webhooks#CommentCreatedEvent),
   then run the n8n workflow.

When a user creates a comment, Liveblocks sends a webhook to n8n and the
workflow starts. Add more n8n nodes after the trigger to send messages, create
tickets, update databases, or call another Liveblocks operation.

## Operations

The package provides two nodes.

### Liveblocks (action node)

Calls the [Liveblocks REST API](/docs/api-reference/rest-api-endpoints). Choose
a **resource**, then an **operation**. Operations map to the API.

| Resource         | What you can do (examples)                                                                                                                                              |
| ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Room**         | List, create, update, delete, and upsert rooms; change room or organization IDs; prewarm; list active users; **set presence**; **broadcast** custom events to the room. |
| **Storage**      | Get, initialize, patch (JSON Patch), or delete Liveblocks storage documents.                                                                                            |
| **Yjs**          | Read Yjs state, send binary updates, list versions, and create or fetch specific versions.                                                                              |
| **Thread**       | CRUD threads; edit metadata; resolve/unresolve; subscribe/unsubscribe; list subscriptions and thread inbox notifications.                                               |
| **Comment**      | Create, read, edit, and delete comments; add/remove reactions; edit metadata.                                                                                           |
| **Attachment**   | Download comment attachments (binary response when applicable).                                                                                                         |
| **User**         | Identify users for Liveblocks features that require user metadata.                                                                                                      |
| **Inbox**        | Inbox notifications, notification settings, room subscription settings, mark-as-read, and related triggers.                                                             |
| **Group**        | Manage groups and membership; list a user’s groups.                                                                                                                     |
| **AI Copilot**   | List, create, read, update, and delete AI copilot configurations.                                                                                                       |
| **AI Knowledge** | Manage web and file knowledge sources, fetch markdown or links, and delete sources.                                                                                     |

The node builds requests from the fields you configure in the UI; some endpoints
accept raw JSON for advanced bodies (for example JSON Patch or broadcast
payloads). Refer to the
[REST API reference](/docs/api-reference/rest-api-endpoints) for request and
response shapes.

### Liveblocks Trigger (webhook)

Starts a workflow when Liveblocks sends a [webhook](/docs/platform/webhooks) to
n8n. Configure the webhook URL from the trigger in your
[Liveblocks dashboard](/dashboard) webhook settings. You can filter by **event
type** or leave the filter empty to receive all supported types.

Supported event filters include
[`commentCreated`](/docs/platform/webhooks#CommentCreatedEvent),
[`commentDeleted`](/docs/platform/webhooks#CommentDeletedEvent),
[`commentEdited`](/docs/platform/webhooks#CommentEditedEvent), `notification`,
[`storageUpdated`](/docs/platform/webhooks#StorageUpdatedEvent),
[`threadCreated`](/docs/platform/webhooks#ThreadCreatedEvent),
[`threadDeleted`](/docs/platform/webhooks#ThreadDeletedEvent),
[`threadMetadataUpdated`](/docs/platform/webhooks#ThreadMetadataUpdatedEvent),
[`userEntered`](/docs/platform/webhooks#UserEnteredEvent),
[`userLeft`](/docs/platform/webhooks#UserLeftEvent), and
[`ydocUpdated`](/docs/platform/webhooks#YDocUpdatedEvent). The trigger verifies
the request using your **webhook secret** before running the workflow.

## Credentials

### Liveblocks API (required for the Liveblocks action node)

1. Create or open a project in the [Liveblocks dashboard](/dashboard).
2. Copy the **secret key** (`sk_…`) from project settings.
3. In n8n, create a credential of type **Liveblocks API** and paste the secret
   key.

The credential test calls the REST API (for example listing rooms) to confirm
the key works.

### Liveblocks Webhook Secret (required for Liveblocks Trigger)

1. In the Liveblocks dashboard, open your project’s **webhook** configuration
   and copy the **webhook secret** (`whsec_…`).
2. In n8n, create a credential of type **Liveblocks Webhook Signing Secret API**
   and paste that value.

This secret is only used to verify incoming webhook signatures; it is not
validated with a live HTTP test in the credentials UI.

## Compatibility

- This package declares **`n8nNodesApiVersion` 1** in `package.json`, in line
  with current n8n community node conventions.
- It lists **`n8n-workflow`** as a peer dependency (version resolved by your n8n
  install).

Use a [current n8n release](https://docs.n8n.io/release-notes/) that supports
community nodes and API version 1. If you hit a compatibility issue, report it
with your n8n version and this package version.

## Usage

### Call a Liveblocks operation

Add **Liveblocks**, select a **resource** and **operation**, then fill in the
parameters. Map data from previous nodes into room IDs, user IDs, and request
bodies as needed.

Use **Execute step** while designing to inspect API responses and errors.

### Start from a Liveblocks event

Add **Liveblocks Trigger**, set credentials, copy the **webhook URL** into the
[Liveblocks dashboard](/dashboard), and choose which events to listen for.

Use n8n's test URL while building, then switch to the production URL when the
workflow is active.

## Troubleshooting

### API credential fails

Check that the credential uses a Liveblocks secret key that starts with `sk_`.
Use the key from the same project whose rooms, threads, or notifications the
workflow should access.

### Trigger does not run

Check that the webhook endpoint in the [Liveblocks dashboard](/dashboard) uses
the n8n trigger URL. If you are testing, use the test URL while the workflow is
listening. For active workflows, use the production URL.

### Webhook verification fails

Check that the trigger credential uses the webhook secret that starts with
`whsec_`. This is different from your Liveblocks API secret key.

### API operation fails

Failed API calls surface as n8n errors with HTTP status and message when the API
returns them. Check the selected resource, operation, room ID, user ID, and JSON
body against the [REST API reference](/docs/api-reference/rest-api-endpoints).

New to n8n? See [Try it out](https://docs.n8n.io/try-it-out/) in the n8n docs.

## Resources

- [n8n community nodes documentation](https://docs.n8n.io/integrations/#community-nodes).
- [REST API reference](/docs/api-reference/rest-api-endpoints).
- [Webhooks](/docs/platform/webhooks).
- [How to test webhooks on localhost](/docs/guides/how-to-test-webhooks-on-localhost).

## Source code

The source code is available in our
[GitHub repository](https://github.com/liveblocks/n8n-nodes-liveblocks).

---

For an overview of all available documentation, see [/llms.txt](/llms.txt).
