🚀 How to Auto-Sync Omnisend Form Leads to Google Sheets with Email Alerts – No Zapier Needed

If you’re using Omnisend and want a simple, cost-free way to log form submissions into Google Sheets and get notified by email, this guide is for you.

We’ll walk through a setup using Google Apps Script + Omnisend’s API — no Zapier, no webhooks, no monthly costs.

💡 Why Not Webhooks or Zapier?

  • Omnisend’s Webhook feature is currently in beta and unreliable for live lead syncing.

  • Zapier does offer a Google Sheets integration — but webhook is available only on their Pro plan ($29/month).

  • This method is free, stable, and gives you full control.

✅ What This Setup Does

  • Logs tagged form submissions into Google Sheets

  • Sends instant email notifications

  • Filters by tag (form-specific)

  • Avoids duplicate entries

  • Runs automatically every 30 minutes

🧰 What You’ll Need

  • Omnisend API Key

  • A Google Sheet

  • A form in Omnisend tagged (e.g. collaboration_interested)

  • Access to Apps Script (built into Google Sheets)

🏷 Step 1: Tag Your Form in Omnisend

Go to your form settings in Omnisend, and under “Apply Tags,” add a unique tag like:

Your_Unique_Tag

This lets us pull only the leads submitted through this specific form.

📄 Step 2: Create Your Google Sheet

  1. Create a new Google Sheet

  2. Name the sheet tab: Collaborations

  3. In cell A1, write: Last Synced:

  4. Leave B1 empty (Apps Script will update this)

🧠 Step 3: Paste This Code in Apps Script

Go to Extensions > Apps Script in your Sheet and paste the script (you’ll need to replace 'YOUR_API_KEY'):

				
					function getCollaborationLeads() {
  var apiKey = 'YOUR_API_KEY';
  var tag = 'collaboration_interested';
  var sheetName = "Collaborations";
  var ss = SpreadsheetApp.getActiveSpreadsheet();
  var sheet = ss.getSheetByName(sheetName);

  if (!sheet) {
    sheet = ss.insertSheet(sheetName);
    sheet.getRange("A1").setValue("Last Synced:");
    sheet.getRange("B1").setValue("");
    sheet.appendRow(["First Name", "Social Media Handles", "Email", "Country", "Social Media Stats", "Content", "Ideas", "Created At"]);
  }

  var lastSync = sheet.getRange("B1").getValue();
  if (!lastSync) lastSync = new Date(0).toISOString();

  var endpoint = 'https://api.omnisend.com/v3/contacts?limit=100&tag=' + tag + '&createdAfter=' + encodeURIComponent(lastSync);
  var options = {
    method: 'get',
    headers: {
      'X-API-KEY': apiKey,
      'Content-Type': 'application/json'
    }
  };

  var response = UrlFetchApp.fetch(endpoint, options);
  var json = JSON.parse(response.getContentText());

  if (!json.contacts || json.contacts.length === 0) return;

  var existingData = sheet.getDataRange().getValues();
  var existingEmails = new Set();
  for (var i = 1; i < existingData.length; i++) {
    existingEmails.add(existingData[i][2]); // email column
  }

  var newSyncTime = lastSync;
  var emailRecipients = ['jenburch@hightailhair.com', 'jondazeley@hightailhair.com'];

  json.contacts.sort(function(a, b) {
    return new Date(a.createdAt) - new Date(b.createdAt);
  });

  json.contacts.forEach(function(contact) {
    if (existingEmails.has(contact.email)) return;

    var custom = contact.customProperties || {};

    sheet.appendRow([
      contact.firstName || "",
      custom.Social_Media_Handles || "",
      contact.email || "",
      contact.country || "",
      custom.Stats || "",
      custom.Content || "",
      custom.Ideas || "",
      contact.createdAt || ""
    ]);

    var emailBody =
      "New Collaboration Interest:\n\n" +
      "First Name: " + (contact.firstName || "") + "\n" +
      "Email: " + (contact.email || "") + "\n" +
      "Social Media Handles: " + (custom.Social_Media_Handles || "") + "\n" +
      "Country: " + (contact.country || "") + "\n" +
      "Social Media Stats: " + (custom.Stats || "") + "\n" +
      "Content: " + (custom.Content || "") + "\n" +
      "Ideas: " + (custom.Ideas || "") + "\n" +
      "Created At: " + (contact.createdAt || "");

    MailApp.sendEmail({
      to: emailRecipients.join(","),
      subject: "New Collaboration Form Submitted",
      body: emailBody
    });

    newSyncTime = contact.createdAt;
  });

  if (newSyncTime !== lastSync) {
    sheet.getRange("B1").setValue(newSyncTime);
  }
}

				
			

⏱ Step 4: Automate It (Every 30 Minutes)

  1. Go to the Triggers tab in Apps Script

  2. Click “+ Add Trigger”

  3. Set:

    • Function: getCollaborationLeads

    • Event Source: Time-driven

    • Interval: Every 30 minutes

Done.

🧪 Troubleshooting Tips

  • 403 Error? Check your API key and permission scope

  • Blank fields? Double-check your field names (case-sensitive)

  • Duplicate entries? The script checks for duplicates using email

  • No emails? Make sure you’ve authorized Gmail in Apps Script

✅ That’s It!

You now have a fully automated setup to:

  • Log form submissions in Sheets

  • Trigger email alerts

  • Skip duplicates

  • Filter by form using tags

 

All free. All in your control.

🔗 Omnisend Support

If you’d like help implementing this for clients, or want a plug-and-play template:

👉 INTEFIG – Official Omnisend Partner
https://partnerpage.omnisend.com/agencies/intefig

Leave a Reply

Your email address will not be published. Required fields are marked *

Create a Project Brief

Project Deadline