docs/versioned_docs/version-2.6.0/data-sources/firestore.md
ToolJet connects to your Cloud Firestore using JSON key of your GCP service account. To generate a new key, check out Firestore's official documentation.
Once the key is downloaded, click on + button of data sources panel at the left-bottom corner of the app editor. Select Firestore from the modal that pops up. Paste the key in the field for GCP key. Click on Test connection button to verify if the service account can access Firestore from ToolJet server. Click on Save button to save the datasource.
Click on + button of the query manager at the bottom panel of the editor and select the database added in the previous step as the data source.
Select the operation that you want to perform on Firestore and click Save to save the query.
:::tip Query results can be transformed using transformations. Read our transformations documentation to see how: link :::
Use this operation to get the data in a document.
collection name/document id. ex: books/23e2wsds32Use this operation to query all the documents in a collection. Check firestore doc here.
booksOrder 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 creating a new document in a collection.
collection name/document id. ex: books/33243dwe2332{
"Author": "Shubh",
"id": 5
}
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.
collection name/document id. ex: books/33243dwe2332{
"Author": "Shubhendra",
"id": 3
}
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.
collection name/document id. ex: books/33243dwe2332{
"Author": "Shefewfbh",
"id": 9
}
Use this operation for bulk updating documents.
Use this operation for deleting a document in a collection.
collection name/document id. ex: books/33243dwe2332The Firestore query result is in the form of object so we’ll need to transform it into array.
return data = Array(data)