# MongoDB

1\. Go to **Workflows** and click **Create Workflow** (Before creating a new workflow, you have to [create a resource](https://docs.acho.io/acho-studio/resources/add-a-resource) first and then [import the resource to a project](https://docs.acho.io/acho-studio/data-prep-projects/create-a-project)).

<figure><img src="https://3574406564-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MB_fx7PCUqvFEdrucJC%2Fuploads%2Fkc8QjxNp8O22tStt9rCK%2Fimage.png?alt=media&#x26;token=da532f01-27da-4694-a4a1-6946b9252089" alt=""><figcaption></figcaption></figure>

2\. In Workflow, drag **MongoDB** from the right sidebar to the canvas.&#x20;

<figure><img src="https://3574406564-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MB_fx7PCUqvFEdrucJC%2Fuploads%2FkIdrRdkcQr6mOmsgDgLO%2Fmongodb.gif?alt=media&#x26;token=0c0671df-ba30-4e9d-9d16-4722f8a5ec93" alt=""><figcaption></figcaption></figure>

3\. Configure your **MongoDB** destination. (Remember to white list Acho's IP address: **`35.239.14.244`**)

* Host
* Port
* Database
* Schema
* Username
* Password

![](https://3574406564-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MB_fx7PCUqvFEdrucJC%2Fuploads%2F942ssA377U8xchsmGKDN%2Fimage.png?alt=media\&token=43df1f47-1ba1-4d6f-a70d-36854fb2ccd8)

4\. Once your MongoDB is set up successfully, the status will become <img src="https://3574406564-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MB_fx7PCUqvFEdrucJC%2Fuploads%2F7JqWiCfMaYZbaILX15Er%2Fimage.png?alt=media&#x26;token=15359abc-254d-4fc7-9623-fbd4bb426e97" alt="" data-size="line"> . Your MongoDB database will be stored in **Existing Database**, so next time you can drag it to the Workflow directly without filling out credentials.&#x20;

<figure><img src="https://3574406564-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MB_fx7PCUqvFEdrucJC%2Fuploads%2FICdhYC5RPsMGzKm301Bw%2Fimage.png?alt=media&#x26;token=e1e82450-fc76-4d97-a036-20ff0b330a16" alt=""><figcaption></figcaption></figure>

5\. Connect the table to your MongoDB database.<br>

<figure><img src="https://3574406564-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MB_fx7PCUqvFEdrucJC%2Fuploads%2F9n31fR0gZbxLbbbIrEKY%2Fimage.png?alt=media&#x26;token=7d6edbd1-44bd-4bbe-9524-cc91b364ee6a" alt=""><figcaption></figcaption></figure>

6\. Choose the **replication method** and click **Save.** When you export data to MongoDB, Acho will create a new table in your MongoDB. When your project table is updated, your table in MongoDB will be updated as well. The replication method is to determine how to update your table in MongoDB.

* **Full Refresh:** Replace your MongoDB table with the new table.<br>

  <figure><img src="https://3574406564-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MB_fx7PCUqvFEdrucJC%2Fuploads%2FD1PsYhjuXkOZ8zoY5KLF%2Fimage.png?alt=media&#x26;token=0ee1c631-0d7b-4b94-b59f-3a725fc2fbd2" alt=""><figcaption></figcaption></figure>

7\. You can set up the **Data Sync** for your project table. Once your project table is updated, new data will be exported to your database automatically.&#x20;

<figure><img src="https://3574406564-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MB_fx7PCUqvFEdrucJC%2Fuploads%2F9WtDE00YWyoYyOtjnLJz%2Fmdb_sync.png?alt=media&#x26;token=ac8e7471-6daf-442c-b66c-ebcfb0edeb98" alt=""><figcaption></figcaption></figure>
