# Google Sheets

### Install

<details>

<summary>Installation Steps</summary>

![](https://1110149073-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fu89vYHjuY9Vj4vhZX5IZ%2Fuploads%2FL23ealCZt5NGpTGyLKsD%2Fimage.png?alt=media\&token=9599b01b-c069-48a3-b198-773d69cfe9d4)

1. Navigate to the Integrations page in Swallow settings
2. Select Connect to Google Sheets from the available integrations
3. Click on the +Add connection button
4. Follow the prompts to authenticate with your Google account and grant necessary permissions
5. Once authenticated, select the Google Sheet you want to connect with Swallow

</details>

### Configuration

<details>

<summary>Setting up Google Sheets Connection</summary>

1. After selecting your Google Sheet, you'll need to specify which data you want to sync:
   * Choose the specific worksheet within your Google Sheet
   * Select the columns that correspond to Swallow's data fields
   * Set up the sync frequency (e.g., real-time, hourly, daily)
2. Configure data mapping:
   * Map Google Sheets columns to Swallow's data fields
   * Specify any data transformations or formatting rules

</details>

### Quote Creation Integration

<details>

<summary>Integration Details</summary>

Currently, the Google Sheets integration is primarily used for quote creation and management. When a quote is created or updated in Swallow, the relevant data is automatically synced to the connected Google Sheet.

#### Working

1. When a quote is created or updated in Swallow, it triggers the Google Sheets integration
2. The quote data is formatted according to the configured mapping
3. The data is then inserted or updated in the specified Google Sheet
4. Any changes made in the Google Sheet can also be synced back to Swallow, depending on the configuration

Note: This integration is currently focused on quote management. If you need to expand the integration to include other data types or functionalities, please contact Swallow support for assistance.

</details>

### Webhooks

<details>

<summary>Setting up Webhooks</summary>

To set up webhooks for the Google Sheets integration:

1. Navigate to Settings in Swallow
2. Click on Webhooks
3. Create a new webhook for quote creation and update events
4. Use the generated webhook URL in your Google Apps Script to trigger updates in your Google Sheet when changes occur in Swallow

</details>

### Data Security

<details>

<summary>Ensuring Data Protection</summary>

1. Swallow uses OAuth 2.0 for secure authentication with Google Sheets
2. All data transfers between Swallow and Google Sheets are encrypted
3. You can control access permissions to the connected Google Sheet within your Google account
4. Regularly review and update access permissions to maintain data security

</details>

Remember, when working with quotes in Swallow, use the "next button URL" to guide users through the quote completion process. The `company_reference` and `quote_reference` are used to identify specific entities within the system.

This integration allows for efficient management of quote data between Swallow and Google Sheets, enabling real-time updates and collaborative workflows.
