Resources · n8n integration

Google Cloud Firestore n8n integrationAutomate Google Cloud Firestore with n8n.

Where does a workflow put the records it just processed? The Google Cloud Firestore n8n integration answers that with 7 operations spread over 2 resources: write, read, query and delete documents, and list root collections. No trigger node here, so the workflow starts somewhere else.

Verified Trustpilot reviews · AI, automation & growth agency

Why automate

What does the Google Cloud Firestore n8n integration do?

Google Cloud Firestore is Google's document database, and the n8n node talks to it directly: 7 operations across 2 resources, Document and Collection. You create, read, update and delete documents, list the root collections of a database, or send a raw structured query, without writing client code.

Firestore has no trigger node in n8n, so a workflow starts from something else: a Schedule Trigger that fires at a fixed interval, an n8n Webhook (a URL another service calls), or the trigger of another app.

Take a signup flow. A form or an app posts to an n8n Webhook, a Code node cleans the payload, and document.upsert writes it to a users collection keyed by the signup id. Run the same workflow twice on the same person and you still have one document, because upsert updates instead of duplicating. A Slack message at the end tells the team a new account landed.

Second scenario, the nightly export. A Schedule Trigger wakes the workflow, document.getAll pulls a collection with Return All enabled, and the items go to Google Sheets for the people who live in spreadsheets. Swap the destination for Postgres or Supabase when the data has to land in SQL for reporting.

Third, a lookup inside a bigger automation. Someone replies to an email, the workflow needs the customer record, and document.get returns it by id. When the id is unknown, document.query takes a structured query in JSON and filters on a field instead.

Reach for the HTTP Request node when the operation is not in this list. It calls any Firestore endpoint and reuses the same credential through predefined authentication, so nothing extra to set up. Batch writes, index management or anything the node does not expose goes there.

Two limits worth knowing before you build. There is no event stream: a document changed in Firestore will not wake n8n by itself, polling on a schedule is the way. And document.query expects raw structured query JSON, not a friendly filter builder, so keep the Firestore query syntax at hand. If you want a guided tour of the whole builder, the n8n training covers it.

Connect

How do you connect Firestore to n8n?

  1. 01

    Create the credential in n8n

    Open the Credentials menu and pick the Google Cloud Firestore OAuth2 credential (googleFirebaseCloudFirestoreOAuth2Api). A credential is stored once and reused by every workflow, and the node offers it in a dropdown. On n8n Cloud, Managed OAuth2 is the short path: click Sign in with Google and nothing else is needed in the Google Cloud Console.

  2. 02

    Build the OAuth client in Google Cloud Console

    Self-hosted instances go through Custom OAuth2. Create a Google Cloud project, enable the APIs, then configure the OAuth consent screen with an App name and a User support email. Under Branding, add n8n.cloud as an authorized domain, or your own instance domain. Then go to Credentials, Create credentials, OAuth client ID, application type Web application, and paste the OAuth Redirect URL from your n8n credential into Authorized redirect URIs.

  3. 03

    Or authenticate with a service account

    The node also accepts a Service Account credential (serviceAccount), useful when no human should sit in the OAuth flow. In the console: Credentials, Create credentials, Service account, fill Service account name and Service account ID, then open the Keys tab and choose Add key, Create new key, JSON. Open the downloaded file, copy client_email into Service Account Email and private_key into Private Key, without the surrounding quote marks.

Actions

The 7 operations of the Firestore node

The Google Cloud Firestore node exposes 7 operations across 2 resources. For each one: the node as you configure it in n8n, the required fields, and our field notes.

Resources × operations matrix
ResourceCreateGetGet ManyDeleteQueryCreate or Update
Document
Collection

Document

6 operations
01

Create a document

document.create

What you see in n8n

Notes & use cases

Writes a new document into a collection and returns what Firestore stored. Each listed attribute becomes a field.

Key parameters

  • Project Name or ID: the project as displayed in the firebase console URL, from the list or from an expression, the n8n syntax that reads a field of the incoming item ({{ $json.projectId }}).
  • Database: the database to write to, usually the provided default value.
  • Collection: the collection that receives the document.
  • Columns / Attributes: the attributes to save, for example productId, modelName, description.
  • Document ID: optional. Empty, Firestore generates an id; filled, it keeps your own key.
Use cases
logging each processed order as its own document, keyed by the order reference.
02

Create or update a document

document.upsert

What you see in n8n

Notes & use cases

One call covers both cases: the document is created when it does not exist, updated when it does. A workflow that runs twice on the same record leaves one document, not two.

Key parameters

  • Project Name or ID: same project picker as the other operations.
  • Database: the target database, usually the provided default value.
  • Collection: the collection holding the documents to upsert.
  • Update Key: the field of the input item that carries the document ID, documentId for instance. It decides create against update.
  • Columns /Attributes: the columns to insert, such as age, city, location.
Use cases
keeping a customer profile in sync on every CRM update.
03

Delete a document

document.delete

What you see in n8n

Notes & use cases

Removes one document from a collection. Firestore deletes by path, so the operation needs the exact id, not the value of a field inside the document.

Key parameters

  • Project Name or ID: the Firestore project, chosen in the list or built from an expression.
  • Database: the database that holds the collection.
  • Collection: the collection name.
  • Document ID: the id of the document to remove, often {{ $json.documentId }} from an earlier node.
