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

# Google Sheets

For more details on our Integration check out our blog post: [Automated Landing Pages Using Google Sheets Integration](https://rallymind.com/blog/automated-landing-pages-using-google-sheets-integration/).

## Connect Your Google Sheet

To allow our systems to access your Google Sheet, you will need to share access to your Sheet to "<googlesheetssync@banded-coder-198220.iam.gserviceaccount.com>"

![](https://docs.rallymind.com/~gitbook/image?url=https%3A%2F%2F395829198-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fassets%252F-LAKdeqQb6WASCHwzywa%252F-LAKdfjulr9AP3E1snev%252F-LAKdgs5TxMc2RwEsbe-%252FScreen%2520Shot%25202017-12-30%2520at%252012.43.52%2520PM.png%3Fgeneration%3D1524002903374223%26alt%3Dmedia\&width=768\&dpr=4\&quality=100\&sign=e3d280d2\&sv=2)![](https://docs.rallymind.com/~gitbook/image?url=https%3A%2F%2F395829198-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fassets%252F-LAKdeqQb6WASCHwzywa%252F-LAKdfjulr9AP3E1snev%252F-LAKdgsAwhXWDi6gJ4XZ%252FScreen%2520Shot%25202018-03-16%2520at%25201.33.58%2520PM.png%3Fgeneration%3D1524002908241642%26alt%3Dmedia\&width=768\&dpr=4\&quality=100\&sign=5b920b6c\&sv=2)

## Add Your Spreadsheet Fields

### Common Fields/Macros <a href="#common-fields-macros" id="common-fields-macros"></a>

Below are common fields that our customers add to their Google Sheet.

* Domain - Domain used for the landing page
* Page Path - The page path used for the landing page
* Business Name
* Location Name
* Address Information (Street, City, State, Country, Postal Code)
* Phone Numbers
* Service Areas
* Email Addresses

### Other Special Fields/Macros <a href="#other-special-fields-macros" id="other-special-fields-macros"></a>

Below are some additional field types that have special uses.

* GTM ID - Google Tag Manager ID
* Hours of Operation - Structured open and closing times for each day in the week
* URL fields - CTAs and outgoing links
* Color Fields - Hex color values (i.e. #ff00aa)
* Image URL fields - Field is a URL, that gets auto-uploaded to our systems
* Partner IDs - These are the customer's internal IDs associated with the pages so they can keep track of billing, active campaigns, etc (partner\_business\_id, partner\_location\_id, partner\_site\_id)

## Configure Your Fields

The mapping and configuration of your Google Sheet is setup via a JSON config file. This JSON content can be added to your Worksheet as a new sheet labeled "Config".

![](https://docs.rallymind.com/~gitbook/image?url=https%3A%2F%2F395829198-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fassets%252F-LAKdeqQb6WASCHwzywa%252F-LAKdfjulr9AP3E1snev%252F-LAKdgstLJ4LdlgMQfii%252FScreen%2520Shot%25202017-12-30%2520at%252012.45.12%2520PM.png%3Fgeneration%3D1524002908881777%26alt%3Dmedia\&width=768\&dpr=4\&quality=100\&sign=ab13d10f\&sv=2)

Our system will then pull in this configuration when processing your sheet.

## Example Configuration (Basic) <a href="#example-configuration-basic" id="example-configuration-basic"></a>

\
![](https://docs.rallymind.com/~gitbook/image?url=https%3A%2F%2F395829198-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fassets%252F-LAKdeqQb6WASCHwzywa%252F-LAKdfjulr9AP3E1snev%252F-LAKdgt33s7rAjYoNbOr%252FScreen%2520Shot%25202017-12-30%2520at%25201.19.18%2520PM.png%3Fgeneration%3D1524002908264049%26alt%3Dmedia\&width=768\&dpr=4\&quality=100\&sign=398e5269\&sv=2)

```json
{
  "should_run": "Build Page",
  "project_name": "Your Project Name",
  "error_writer": "Errors"
  "business_id": 555555,
  "sites": [
    {
      "mapping": {
        "base_directory": "Page Path",
        "partner_site_id": "Landing Page ID"
      },
      "overrides": {
        "published": true,
        "formatted_domain": "landingpages.yourdomain.com",
        "theme_id": 1234,
        "noindex": true
      },
      "writers": {
        "Preview URL": "preview_url",
        "Published URL": "formatted_url"
      }
    }
  ]
}
```

| Option        |                                                                                    | Required |
| ------------- | ---------------------------------------------------------------------------------- | -------- |
| should\_run   | Name of the field within your sheet that denotes that the row should be processed. | Yes      |
| project\_name | Name of your project                                                               | Yes      |
| error\_writer | Field to write any processing or validation errors into                            | No       |

### Custom fields <a href="#business-configuration" id="business-configuration"></a>

You can easily map custom fields on your sheet with your project, using the "custom\_fields" filter.

This filter just contains a list of the field names on your sheet you would like to map

```json
{
  ...
  "sites": [
    {
      ...
      "filters": {
        "custom_fields": ["Headline", "Subheadline", "Main Content"]
      }
    }
  ]
  ...
}
```

These fields get automatically processed and are also turned into macros prefixed with "custom\_", lowercased, and spaces are turned into underscores.

* "Headline" => "${custom\_headline}"
* "Subheadline" => "${custom\_subheadline}"
* "Main Content" => "${custom\_main\_content}"

### Business Configuration <a href="#business-configuration" id="business-configuration"></a>

Each row within the Sheet can either publish all Landing Pages under one existing Business, or a Business can be created for each row in the sheet.

#### One Existing Business <a href="#one-existing-business" id="one-existing-business"></a>

```json
{
  "business_id": 555555,
  ...
}
```

#### Multiple Businesses <a href="#multiple-businesses" id="multiple-businesses"></a>

```json
{
  "businesses": [
    {
      "mapping": {
        "business_name": "Business Name",
        "partner_business_id": "Landing Page ID"
      }
    }
  ]
  ...
}
```

<br>
