# How to Bring Data from Google Sheet

{% hint style="info" %}
The best way for us to make use of big chunks of information on the flow is in the form of a JSON Object. Google Sheet doesn't do that on its own, so we recommend going through an API called "Sheety".
{% endhint %}

### Step 1: Prepare your Google Sheet&#x20;

**Make the first row of your spreadsheet the header:** The first row of your sheet will be used as the header. This is the most important part of preparing your sheet, as the names you use here will be used as the property names in the returned objects. Each column in your sheet represents that property’s value.

{% hint style="info" %}
For more info on how it works click [here](https://sheety.co/docs/spreadsheet.html)
{% endhint %}

### Step 2: Get your Sheety Code

* Go to [sheety.co](https://sheety.co/)&#x20;
* Click on "Connect Google Sheet"
* Sign in with your Google Account
* Create a New Project "From Google Sheet"
* Paste the URL of your Google Sheet
* Click on "Create Project"
* Copy the example code, it should look something like this:

![](https://1421794749-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MaGcfSakhqdHaWyb0T_%2Fuploads%2FEdgxeLciAbWgaTrGWhml%2Fimage%20\(43\).png?alt=media\&token=3ca4bd56-ee06-4fdd-8c7e-fbcf4b4fdd34)

{% hint style="info" %}
Make sure to return your fetch. Even though the code that Sheety gives you looks like the above, it should actually say "return fetch(url)" and it should look like the last image on this page.
{% endhint %}

### Step 3: Create a Computed Field

* Go to the "All" Tab of the Left Sidebar
* Scroll down to the Computed Fields section and create a new one&#x20;
* Give it a cool, original name. Something like "google\_sheet"
* Scroll to the bottom of the Options Tab on the Right Sidebar
* Click on "Generate Sample Code", it will generate an empty function:

![](https://1421794749-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MaGcfSakhqdHaWyb0T_%2Fuploads%2FB7J23p70hNBv7obNP0yc%2Fimage%20\(44\).png?alt=media\&token=057f1435-7164-43ec-833e-bc921f9c229e)

* Paste the code from Sheety inside the function

![](https://1421794749-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MaGcfSakhqdHaWyb0T_%2Fuploads%2FNRR2JqrZUrar766TD1Hq%2Fimage%20\(47\).png?alt=media\&token=ddcfe144-e4c2-4dd2-8f83-a56fd2b3414f)

{% hint style="info" %}
Remember to change the code so it **returns** the JSON, or the part of the JSON that you need.&#x20;
{% endhint %}
