n8n-nodes-firebase-realtime-db
v0.2.29
Published
A better Firebase Realtime Database node for n8n
Readme
Firebase Realtime Database for n8n
Community node that makes working with Google Firebase Realtime Database simple from n8n. It supports reading, creating, updating, setting, and deleting data, with typed value inputs, optional query parameters, atomic (ETag) writes, and convenient return modes.
Install
- In n8n, go to: Settings → Community Nodes → Install
- Package name:
n8n-nodes-firebase-realtime-db
Credentials
This node reuses the built-in credential:
Google Firebase Realtime Database OAuth2(googleFirebaseRealtimeDatabaseOAuth2Api)
Scopes typically required:
https://www.googleapis.com/auth/firebase.databasehttps://www.googleapis.com/auth/userinfo.email
Parameters (common)
- Database URL: Base URL of your database (no trailing slash), e.g.
https://your-db.firebaseio.comorhttps://your-db-default-rtdb.firebaseio.com - Path: JSON path inside the database, e.g.
/users/123(leading slash allowed)
Operations
Get
Reads data at the given path.
- Query (optional collection):
Order By(string)Equal To(string)Start At(string)End At(string)Limit To First(number)Limit To Last(number)Shallow(boolean)
Note: Order By, Equal To, Start At, and End At are automatically JSON-encoded as required by the Firebase REST API.
Push (POST)
Creates a new child under the path with an auto-generated key.
Body source:
- Use Input Item JSON (boolean): when enabled, the incoming item’s
jsonis used as the request body. - Otherwise, use Fields (repeatable) to build the JSON object:
Key(string)Value Type(options): Auto, String, Number, Boolean, Array, Object, Server Timestamp- Typed value input matching the chosen type (e.g.,
Value (String),Value (Number), etc.)
Return:
- Default: Firebase response
- Key Only (Push): returns
{ key: <generatedKey> } - Silent (No Body): adds
print=silentto reduce payload
Set (PUT)
Replaces the value at the path.
- Body source: same as Push (Use Input Item JSON or Fields)
- Atomic Write (ETag) (optional):
ETag Source: Auto Fetch or From Input (ETag)Max RetriesandRetry Delay (ms): on HTTP 412 (precondition failed), re-fetch ETag and retry
- Return: Default or Silent
Update (PATCH)
Updates one or more properties at the path.
- Body source: same as Push (Use Input Item JSON or Fields)
- Supports dot-path keys for nested updates
- Atomic Write (ETag) (optional): same as Set
- Return: Default or Silent
Delete (DELETE)
Removes the value at the path.
- Return: Default or Silent
Examples
1) Push a new user and return the key
- Operation: Push
- Path:
/users - Fields → Add:
- Key:
name, Value Type: String, Value (String):Alice - Key:
createdAt, Value Type: Server Timestamp
- Key:
- Return: Key Only (Push)
Result: { key: "-Nx..." } stored under item.json.firebase.
2) Update lastLogin with server time
- Operation: Update
- Path:
/users/123 - Fields → Add: Key:
lastLogin, Value Type: Server Timestamp
3) Get users by age with a limit
- Operation: Get
- Path:
/users - Query → Add Parameter:
- Order By:
age - Equal To:
30 - Limit To First:
10
- Order By:
Notes & Tips
- Keys in Fields can be dot-paths (e.g.,
profile.name) to target nested values. - For multi-location updates, use Update with appropriate dot-path keys.
- Use Silent return to reduce bandwidth when you don’t need the response body.
- For conditional/transactional-style writes, enable Atomic Write (ETag) on Set/Update.
Development
Local scripts:
npm run lint– lint the nodenpm run build– compile TypeScriptrelease-patch.ps1– PowerShell helper to lint → build → version patch → publish
License
MIT
