Google Sheets

The Bread & Butter + Google Sheets integration allows you to automatically add user data to a Google Sheet whenever specific events occur on your website. For example, you can add new conversions to a "New Leads" spreadsheet or log specific user journey milestones by updating an existing record.


Step 1: Set up Google Cloud Project

To connect Bread & Butter to Google Sheets, you need to create a project in Google Cloud, enable the Sheets API, and generate a Service Account key.

1. Create Project & Enable API

    1. Log in to the Google Cloud Console.
    2. Click the project dropdown at the top and select New Project.
    3. Enter a Project Name and select your Organization and Location. Click Create.
    4. Ensure your new project is selected in the top dropdown.
    5. In the left menu, go to APIs & Services.

    6. Enable APIs and Services

    7. Under Google Workspace, click Google Sheets API.

    8. Click Enable.


2. Create Service Account & Key

    1. In the left menu, go to IAM & Admin > Service Accounts.

    2. Click + Create Service Account at the top.
    3. Enter a Service account name (e.g., "breadbutter-sheets") and click Create and Continue.
    4. In the Select a role dropdown, choose Owner (or a role with sufficient Sheets access) and click Continue, then Done.

    5. Click on the newly created service, copy and store the service account email address for the Rules setup below.

    6. Go to the Keys tab and click Add Key > Create new key.

    7. Select JSON and click Create.
      • A JSON file containing your key will automatically download to your computer. Keep this file safe.
      • Important: Copy the Service account email (e.g., breadbutter-sheets@project-id.iam.gserviceaccount.com     ). You will need this later to share your sheet.

Step 2: Connect Integration in Bread & Butter

  1. Log in to your Bread & Butter Dashboard.
  2. Click Automation > Integrations on the left side menu.
  3. Under the Integrations section, click on the Google Sheets logo to create a new integration.
  4. Enter a Name for the integration (optional, the default name will be 'Google Sheets').
  5. Open the JSON file you downloaded in Part 1. Copy the entire content and paste it into the Google Sheets JSON file data field.
  6. Click Save & Close.

Part 3: Prepare Your Spreadsheet

Before setting up the rule, you must create the sheet and grant access to the service account.

  1. Open Google Sheets and create a new spreadsheet (or open an existing one).
    • Note: Avoid using sheet tab names that look like cell references (e.g., 'Tab1', 'Ark1'). Use descriptive names like 'Leads' or 'Signups.
  2. Add Headings to the first row (e.g., First Name, Last Name. Email Address, Date).
    • The integration comes with a default field mapping, it is recommended you use this setting.
    • For a full list of fields, see Field Mapping Definitions.
  3. Click the Share button at the top right.
  4. Paste the Service account email you copied in Step 1.2.e.
  5. Ensure the permission is set to Editor.
  6. Uncheck "Notify people" and click Share.
  7. Copy the Spreadsheet ID from the URL.
    • The ID is the long string of characters between /d/      and /edit     
    • Example: docs.google.com/spreadsheets/d/           1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms      /edit           

Part 4: Set up Rules

Now, define when data should be sent to this sheet.

  1. Go to Automation > Integrations in Bread & Butter.
  2. Select the Google Sheets Integration you created in Part 2.
  3. Under the Rules section, choose the Filter Conditions that will trigger this rule (e.g., EVENT: Email Verified, LEAD SCORE: 6,7,8,9,10). You can manually refine the filter condition, or pick from the pre-configured filters that were previously saved for your account.
  4. Enter a descriptive Name for the rule (e.g., 'Leads').
  5. Paste the Spreadsheet ID you copied in Part 3.
  6. Enter the Sheet Name (the name of the tab at the bottom, e.g., 'Leads').
  7. Click Get Mappings.
    • Bread & Butter will fetch the header row from your sheet.
  8. Map the Bread & Butter data fields to your corresponding sheet columns.
  9. Click Save & Close.

Your integration is now live! When the event occurs, a new row will be added to your Google Sheet.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.