
The integration between Synerise and Google Sheets opens up possibilities of exporting data collected in Synerise. By using the **Upload Data to Spreadsheet** node, you can push data from Synerise to add it in the form of a row or a column in a spreadsheet. You can use this connection in various scenarios such as exporting transactions, event data, customer information (such as marketing agreements), results of [metrics](/docs/analytics/metrics), [aggregates](/docs/analytics/aggregates/introduction-to-aggregates), [expressions](/docs/analytics/expressions/introduction-to-expressions), [reports](/docs/analytics/reports/introduction-to-reports), and many more to Google Sheets.  

During the configuration of the node, you can use [Jinjava inserts](/developers/inserts/automation) which let you dynamically refer to the profile attributes and event parameters in the workflow.


<div class="admonition admonition-important"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

This node is not optimized for batch operations that send large volumes of data (for example, updating all events for each profile). Use it to export changes within one event, profile attribute (for example, marketing agreement), analysis results, and so on.

</div></div></div>


## Prerequisites
---
- You must have an account in Google Sheets.
- Your account must have permissions to edit the spreadsheet you want to update.

## Node configuration
---
1. Click **Google Sheets > Upload Data to Spreadsheet**. 
2. Click **Select connection**.  
3. From the dropdown list, select the connection.  
   - If no connections are available or you want to create a new one, see [Create a connection](#create-a-connection).
   - If you selected an existing connection, proceed to [defining the integration settings](#define-the-integration-settings).

### Create a connection
To allow the data exchange, establish a connection between Synerise and Google Sheets.  

1. At the bottom of the **Select connection** dropdown list, click **Add connection**.  
2. On the pop-up, click **Sign in with Google**.
3. Select a Google account which has access to the spreadsheet you want to upload data to. The account must have editing permissions.
4. Follow the instructions on the interface.
5. After the successful authentication, click **Next**.  
6. In the **Connection name** field, enter the name of the connection.  
    It's used to find the connection on the list.
7. Click **Apply**.  
        **Result**: A connection is created and selected. 

### Define the integration settings
In this step, fill in the form that allows you to send data from Synerise to a table in Google Sheets.  

<figure><img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/docs/automation/_gfx/upload-data-to-spreadsheets.png" class="medium" alt="A blank configuration form in Upload Data to Spreadsheets"><figcaption>A blank configuration form in Upload Data to Spreadsheets</figcaption></figure>  


<div class="admonition admonition-note"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

Fields marked with the <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/icons/snippet-icon.png" alt="Snippet icon" class="icon" > icon accept [snippets](/docs/assets/snippets) or [inserts](/developers/inserts). This integration allows usage of profile-related inserts.

</div></div></div>


1. In the **Spreadsheet ID** field, enter the ID of the spreadsheet to which you want to upload data.  
    You can find the ID in the URL of the spreadsheet.
2. In the **Range** field, define the range of cells to which the data will be uploaded. The values will be inserted to the first empty cell available in a defined range.  
    The value in this field must be given in the A1 notation, for example `Sheet1!A4:A5`, then the data will be added to A4 and A5 cells in the `Sheet1` spreadsheet only if the cells defined in a notation are empty. 
3. From the **Dimension** dropdown list, select whether you want to add values in a column (vertically) or in a row (horizontally). Select this option in accordance with the value defined in the **Range** field (step 2).
    The screens below present adding the following values: `John`, `Doe` in a column and row dimension, respectively:
    <figure><img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/docs/automation/_gfx/sheets-column-dimension.png" class="large" alt="The screen presents values added in a column dimension"><figcaption>The screen presents values added in a column dimension</figcaption></figure>
    <figure><img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/docs/automation/_gfx/sheets-row-dimension.png" class="large" alt="The screen presents values added in a row dimension"><figcaption>The screen presents values added in a row dimension</figcaption></figure>
4. In the **Values** field, enter the data you want to upload to the spreadsheet. For example:  
    
   <pre><code class="language-plaintext">[
       [
           "John", "Doe"
       ],
   [
           "Alice", "Anderson"
       ]
   ]</code></pre>

    
   <div class="admonition admonition-tip"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z" /></svg></div><div class="admonition-body"><div class="admonition-content">

   In the request body with the values you can use [inserts](/developers/inserts) and use [Jinjava](/developers/inserts/automation) to refer to the data gathered in Synerise, such as results of the analyses (metrics, aggregates, expressions). For more information about appending values to spreadsheets, go to [Google documentation](https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values).

   </div></div></div>

5. Confirm by clicking **Apply**.  
    **Result**: When the Upload Data to Spreadsheet node is executed, a [`googleSheets.uploadData` event](/docs/assets/events/event-reference/integration#googlesheetsuploaddata) is generated on the activity list of the profile who is the actor in the workflow.

### Test integration
---

You can run a test request. If the request body contains a dynamic reference to a profile attribute and/or an event data from preceding nodes, then you can define the context using [test profile data](/docs/settings/configuration/test-profiles). 


<div class="admonition admonition-note"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

Complete description of the feature is available in [Testing outgoing integrations](/docs/automation/test-requests-for-outgoing-integrations).

</div></div></div>



1. In the **Test integration** section, click **Send test request**.  
    **Result**: A test request builder opens. If:
    - a request body contains dynamic references, the request preview appears after you select the context of test profiles and events.
    - a request body contains static data, the preview of the body request appears immediately.
    <figure><img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/docs/automation/_gfx/test-request-builder-empty.png" class="large" alt="An empty test request builder"><figcaption>An empty test request builder</figcaption></figure>
2. If your request contains dynamic references (otherwise, the options aren't available):   
    - From the **Test profile** dropdown, select a test profile in the context of whom the test request will be performed.  
    - From the **Event context** dropdown list, you can select a particular occurrence of an event  whose values/information will be used for the test request.  
        1. Select a test profile.  
            **Result**: A history of test profile events appears.  
            <figure><img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/docs/automation/_gfx/event-stream-test-profile.png" class="large" alt="A stream of events of a test profile"><figcaption>A stream of events of a test profile</figcaption></figure> 
        2. From the list of events, select one whose data you want use as a context. If there is no event you can use, in the upper-right corner of the pop-up, click **Define own event** and provide the body of the event.
        3. Confirm by clicking **Apply**. 
3. Verify the request body. If there is something you want to change, come back to the node settings from previous steps.  
3. If the request body is ready to test, in the upper-right corner, click **Send request**.  
    **Result**: The response section appears and the **Update response event** button becomes active.  
4. Optionally, you can update response event with new parameters by clicking **Update response event** in the upper-right corner.

## Example of use
---
Refer to these use cases to see how you can use this node:
- [Sending metric results to Google Sheets](/use-cases/google-spreadsheet-integration)
- [Sending data from Google Sheets to Synerise](/use-cases/send-data-from-google-sheets)