# How to Link Microreact projects to Google Sheets

This tutorial shows how to create a Microreact project linked to data on Google Sheets. It also shows how to configure Google Sheets to automatically publish changes to the linked Microreact project. In order for Microreact to download the CSV file, you need to follow this guide to generate a download link for the CSV file of Google Sheets.

### I. Configure Google Sheets Access Settings <a href="#i-configure-google-sheets-access-settings" id="i-configure-google-sheets-access-settings"></a>

1. Upload the data file to Google Sheets or open an existing Google Sheets file.
2. Click on the `Share` button in the top right corner to change share settings.

   <img src="https://microreact.org/images/tutorials/google-sheets-share-button.png" alt="Google Sheets share button" data-size="original">
3. Click on on `Get shareable link`.

   <img src="https://microreact.org/images/tutorials/google-sheets-get-shareable-link.png" alt="Google Sheets" data-size="original">
4. Make sure that option `Anyone with the link can view` is selected.

   <img src="https://microreact.org/images/tutorials/google-sheets-anyone-can-view.png" alt="Google Sheets" data-size="original">
5. Finally click on `Done` button.

### II. Configure Google Sheets Publish Settings <a href="#ii-configure-google-sheets-publish-settings" id="ii-configure-google-sheets-publish-settings"></a>

1. Select `File` menu.
2. Click on `Publish to the web...`.

   ![Google Sheets](https://microreact.org/images/tutorials/google-sheets-publish-to-the-web.png)\\
3. Choose `Comma-separated values (.csv)`.

   ![Google Sheets](https://microreact.org/images/tutorials/google-sheets-share-type-csv.png)\\
4. Click on `Published content and settings`.

   ![Google Sheets](https://microreact.org/images/tutorials/google-sheets-published-content-settings.png)\\
5. Make sure that the option `Automatically republish when changes are made` is active.

   ![Google Sheets](https://microreact.org/images/tutorials/google-sheets-auto-republish.png)\\
6. Click on `Publish` button.

   <img src="https://92463871-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MCM3b1nzgmsPUEa2xap%2Fuploads%2Fgit-blob-6d643b679047b6ea36fa4219cf37a96b1de1f6c7%2Fimage%20(140).png?alt=media" alt="" data-size="original">
7. Finally, copy the shareable link generated by Google Sheets.

   <img src="https://microreact.org/images/tutorials/google-sheets-copy-link.png" alt="Google Sheets" data-size="original">

### III. Create Microreact project <a href="#iii-create-microreact-project" id="iii-create-microreact-project"></a>

1. Goto <https://microreact.org/upload>
2. Click on the green plus button in the bottom right corner, then select `Add URLs`

   <img src="https://92463871-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MCM3b1nzgmsPUEa2xap%2Fuploads%2Fgit-blob-3a512476c781bfd7e2c0a0c0671f5f7089f6fc09%2FScreenshot%202021-09-28%20at%2013.49.13.png?alt=media" alt="Google Sheets" data-size="original">
3. Paste the shareable link under Enter URL.

   <img src="https://92463871-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MCM3b1nzgmsPUEa2xap%2Fuploads%2Fgit-blob-fde18a338e2f30c4107384a21281d628c2447272%2FScreenshot%202021-09-28%20at%2013-53-12%20Microreact.png?alt=media" alt="Google Sheets" data-size="original">
4. Select `Data (CSV)` under File kind
5. Add more files (e.g. a Newick tree file) or click `CONTINUE` to created the project.
