Automate Google Cloud Firestore Document Management with n8n

This n8n workflow automates creating, updating, and retrieving documents in Google Cloud Firestore, saving you time and reducing manual errors when managing your database documents.
manualTrigger
set
googleFirebaseCloudFirestore
Workflow Identifier: 1444
NODES in Use: Manual Trigger, Set, Google Cloud Firestore
Automate Firestore docs with n8n

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

What This Workflow Does

This workflow automates making, changing, and getting documents in Google Cloud Firestore.
It solves the problem of doing these steps by hand, saving time and avoiding mistakes.
When started, it creates a new document with set data, gets its ID, updates it, and then gets the updated data.
This way, users get correct and fresh document info without doing manual work.


Tools and Services Used

  • n8n: Runs the automated workflow and nodes.
  • Google Cloud Firestore: Stores and manages the documents.
  • Google Firebase Cloud Firestore OAuth2 Credentials: Handles secure access to Firestore.

Inputs, Processing Steps, and Output

Inputs

  • User triggers workflow manually.
  • Initial data: id = 1, name = “n8n”.

Processing Steps

  1. The workflow creates a Firestore document with the input data.
  2. It gets the document ID from the created document.
  3. The workflow updates the document using the ID with a new name value “nodemation”.
  4. Finally, it retrieves the updated document to confirm changes.

Output

  • Return of the updated Firestore document data.

Beginner Step-by-Step: Using This Workflow in Production

Importing the Workflow

  1. Download the workflow file using the Download button on this page.
  2. Inside the n8n editor, click on Import from File and select the downloaded file.

Configuring After Import

  1. Add Google Firebase Cloud Firestore OAuth2 Credentials in n8n credentials manager.
  2. Update projectId, collection names, or fields if the default ones don’t fit.
  3. Check expressions especially for document ID to match correct node names.

Testing and Activation

  1. Run the workflow manually once using the Manual Trigger node to test.
  2. Verify the new and updated documents appear correctly in Google Cloud Firestore.
  3. When testing is successful, activate the workflow in n8n for production use.
  4. For hosting on own server, consider self-host n8n solutions.

Customization Ideas

  • Change document fields in the first Set node; add fields like email or status.
  • Modify the update data by changing or adding fields in the second Set node.
  • Make collection name dynamic using expressions based on workflow input.

Troubleshooting Common Issues

  • 401 Unauthorized Firestore Errors: Usually caused by wrong or expired OAuth2 credentials. Fix by re-authenticating in n8n credential manager.
  • Document ID Not Found on Update: Check the expression {{$node["Google Cloud Firestore"].json["_id"]}} is correct and matches node names exactly.

Pre-Production Checklist

  • Ensure Firestore API is enabled for the Google Cloud project.
  • Verify OAuth2 credentials have required permissions.
  • Test the workflow manually and check Firestore documents.
  • Confirm project and collection IDs are set correctly in all Firestore nodes.
  • Backup Firestore data if used in production before running workflow.

Additional Notes

You can switch the trigger from manual to webhook for automatic execution.

Each run uses Firestore read and write ops; monitor your usage to control costs.

To handle many documents, use Loop or SplitInBatches nodes in n8n.


Summary

✓ Automates creation, update, and retrieval in Firestore.
✓ Removes manual copying and error risk.
✓ Saves hours of work every week.
✓ Runs inside n8n with simple trigger.
✓ Can be customized and extended easily.


Automate Firestore docs with n8n

Visit through Desktop to Interact with the Workflow.

Author
Written By
Vikash Kumar
Building AI agents, n8n workflows and end-to-end automation for 30+ Brands across India, the US, Europe, Dubai & Australia. 7+ years of Experience saving founders real hours every week - no code required.
Author
Written By
Vikash Kumar
Building AI agents, n8n workflows and end-to-end automation for 30+ Brands across India, the US, Europe, Dubai & Australia. 7+ years of Experience saving founders real hours every week - no code required.

Related Workflows

Automate Twist Channel Creation and Messaging with n8n

This workflow automates creating and updating a channel in Twist and sending a personalized message to specific users. It eliminates manual setup errors and saves time managing Twist communications.

Automate Ideogram Image Generation with Google Sheets & Gmail

This workflow automates graphic design image generation via Ideogram AI, storing image data in Google Sheets and Google Drive, with email alerts via Gmail. It saves designers hours by automating image creation, remixing, review, and record-keeping.

Automate IT Support with Slack and OpenAI in n8n

Streamline IT support by automating Slack message handling using n8n and OpenAI. This workflow handles Slack DMs, filters bots, queries a Confluence knowledge base, and delivers AI-generated responses, improving support efficiency and response time.

Automate Crypto Analysis with CoinMarketCap & n8n AI Agent

Discover how this unique n8n workflow leverages CoinMarketCap’s multi-agent AI to deliver precise, real-time cryptocurrency insights directly via Telegram. Manage crypto data analysis efficiently with automated multi-source API integration.

Automate Gumroad to Beehiiv Subscriber Sync with n8n

Learn how to automatically add new Gumroad sales customers as Beehiiv newsletter subscribers using n8n automation. This workflow saves time by syncing sales data to Google Sheets CRM and notifying your Telegram channel instantly.

Generate On-Brand Blog Articles Using n8n and OpenAI

This workflow automates the creation of on-brand blog articles by analyzing existing company content using n8n and OpenAI. It extracts article structures and brand voice to produce consistent draft articles, saving significant content creation time.
1:1 Free Strategy Session
Your competitors are already automating. Are you still paying for it manually?

Do you want to adopt AI Automation?

Every hour your team does repetitive work, you're burning real money.
While you wait, faster businesses are cutting costs and moving quicker.
AI and automations aren't the future anymore — they're the present.

Book a live 1-on-1 session where we show you exactly which of your daily tasks can be automated — and what it’s costing you not to.