Firebase Admin icon

Firebase Admin

Interact with Firebase Firestore, Auth, and Storage using Firebase Admin SDK

Firestore → Create

AI-generated

Summary

Create a new document in a specified Firestore collection path with given JSON data, supporting Firestore special field functions.

Inputs

  • Project Name or ID — Select the Firestore project to use or specify its ID via expression.
  • Path (required) — Specify the Firestore collection path where the document will be created, supporting nested collections via paths like 'collection/documentId/subcollection'.
  • Document Data (required) — Provide the JSON data to store in the new document. Supports special Firestore functions such as serverTimestamp, increment, decrement, arrayUnion, arrayRemove, delete, and vector formatting.

Output shape

a single JSON object representing the created document's data as stored in Firestore, including any server-generated fields.

The operation returns the created document data including processing of special Firestore functions. The document ID will be auto-generated by Firestore since no explicit ID input is provided.

Links

Discussion