Skip to main content

Google Sheets Audience Sync

Mailofly allows you to connect public Google Sheets directly to your contact segments. New rows added to your spreadsheet are automatically imported as subscribers and contacts in your audience. This integration lets marketing, sales, and operations teams work in Google Sheets while Mailofly keeps your email segments fresh for campaigns and broadcasts without manual CSV imports.

Why Use Google Sheets Sync?

  • No manual CSV exports: Stop manually exporting spreadsheets and re-uploading them every time you collect new leads.
  • Flexible header mapping: Automatically detects email, first names, last names, and phone numbers regardless of casing or formatting.
  • Custom contact attributes: Any extra columns in your sheet (e.g. company, plan, source) are automatically preserved as custom fields for template personalization.
  • Segment isolation: Connect different tabs or spreadsheets to dedicated segments (e.g. “Webinar Attendees”, “VIP Leads”, “Beta Waitlist”).
  • On-demand and scheduled refresh: Run instant syncs anytime with one click, or trigger syncs via background schedules and API webhooks.

How It Works

  1. Sheet Fetch: Mailofly requests the public CSV stream of your specified spreadsheet and sheet tab.
  2. Column Layout Detection: Mailofly scans row 1 for recognized contact headers.
  3. Contact Upsert: For each row, the contact is created or updated with name, phone, and custom attributes.
  4. Segment Linking: Contacts are automatically linked to your chosen audience segment.
  5. Sync Logging: The connection records the timestamp of the last sync and any column layout errors.

Setup Guide

1. Prepare Your Google Sheet

  1. Open your Google Sheet in your browser.
  2. In the top-right corner, click Share.
  3. Under General access, change the setting to “Anyone with the link can view”.
  4. Ensure row 1 contains your header titles:
    • Required: A column titled email (or Email Address, Contact Email).
    • Recommended: Columns like first_name, last_name, name, phone.
    • Custom: Any other columns you wish to store as custom attributes (e.g. company, role, tier).
  5. Note the exact name of the sheet tab at the bottom (e.g. Sheet1 or Leads).

2. Connect the Sheet in Mailofly

  1. In your Mailofly dashboard, navigate to Integrations.
  2. Click on the Google Sheets card.
  3. Click the Connect Sheet button.
  4. Complete the connection modal:
    • Target Segment: Select an existing segment or click Create new segment… to add one on the spot.
    • Google Sheet URL: Paste the full shareable URL of your Google Sheet.
    • Sheet Tab Name: Enter the exact sheet tab name (default: Sheet1).
  5. Click Add connection.

3. Sync Contacts

  • Click Sync now from the sheet’s action menu to import all rows immediately.
  • Click Sync all in the page header to synchronize all connected sheets across your organization.
  • Synced contacts will appear in your Contacts and linked Segments.

Column Mapping Reference

Mailofly matches headers flexibly, ignoring case, underscores, hyphens, and whitespace:

Example Spreadsheet Layout

In this example:
  • email, name, and phone map to core contact fields.
  • company and tier are saved as custom fields and can be referenced in emails using {{custom.company}} and {{custom.tier}}.

Automated Background Sync

To automate regular synchronization (such as daily or hourly cron syncs), trigger the sync webhook endpoint:
This endpoint processes all active Google Sheet connections and updates your segments with newly added rows.

Troubleshooting

Verify that your Google Sheet’s share permission is set to “Anyone with the link can view”. If your Google Workspace domain restricts link sharing outside your organization, adjust your organization’s sharing settings.
Ensure row 1 contains an email header. If your sheet has title rows above the headers, adjust your header row or ensure the headers are placed on the very first row.
Sheet tab names are case-sensitive. Verify that the tab name in Mailofly matches the tab title at the bottom of your Google Sheet exactly (e.g. Sheet1 vs sheet1).