Automatically Sync Event Attendees to Hubspot
What this Zap does
When your event ends in CE-Go, this Zap automatically syncs all attendees to HubSpot as Contacts—no more manual data entry!
Before you start
Make sure you have:
- A CE-Go account with at least one event
- A HubSpot account (Free or any paid plan)
- Super Admin permissions in your HubSpot account
⏱️ Time to set up: About 15-20 minutes
Setup Steps
Step 1: When Event Ends
- Create new Zap → Search CE-Go
- Select Event Ended trigger
- Connect your CE-Go account
- Click Test trigger
Step 2: Setup Configuration
- Add Code by Zapier → JavaScript
- In Input Data, add:
event_id→ 1. Event IDtotal_users→ 1. Total Users
- Paste this code:
// =============================================
// 🔧 Don't change below
// =============================================
const limitPerPage = 100;
const eventId = inputData.event_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
};
Step 3: Check if Users Exist
- Add Filter by Zapier
- Set: 2. Total Users → (Number) Greater than → 0
Step 4: Loop Users Page by Page
- Add Looping by Zapier
- Action: Create Loop From Line Items
- Values to Loop:
pages→ 2. Pages - Trim Whitespace: True
- Loop counter start: 1
- Maximum iterations: 100
Step 5: Get Event Users
- Add CE-Go → Get Event Users
- 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
- Add Filter by Zapier
- Set: 5. Count → (Number) Greater than → 0
Step 7: Format Contacts for HubSpot
- Add Code by Zapier → JavaScript
- In Input Data, add:
data→ 5. Step(Row) Output - In Input Data, add:
loop_iteration→ 4. Loop Iteration - Paste this code:
try {
const data = JSON.parse(inputData.data);
const users = data.results;
// Create batch contacts for HubSpot
const contacts = users.map(user => {
return {
id: user.email.toLowerCase().trim(), // email as id
idProperty: "email", // specify that id is email
properties: {
email: user.email.toLowerCase().trim(),
firstname: user.first_name || "",
lastname: user.last_name || "",
phone: user?.address?.phone || ""
// Add custom fields here
// company: user.company || ""
}
};
})
.slice(0, 100); // HubSpot batch limit
return {
contacts: JSON.stringify(contacts),
count: contacts.length,
page_number: inputData.loop_iteration
};
} catch(e) {
return {
error: true,
message: e.message
};
}
Step 8: Sync to HubSpot
- Add HubSpot → API Request (Beta)
- Configure:
| Field | Value |
|---|---|
| Stop on error | Yes |
| HTTP Method | POST |
| URL | https://api.hubapi.com/crm/v3/objects/contacts/batch/upsert |
| Additional request headers | Key: Content-Type
Value: application/json |
| Body |
{
"inputs": <strong>{{7. Contacts}}</strong>
}
|
⚠️ Important: Make sure to add the Content-Type: application/json header and map {{7. Contacts}} as a field (not as text in quotes).
Step 9: Validate Results
- Add Code by Zapier → JavaScript
- In Input Data:
hubspot_response→ 8. Response Bodypage_number→ 7. Page Number
- Paste this code:
try {
// Parse HubSpot response from Step 8
const response = JSON.parse(inputData.hubspot_response);
// Check if response exists
if (!response) {
return {
error: true,
error_title: "No Response from HubSpot",
message: "HubSpot API did not return a response",
page_number: inputData.page_number
};
}
// Extract results and errors from HubSpot response
const results = response.results || [];
const errors = response.errors || [];
const status = response.status || "UNKNOWN";
// Count successful and failed records
const successfulCount = results.length;
const failedCount = errors.length;
const totalProcessed = successfulCount + failedCount;
// Collect error details if any
const errorDetails = errors.map(err => ({
category: err.category || 'UNKNOWN',
message: err.message || 'No error message',
id: err.id || 'N/A',
status: err.status || 'N/A'
}));
// Check if all records failed
if (failedCount > 0 && successfulCount === 0) {
return {
error: true,
error_title: "All Contacts Failed",
message: `All ${failedCount} contacts failed to sync`,
successful_count: 0,
failed_count: failedCount,
error_details: errorDetails,
batch_status: status,
page_number: inputData.page_number
};
}
// Check for partial success
if (failedCount > 0 && successfulCount > 0) {
return {
error: true,
status: "partial_success",
successful_count: successfulCount,
failed_count: failedCount,
total_processed: totalProcessed,
error_details: errorDetails,
hubspot_ids: results.map(r => r.id),
batch_status: status,
page_number: inputData.page_number
};
}
// Full success
return {
error: false,
status: "success",
successful_count: successfulCount,
failed_count: 0,
total_processed: totalProcessed,
hubspot_ids: results.map(r => r.id),
batch_status: status,
page_number: inputData.page_number
};
} catch (error) {
return {
error: true,
error_title: "Failed to Validate HubSpot Response",
message: error.message,
page_number: inputData.page_number
};
}
🎉 Publish Your Zap
- Review all steps
- Click Publish at the top right
- Your Zap is now live!

Success! Attendees will now automatically sync to HubSpot when events end.
💡 Troubleshooting
| Error | Solution |
|---|---|
| "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. Contacts}}, not text in quotes |
| "Some required fields were not set" | Verify that id, idProperty, and email are present in Step 7 code |
| "INVALID_EMAIL" | Some emails are invalid. Valid contacts will still be created |
| Duplicate contacts | HubSpot automatically handles duplicates by email - existing contacts will be updated |
Adding Custom Fields
In Step 7 code, add fields inside the properties object:
properties: {
email: user.email.toLowerCase().trim(),
firstname: user.first_name || "",
lastname: user.last_name || user.email.split("@")[0],
phone: user.phone || "",
company: user.company || "",
custom_field: user.custom_value || ""
}
Note: Custom field names must match HubSpot property internal names (not labels).
Need Help?
- 📧 Contact CE-Go support
- 📚 HubSpot API Documentation
- 🔧 HubSpot Batch Upsert Endpoint
Happy syncing! 🎉
You've just automated your HubSpot CRM workflow!