# Firestore

### Supported destination services

{% hint style="info" %}
Learn more about all of our Destination service types on our [Core Concepts page](/core-concepts.md).
{% endhint %}

DinMo supports syncing User models (or segments) and associated fields to **Firestore Documents**.

Refer to these two documentation pages for detailed guidance on setting up an activation with your connected Firestore platform:

* [Export Audiences](/integrations/destination-platforms/firestore/export-audiences.md)
* [Create and update Collection Documents](/integrations/destination-platforms/firestore/create-and-update-collection-documents.md)

### Connect Firestore to DinMo

There are two ways to connect your Firestore integration to DinMo:

**Option 1: Direct Firestore Access**

* Recommended for teams already using Firebase or Firestore directly.
* Requires generating and uploading a JSON service account key directly from your Google Cloud Console.
* The service account must have the **Cloud Datastore User** role.

<figure><img src="/files/Hd71WuzHQtQyZ2lp89dU" alt=""><figcaption></figcaption></figure>

**Option 2: Access via Google Cloud Platform (GCP)**

* Suitable for teams managing Firestore through a broader GCP setup.
* Requires generating and uploading a JSON service account key from your GCP console.
* The service account must have the **Cloud Datastore User** role.

Follow these steps to successfully connect your Firestore platform to DinMo:

**1. Prerequisites**

Ensure you have appropriate permissions in your Google Cloud Platform (GCP) project.

* Log in to your [Google Cloud Console](https://console.cloud.google.com/).
* Navigate to **IAM & Admin > Service Accounts**.
* Verify you have permission to create or manage service accounts with the role **Cloud Datastore User**.
* If you lack the required permissions, contact your GCP admin.

**2. Set Up Firestore and Generate Credentials**

* In your GCP console, navigate to **Firestore** and ensure your database is running in **Native mode**.
* Collect the **database name** and the **documents collection** that you want DinMo to use for your activations.
*

```
<figure><img src="../../../.gitbook/assets/image (425).png" alt=""><figcaption></figcaption></figure>
```

* Navigate to **IAM & Admin > Service Accounts**.
* Select an existing service account or create a new one with Firestore permissions.
* Click on the service account, navigate to the **Keys** tab, and generate a new JSON key.
* Download the generated JSON key file and store it securely.

**3. Connect Firestore as a Platform in DinMo**

* In DinMo, navigate to the **Destinations** section from the navigation bar.
* Click "Add a new destination".
* Select "Connect a new platform" and choose **Firestore**.
* Enter a recognizable name for your platform connection.
* Upload the JSON key file you downloaded from your GCP account.
* Enter your Firestore Project ID and (optionally) specify the database name if not using the default.
* Save the connection.

Your Firestore platform is now connected to DinMo!

To proceed, refer to the dedicated destination options to initiate your first Firestore activation.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.dinmo.io/integrations/destination-platforms/firestore.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