Use cases
honoring a deletion request by removing the user document once the rest of the workflow has archived what it needs.
04

Get a document

document.get

What you see in n8n

Notes & use cases

Reads a single document back and hands its fields to the next node. Nothing is written, which makes it the safe way to check a record before acting on it.

Key parameters

  • Project Name or ID: the project shown in the firebase console URL.
  • Database: the database to read from.
  • Collection: the collection to look into.
  • Document ID: the id to fetch. A required field blocks the node when it comes in empty, so guard it with an If node.
  • Simplify: on, n8n returns a flat version of the document instead of the raw typed payload.
Use cases
pulling a subscription record before a support reply, to quote the right plan.
05

Get many documents

document.getAll

What you see in n8n

Notes & use cases

Pulls the documents of one collection as a list of items, one item per document, ready for a loop or an export.

Key parameters

  • Project Name or ID: the Firestore project.
  • Database: the database that contains the collection.
  • Collection: the collection to read.
  • Return All: on, n8n walks the API pages until every document of the collection is in. Off, it stops at Limit.
  • Limit: the maximum number of documents returned when Return All stays off.
  • Simplify: returns the documents in their simplified shape rather than the raw response.
Use cases
a nightly export of a collection to a spreadsheet, with Return All on so nothing is cut off.
06

Query a document

document.query

What you see in n8n

Notes & use cases

Runs a query against your documents and returns the ones that match, which beats fetching a whole collection and filtering it in a Code node.

Key parameters

  • Project Name or ID: the project the query runs against.
  • Database: the database holding the data.
  • Query JSON: the query to execute, in Firestore structured query syntax, for example {"structuredQuery": {"where": {"fieldFilter": {"field": {"fieldPath": "age"},"op": "EQUAL", "value": {"integerValue": 28}}}, "from": [{"collectionId": "users-collection"}]}}. The collection is named inside the query itself, not in a separate field.
  • Simplify: trims the response to the document fields.
Use cases
listing the accounts on one plan before a targeted email.

Collection

1 operation
07

Get many collections

collection.getAll

What you see in n8n

Notes & use cases

Lists the root collections of a database, so a workflow can discover what exists instead of hardcoding collection names.

Key parameters

  • Project Name or ID: the project whose collections you want.
  • Database: the database to inspect, usually the provided default value.
  • Return All: on, every root collection comes back. Off, the node stops at Limit.
  • Limit: how many collections to return when Return All is off.
Use cases
an audit workflow that lists the collections of a project, then loops over each one to count documents.
Need help

Need help automating Google Cloud Firestore with n8n?

A person reads every message.

FAQ

Google Cloud Firestore and n8n, common questions

01Is the Google Cloud Firestore n8n integration free?
Yes on the n8n side. The Google Cloud Firestore node ships with n8n, so there is nothing to install and nothing extra to pay for the node itself. It behaves the same on n8n Cloud, the hosted offer, and on a self-hosted instance running through Docker or npm under the Community Edition and its Sustainable Use license. A workflow built in one place runs in the other without changes. What Google charges for Firestore usage is a separate matter, billed by Google on your project, and it depends on how much your workflows read and write.
02What credentials does the Firestore node need?
Two methods are supported. OAuth2 is the recommended one and the easier to set up: n8n Cloud users can click Sign in with Google for Managed OAuth2, while a self-hosted instance needs a Custom OAuth2 app, which means a Google Cloud project, an OAuth consent screen, and an OAuth client ID of type Web application whose Authorized redirect URIs contain the redirect URL shown in the n8n credential. The second method is a Service Account: create it in the console, download the JSON key, then paste client_email as Service Account Email and private_key as Private Key. A credential is created once and reused by every workflow that touches Firestore.
03What are the limits of the Firestore node?
The node exposes 7 operations on 2 resources, Document and Collection. Documents can be created, upserted, fetched one by one or in bulk, queried and deleted; collections can only be listed at root level. Anything else, batch writes or index work for example, goes through the HTTP Request node, which reaches any Firestore endpoint and reuses the same credential via predefined authentication. Two practical points: when Return All stays off, the node stops at Limit and you get a partial collection, and the Query operation takes raw structured query JSON, so the filter has to be written in Firestore syntax rather than picked in a dropdown.
04Can n8n react to a change in Firestore in real time?
Not directly. Firestore has no trigger node in n8n, so nothing wakes a workflow when a document changes in the database. Two ways around it. Either a Schedule Trigger runs at a fixed interval and reads the data with Get many documents or Query, comparing what came back with what the workflow already knows; or the change is announced by whatever wrote it, which calls an n8n Webhook, a URL your workflow exposes, and the workflow then writes to Firestore itself. Workflows that start from another app's trigger, a form or a CRM, work the same way.
05n8n or Make for Google Cloud Firestore?
It comes down to hosting and cost model. Make is hosted only and billed per operation, which is comfortable when you never want to run a server, and less comfortable when a workflow writes thousands of documents a day. n8n runs on its Cloud offer or on your own machine through Docker or npm, so the data path between your workflow and your Firestore project can stay inside your infrastructure, which matters when the documents hold customer records. Visual logic differs too: n8n mixes the canvas with code nodes when a payload needs reshaping. Both connect to Firestore, the choice is about where the workflow lives.
Hack'celeration Lab

Get our weekly integration tips.

No spam. Unsubscribe anytime.