Google Sheets

Configuration example for the DevHub Google Sheets integration

For more details on our Integration check out our blog post: 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 "[email protected]"

Add Your Spreadsheet Fields

Common Fields/Macros

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

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".

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

Example Configuration (Basic)

{
  "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

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

{
  ...
  "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

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

{
  "business_id": 555555,
  ...
}

Multiple Businesses

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

Last updated

Was this helpful?