Automatically Sync Event Attendees to Constant Contact

What this Zap does

When your event ends in CE-Go, this Zap automatically syncs all attendees to Constant Contact as Contacts—no more manual data entry!

Before you start

Make sure you have:

  • A CE-Go account with at least one event
  • A Constant Contact account (any paid plan)
  • Account Owner or Account Manager permissions in your Constant Contact account
  • At least one Contact List created in Constant Contact

⏱️ Time to set up: About 15-20 minutes


Setup Steps

Step 1: When Event Ends

  1. Create new Zap → Search CE-Go
  2. Select Event Ended trigger
  3. Connect your CE-Go account
  4. Click Test trigger

Step 2: Setup Configuration

  1. Add Code by ZapierJavaScript
  2. In Input Data, add:
    • event_id1. Event ID
    • total_users1. Total Users
    • list_id → Your Constant Contact List ID (see instructions below)
  3. Paste this code:
// =============================================
// 🔧 Don't change below
// =============================================

const limitPerPage = 100;
const eventId = inputData.event_id;
const listId = inputData.list_id;
const totalUsers = inputData.total_users;
const totalPages = Math.ceil(totalUsers / limitPerPage);

const pages = [];
for (let i = 1; i <= totalPages; i++) {
  pages.push(i);
}

return { 
    event_id: eventId,
    total_users: totalUsers,
    limit: limitPerPage,
    pages: pages,
    total_pages: totalPages,
    list_id: listId
};
📋 How to find your List ID:
  1. Go to your Constant Contact dashboard
  2. Click Audience in the left menu
  3. Select Lists and segments
  4. Click on your desired contact list
  5. Copy the last part of the URL after the slash

Example URL: https://app.constantcontact.com/contacts/lists/69d97ab8-f871-11f0-8bd2-0242e7237647
Your list_id is: 69d97ab8-f871-11f0-8bd2-0242e7237647

Step 3: Check if Users Exist

  1. Add Filter by Zapier
  2. Set: 2. Total Users(Number) Greater than0

Step 4: Loop Users Page by Page

  1. Add Looping by Zapier
  2. Action: Create Loop From Line Items
  3. Values to Loop: pages2. Pages
  4. Trim Whitespace: True
  5. Loop counter start: 1
  6. Maximum iterations: 100

Step 5: Get Event Users

  1. Add CE-GoGet Event Users
  2. Configure:
    • Event ID: 2. Event Id
    • Limit: 2. Limit
    • Page: 4. Loop Iteration
    • If multiple results: Return all results as line items

Step 6: Skip if No Users on Page

  1. Add Filter by Zapier
  2. Set: 5. Count(Number) Greater than0

Step 7: Format Contacts for Constant Contact

  1. Add Code by ZapierJavaScript
  2. In Input Data, add:
    • data5. Step(Row) Output
    • list_id2. List Id
    • loop_iteration4. Loop Iteration
  3. Paste this code:
try {
  const data = JSON.parse(inputData.data);
  const users = data.results;

  // Format contacts for Constant Contact import
  const contacts = users.map(user => {
    return {
      email: user.email.toLowerCase().trim(),
      first_name: user.first_name || "",
      last_name: user.last_name || ""
      
      // Optional fields - add if needed:
      // job_title: user.job_title || "",
      // company_name: user.company || "",
      // phone: user.phone || "",
      // street: user.address || "",
      // city: user.city || "",
      // state: user.state || "",
      // zip: user.zip || "",
      // country: user.country || ""
    };
  });

  return {
    import_data: JSON.stringify(contacts),
    list_id: inputData.list_id,
    count: contacts.length,
    page_number: inputData.loop_iteration || "1"
  };
  
} catch(e) {
  return {
    error: true,
    message: e.message,
    page_number: inputData.loop_iteration || "1"
  };
}

Step 8: Sync to Constant Contact

  1. Add Constant ContactAPI Request (Beta)
  2. Configure:
Field Value
Stop on error Yes
HTTP Method POST
URL https://api.cc.email/v3/activities/contacts_json_import
Additional request headers Key: Content-Type
Value: application/json
Body
{
  "import_data": {{7. Import Data}},
  "list_ids": ["{{7. List Id}}"]
}
		

⚠️ Important: Make sure to map {{7. Import Data}} as a field (not as text in quotes). The data is already JSON-stringified in Step 7.

Step 9: Validate Results

  1. Add Code by ZapierJavaScript
  2. In Input Data:
    • response_body8. Response Body
    • page_number7. Page Number
    • contacts_count7. Count
  3. Paste this code:
try {
  // Parse Constant Contact response from Step 8
  const response = typeof inputData.response_body === 'string' 
    ? JSON.parse(inputData.response_body) 
    : inputData.response_body;
  
  // Check if response exists
  if (!response) {
    return {
      error: true,
      error_title: "No Response from Constant Contact",
      message: "Constant Contact API did not return a response",
      page_number: inputData.page_number
    };
  }
  
  // Extract activity details
  const activityId = response.activity_id;
  const state = response.state || "unknown";
  const percentDone = response.percent_done || 0;
  
  // Check if activity was created successfully
  if (!activityId) {
    return {
      error: true,
      error_title: "Failed to Create Import Activity",
      message: response.error_message || "No activity_id returned",
      error_key: response.error_key || "unknown",
      page_number: inputData.page_number
    };
  }
  
  // Success - activity created
  return {
    error: false,
    status: "success",
    activity_id: activityId,
    state: state,
    percent_done: percentDone,
    contacts_count: inputData.contacts_count,
    page_number: inputData.page_number,
    status_url: response._links?.self?.href || '',
    message: `Import activity created successfully. ${inputData.contacts_count} contacts queued for import.`
  };
  
} catch (error) {
  return {
    error: true,
    error_title: "Failed to Validate Constant Contact Response",
    message: error.message,
    page_number: inputData.page_number
  };
}

🎉 Publish Your Zap

  1. Review all steps
  2. Click Publish at the top right
  3. Your Zap is now live!

Success! Attendees will now automatically sync to Constant Contact when events end.


💡 Troubleshooting

Error Solution
"Request forbidden due to account status" Your Constant Contact account may be under review or on a trial plan. Contact Constant Contact support at 1-866-876-8464 or billing at 855-229-5506 to resolve account status issues.
"Invalid list_id" Double-check your List ID. Go to Audience → Lists and segments, click your list, and copy the ID from the URL.
"Failed to create a http request" Make sure you added the Content-Type: application/json header in Step 8
"Invalid input JSON" Check that the Body in Step 8 uses mapped field {{7. Import Data}} without quotes around it
"Email address is invalid" Some email addresses may be invalid or flagged. Valid contacts will still be imported. Check your Constant Contact account for details.
Zap succeeds but contacts don't appear Constant Contact processes imports asynchronously (in the background). Check Contacts → Activity in your Constant Contact account to see import status.

Adding Custom Fields

In Step 7 code, uncomment and add fields as needed:

return {
  email: user.email.toLowerCase().trim(),
  first_name: user.first_name || "",
  last_name: user.last_name || "",
  phone: user.phone || "",
  company_name: user.company || "",
  job_title: user.job_title || ""
};

Note: Field names must match Constant Contact's field names exactly (case-sensitive).


Need Help?

Happy syncing! 🎉
You've just automated your Constant Contact workflow!

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

Still need help? Contact Us Contact Us