You need to enable JavaScript to run this app.
最新活动
大模型
产品
解决方案
定价
生态与合作
支持与服务
开发者
了解我们

如何实现Mailchimp列表与Google Sheets自动同步新增成员信息?

Mailchimp + Google Sheets 自动同步新订阅者方案

Absolutely! You can totally set up an integration between Mailchimp and Google Sheets to automatically add a new subscriber's email, first name, and last name to your spreadsheet as soon as they join your Mailchimp list. Here are two solid methods to make this happen, depending on your comfort with code:

方法1:无代码自动化工具(适合非技术用户)

Tools like Zapier make this super straightforward—no coding required. Here's how to set it up:

  • Step 1: Create a new Zap in Zapier. Choose Mailchimp as your trigger app, and select the trigger event New Subscriber. Connect your Mailchimp account, then pick the specific list you want to sync.
  • Step 2: Add an action step. Choose Google Sheets as the action app, and select Create Spreadsheet Row as the action event. Connect your Google account, then select the spreadsheet and worksheet where you want to store subscriber data.
  • Step 3: Map your fields. Match Mailchimp's Email Address, First Name, and Last Name fields to the corresponding columns in your Google Sheet.
  • Step 4: Test the Zap to make sure it works, then turn it on. From now on, every new subscriber to your Mailchimp list will automatically populate in your spreadsheet.

方法2:Mailchimp Webhooks + Google Apps Script(自定义方案)

If you want more control or don't want to use a third-party tool, you can build a custom integration using Mailchimp Webhooks and Google Apps Script:

  • Step 1: Set up your Google Sheet. Create columns for Email, First Name, Last Name, and any other data you want to track (like Date Added).
  • Step 2: Open Google Apps Script. Go to your Sheet, click ExtensionsApps Script. Replace the default code with this script:
function doPost(e) {
  if (!e || !e.postData) {
    return ContentService.createTextOutput("Invalid request received");
  }
  
  // Parse the incoming Webhook data from Mailchimp
  const webhookData = JSON.parse(e.postData.contents);
  const targetSheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
  
  // Extract subscriber details (adjust merge fields if your Mailchimp setup uses different tags)
  const subscriberEmail = webhookData.member.email_address;
  const firstName = webhookData.member.merge_fields.FNAME || "N/A";
  const lastName = webhookData.member.merge_fields.LNAME || "N/A";
  const dateAdded = new Date().toLocaleString();
  
  // Append the data to your sheet
  targetSheet.appendRow([subscriberEmail, firstName, lastName, dateAdded]);
  
  return ContentService.createTextOutput("Subscriber data synced successfully");
}
  • Step 3: Deploy the script as a Web App. Click DeployNew deployment. Set the type to Web app, execute as Me, and set access to Anyone, even anonymous. Deploy and copy the generated Web App URL.
  • Step 4: Set up the Mailchimp Webhook. Go to your Mailchimp list → SettingsWebhooksCreate Webhook. Paste your Web App URL, then under What to trigger, only check Subscriber added to list. Save the webhook.

一些注意事项

  • For the Zapier method: Free plans have monthly usage limits, so if you have a high volume of subscribers, you might need a paid tier.
  • For the Webhook method: Make sure your Google Apps Script Web App is set to allow anonymous access—Mailchimp sends webhook requests without authentication.
  • Always test with a dummy subscriber first to confirm the data syncs correctly.

内容的提问来源于stack exchange,提问作者Harsha Patil

火山引擎 最新活动