Set
AI-generatedOverview
This node operation allows users to replace the value at a specified JSON path in a Firebase Realtime Database. It is useful for scenarios where you want to overwrite existing data or set new data at a particular location in the database. For example, you can update user profile information or reset configuration settings by specifying the database URL, the path to the data, and the new data to set.
Use Case Examples
- Setting user profile data at path /users/user123 with new JSON data.
- Replacing configuration settings at path /config/appSettings with updated values.
Properties
| Name | Meaning |
|---|---|
| Database URL | Base URL of your Firebase Realtime Database (without trailing slash). Required to specify which database to connect to. |
| Path | JSON path in the database where the data will be set. Leading slash is allowed but removed internally. |
| Atomic Write (ETag) | If enabled, performs an atomic write using ETag to ensure data consistency during concurrent updates. |
| ETag Source | Determines how the ETag is obtained when atomic write is enabled. Can be auto-fetched or provided from input. |
| ETag | The ETag value to use for atomic write if the source is set to input. |
| Max Retries | Maximum number of retries for atomic write in case of ETag conflicts. |
| Use Input Item JSON | If true, uses the entire JSON object from the input item as the data to set. Otherwise, uses specified fields. |
| Return | Determines the response mode after the set operation. Options include default response, silent (no body), or key only (not applicable for set). |
Output
JSON
json- The JSON response from Firebase after the set operation, containing the updated data or status.
Dependencies
- Requires a Google Firebase Realtime Database OAuth2 API credential for authentication.
Troubleshooting
- Common issues include incorrect database URL or path, which result in request failures.
- ETag conflicts during atomic writes may cause 412 Precondition Failed errors; increasing max retries can help.
- Ensure the JSON data structure matches Firebase expectations to avoid data format errors.
Links
- Firebase Realtime Database REST API - Save Data - Official Firebase documentation on how to set data at a path using REST API.