pocketbase-crud

Package Information

Released: 5/29/2025
Downloads: 110 weekly / 110 monthly
Latest Version: 1.0.2
Author: vietquang99

Documentation

n8n-node-pocketbase-latest

An n8n community node for PocketBase integration with comprehensive CRUD and batch operations support.

Features

  • Complete CRUD Operations: Create, Read, Update, Delete records
  • Batch Operations: Perform multiple operations in a single request
  • Advanced Filtering: Support for PocketBase filter expressions
  • Relation Expansion: Expand related fields in queries
  • Pagination Support: Handle large datasets with pagination
  • Authentication: Email/password authentication with automatic token management

Installation

Follow the installation guide in the n8n community nodes documentation.

npm

npm install n8n-node-pocketbase-latest

Manual Installation

  1. Go to Settings > Community Nodes
  2. Select Install
  3. Enter n8n-node-pocketbase-latest
  4. Agree to the risks of using community nodes

Credentials

You need to create PocketBase API credentials with the following information:

  • PocketBase URL: Your PocketBase instance URL (e.g., https://your-pocketbase-instance.com)
  • Email: Admin or user email for authentication
  • Password: Password for the account

Operations

Record Operations

Get All

Retrieve multiple records from a collection with support for:

  • Filtering using PocketBase filter expressions
  • Sorting by multiple fields
  • Pagination (page and perPage parameters)
  • Relation expansion

Get

Retrieve a single record by ID with optional relation expansion.

Create

Create a new record in a collection by providing JSON data.

Update

Update an existing record by ID with partial data (only include fields to change).

Delete

Delete a record by ID.

Batch

Perform multiple create, update, or delete operations in a single request for better performance.

Usage Examples

Get All Records with Filtering

{
  "collectionIdOrName": "posts",
  "filters": "status = 'published' && created > '2023-01-01'",
  "sort": "-created,title",
  "expand": "author,category",
  "perPage": 20,
  "page": 1
}

Create Record

{
  "collectionIdOrName": "posts",
  "data": {
    "title": "My New Post",
    "content": "This is the content of my post",
    "status": "published",
    "author": "user_id_here"
  }
}

Batch Operations

{
  "collectionIdOrName": "posts",
  "batchOperations": {
    "operationDetails": [
      {
        "method": "create",
        "data": {
          "title": "Post 1",
          "content": "Content 1"
        }
      },
      {
        "method": "update",
        "recordId": "existing_post_id",
        "data": {
          "title": "Updated Title"
        }
      },
      {
        "method": "delete",
        "recordId": "post_to_delete_id"
      }
    ]
  }
}

Filter Expressions

PocketBase supports powerful filter expressions. Examples:

  • id = "abc123" - Exact match
  • created > "2023-01-01" - Date comparison
  • status = "published" && author = "user123" - Multiple conditions
  • title ~ "search term" - Text search
  • tags ?~ "important" - Array contains

Error Handling

The node supports n8n's "Continue On Fail" option. When enabled, errors will be included in the output instead of stopping the workflow.

Compatibility

  • n8n version: 0.198.0 or later
  • PocketBase version: 0.16.0 or later
  • Node.js version: 18.10 or later

Development

Setup

git clone https://github.com/your-username/n8n-node-pocketbase-latest.git
cd n8n-node-pocketbase-latest
npm install

Build

npm run build

Lint

npm run lint
npm run lintfix

License

MIT

Support

For issues and feature requests, please use the GitHub Issues page.

Contributing

Contributions are welcome! Please read the contributing guidelines before submitting pull requests.

Discussion