ToolJet connects to your Cloud Firestore using JSON key of your GCP service account. Get your service account key as JSON from GCP console. For generating a new key, check out [Firestore's official documentation](https://cloud.google.com/iam/docs/creating-managing-service-account-keys#iam-service-account-keys-create-console).
Once you have the key, open it in a text editor and copy the contents. Paste the contents in the **Private key** field of the Firestore data source modal.
Click on **Test connection** button to verify if the key is valid. Click on **Save** button to save the data source.
Use this operation to query all the documents in a collection. Check firestore doc [here](https://firebase.google.com/docs/reference/js/v8/firebase.database.Query).
#### Required parameters:
- **Path**: Enter the name of the collection to be queried. Example: `books`
#### Optional parameters:
- **Order type**: Select ascending or descending from the dropdown.
- **Limit**: Maximum number of documents to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request. The Limit value should be of integer type.
- **Field, Operator, and Value**: For filtering the results, you can enter a document field name, use appropriate operator from the dropdown and set a value.
Use this operation for updating the existing document in a collection. Also, it only updates fields if they exist, but doesn't replace an entire object like [set operation](#set-document).
#### Required parameters:
- **Path**: Enter the path of the document in a collection. Path format: `collection name/document id`. ex: `books/33243dwe2332`
- **Body**: Enter the Field names and their values in json form. example body:
This operation replaces your chosen object with the value that you provide. So if your object has 5 fields, and you use Set operation and pass object with 3 fields, it will now have 3 fields.
#### Required parameters:
- **Path**: Enter the path of the document in a collection. Path format: `collection name/document id`. ex: `books/33243dwe2332`
- **Body**: Enter the Field names and their values in json form. example body: