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
- Sheet Fetch: Mailofly requests the public CSV stream of your specified spreadsheet and sheet tab.
- Column Layout Detection: Mailofly scans row 1 for recognized contact headers.
- Contact Upsert: For each row, the contact is created or updated with name, phone, and custom attributes.
- Segment Linking: Contacts are automatically linked to your chosen audience segment.
- Sync Logging: The connection records the timestamp of the last sync and any column layout errors.
Setup Guide
1. Prepare Your Google Sheet
- Open your Google Sheet in your browser.
- In the top-right corner, click Share.
- Under General access, change the setting to “Anyone with the link can view”.
- Ensure row 1 contains your header titles:
- Required: A column titled
email(orEmail 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).
- Required: A column titled
- Note the exact name of the sheet tab at the bottom (e.g.
Sheet1orLeads).
2. Connect the Sheet in Mailofly
- In your Mailofly dashboard, navigate to Integrations.
- Click on the Google Sheets card.
- Click the Connect Sheet button.
- 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).
- 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, andphonemap to core contact fields.companyandtierare 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:Troubleshooting
Error: Sheet CSV is empty or cannot be fetched
Error: Sheet CSV is empty or cannot be fetched
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.
Error: Required column 'email' not found
Error: Required column 'email' not found
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.Tab not found or wrong data imported
Tab not found or wrong data imported
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).