Actions8
Overview
This node integrates with PocketBase, a backend service for managing collections and records. Specifically, the Record - Update operation allows users to update an existing record in a specified PocketBase collection by providing the record ID and new data.
Common scenarios where this node is useful include:
- Modifying user profiles or other entities stored in PocketBase.
- Updating status or attributes of items in a database after some external event.
- Automating updates to records based on workflow logic in n8n.
For example, you might use this node to update a customer record's email address or change the status of an order after payment confirmation.
Properties
| Name | Meaning |
|---|---|
| Collection | The name of the PocketBase collection where the record exists. |
| Record ID | The unique identifier of the record to update within the specified collection. |
| Data | JSON string representing the fields and values to update in the record. |
Output
The output is a JSON object representing the updated record as returned by the PocketBase API. It contains all fields of the record after the update, including any system-generated fields like IDs or timestamps.
Example output structure (simplified):
{
"id": "recordId",
"field1": "updatedValue1",
"field2": "updatedValue2",
...
}
No binary data output is produced by this operation.
Dependencies
- Requires a valid PocketBase instance URL and authentication credentials.
- Authentication can be done via either:
- Email and password of an admin user.
- An API token.
- The node depends on the official
pocketbaseJavaScript client library (dynamically imported). - Credentials must be configured in n8n with the necessary URL and authentication details.
Troubleshooting
Authentication errors:
If the node throws errors about authentication failure or missing tokens, verify that the provided email/password or API token is correct and has sufficient permissions.Invalid JSON in Data property:
TheDatainput must be a valid JSON string. Malformed JSON will cause parsing errors. Use proper JSON formatting.Record not found:
If the specifiedRecord IDdoes not exist in the given collection, the PocketBase API will return an error. Confirm the record ID is correct.Permission issues:
Ensure the authenticated user or token has rights to update records in the target collection.Network or API errors:
Any network issues or API downtime will result in errors. Check connectivity and PocketBase server status.