Overview
This node interacts with Google Cloud Firestore, specifically focusing on document-level operations within a Firestore database. For the Read operation on the Document resource, it retrieves a single document from a specified Firestore path.
Typical use cases include:
- Fetching user profiles or settings stored as documents.
- Retrieving configuration or metadata documents for applications.
- Accessing any structured data stored in Firestore by document path.
For example, you might use this node to read a user document at path /users/user123 to get that user's details and use them downstream in your workflow.
Properties
| Name | Meaning |
|---|---|
| Project Name or ID | The Google Cloud project identifier where the Firestore database resides. |
| Path | The full path to the Firestore document to read. Example: collection/documentId/subcollection/{id}. Use exact document paths like /users/user123. |
Output
The output is a JSON object representing the Firestore document's data merged with its document ID:
id: The Firestore document ID.- Other fields: All key-value pairs stored in the document.
Example output JSON:
{
"id": "user123",
"name": "John Doe",
"email": "john.doe@example.com",
"age": 30
}
No binary data is output by this operation.
Dependencies
- Requires a valid Google Cloud Firestore API credential with access to the target project.
- The node expects the service account JSON credentials to be provided and correctly formatted.
- The Firestore client library (
@google-cloud/firestore) is used internally.
Troubleshooting
- Invalid Service Account JSON: If the service account JSON is malformed or invalid, the node will throw an error indicating the JSON is invalid. Ensure the JSON is correctly copied and formatted.
- Document Not Found: If the specified document path does not exist, the node throws an error stating the document was not found at the given path. Verify the path is correct and the document exists.
- Invalid Path Format: Paths must not start with a slash (the node removes it automatically). Also, ensure the path points exactly to a document, not a collection.
- Permission Issues: Insufficient permissions in the provided credentials can cause failures. Make sure the service account has Firestore read access.
- Continue On Fail: If enabled, errors per item are returned as JSON with an
errorfield instead of stopping execution.