Actions4
Update
AI-generatedOverview
This node interacts with the Pocketbase HTTP API to update an existing element in a specified collection. It is useful for scenarios where you need to modify records in a Pocketbase collection, such as updating user information, product details, or any other data stored in the collection. For example, you can update a user's profile data or change the status of an order by specifying the element ID and the fields to update.
Use Case Examples
- Updating a user's email address in a user collection by specifying the user ID and the new email field.
- Modifying the status of a task in a task management collection by providing the task ID and the updated status field.
Properties
| Name | Meaning |
|---|---|
| Element Name or ID | The identifier of the element (record) in the collection to update. Can be selected from a list or specified using an expression. |
| Parameters | Additional query parameters to control the update operation, such as pagination, filtering, sorting, expanding relations, and selecting specific fields. |
| Body Type | The format of the data to send in the update request. Options include fields, JSON body, or binary data. |
| Fields | Fields to update when using the 'Fields' body type. Allows specifying field names and values. |
| JSON Body | Raw JSON object to send in the request body when using the 'JSON Body' type. |
| Binary Property Name | Name of the binary property containing the data to send when using the 'Binary Data' body type. |
| Binary Field Name | Name of the binary field according to the collection's schema. If empty, binary data is sent as a file attachment. |
Output
JSON
id- The unique identifier of the updated element.created- Timestamp when the element was created.updated- Timestamp when the element was last updated.collectionId- Identifier of the collection the element belongs to.collectionName- Name of the collection the element belongs to.expand- Expanded related records if requested.fields- The updated fields of the element.
Dependencies
- Pocketbase HTTP API
- An API key credential for Pocketbase HTTP API
Troubleshooting
- Ensure the element ID is correctly specified; otherwise, the update will fail.
- Verify that the fields or JSON body sent conform to the collection's schema to avoid validation errors.
- Check API credentials and base URL configuration to ensure proper authentication and connectivity.
- If using binary data, ensure the binary property name and field name are correctly set to match the collection schema.
Links
- Pocketbase API - Update Record - Official documentation for updating records in Pocketbase collections.