Pocketbase (Beta) Trigger icon

Pocketbase (Beta) Trigger

Handle Pocketbase events via SSE (Beta)

Pocketbase (Beta) Trigger

AI-generated

Overview

This node acts as a trigger for Pocketbase events using Server-Sent Events (SSE). It listens for changes in a specified Pocketbase collection and triggers workflows based on create, update, or delete events. This is useful for automating processes that depend on real-time data changes in Pocketbase collections, such as syncing data, sending notifications, or updating external systems.

Use Case Examples

  1. Trigger a workflow when a new record is created in a Pocketbase collection to send a welcome email.
  2. Trigger a workflow when a record is updated to synchronize changes with another database.
  3. Trigger a workflow when a record is deleted to clean up related data in other services.

Properties

Name Meaning
Collection Name The name of the Pocketbase collection to watch for changes.
Events The types of events to trigger the node on, including create, update, and delete.

Output

JSON

  • __action - The type of event action (create, update, delete) that triggered the node.
  • id - The unique identifier of the record involved in the event.
  • collectionId - The ID of the collection where the event occurred.
  • collectionName - The name of the collection where the event occurred.
  • created - Timestamp when the record was created.
  • updated - Timestamp when the record was last updated.
  • * - All other fields from the Pocketbase record involved in the event, with sensitive fields redacted in logs.

Dependencies

  • Pocketbase HTTP API credential for authentication and connection URL.

Troubleshooting

  • Connection failures to the Pocketbase SSE endpoint may occur; the node attempts automatic reconnection with exponential backoff up to 50 attempts.
  • Parsing errors of SSE messages may happen if the data format is unexpected; sensitive data is redacted in error logs to protect privacy.
  • If maximum reconnection attempts are reached, the node will emit an error and stop trying to reconnect.

Links

Discussion