> For the complete documentation index, see [llms.txt](https://swallow-1.gitbook.io/swallow/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://swallow-1.gitbook.io/swallow/integrations/data/google-sheets.md).

# Google Sheets

### Install

<details>

<summary>Installation Steps</summary>

![](/files/BZDQXRPZKEGGCyK9osmT)

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.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://swallow-1.gitbook.io/swallow/integrations/data/google-sheets.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
