Automatically Sync Event Attendees to Salesforce
What this Zap does
When your event ends in CE-Go, this Zap automatically syncs all attendees to Salesforce as Contacts—no more manual data entry!
Before you start
Make sure you have:
- A CE-Go account with at least one event
- A Salesforce account (any edition)
- Your Salesforce Instance URL (found in your Salesforce browser address bar)
⏱️ 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 Usersserver→ Type your Salesforce instance URL (e.g.,https://ability-computing-1896)
- Paste this code:
const server = inputData.server;
const url = `${server}.my.salesforce.com/services/data/v58.0/composite/sobjects`;
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,
server: server,
url: url
};
⚠️ Important: Replace server value with YOUR Salesforce instance URL!
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 Salesforce
- Add Code by Zapier → JavaScript
- In Input Data, add:
data→ 5. Step(Row) Output - Paste this code:
try {
const data = JSON.parse(inputData.data);
const users = data.results;
const contacts = users
.map(user => ({
attributes: { type: "Contact" },
FirstName: user.first_name || "",
LastName: user.last_name || user.email.split("@")[0],
Email: user.email.toLowerCase().trim()
// Add custom fields: Phone: user.phone || ""
}))
.slice(0, 200); // Salesforce 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 Salesforce
- Add Salesforce → API Request (Beta)
- Configure:
| Field | Value |
|---|---|
| HTTP Method | POST |
| URL | 2. Url |
| Headers | Key: Content-TypeValue: application/json |
| Body | {
"allOrNone": false,
"records": <strong>{{7. Contacts}}</strong>
}
|
Step 9: Validate Results
- Add Code by Zapier → JavaScript
- In Input Data:
salesforce_response→ 8. Bodypage_number→ 7. Page Number
- Paste the validation code (counts successful/failed contacts)
🎉 Publish Your Zap
- Review all steps
- Click Publish at the top right
- Your Zap is now live!
Success! Attendees will now automatically sync to Salesforce when events end.
💡 Troubleshooting
| Error | Solution |
|---|---|
| "HTTPS is required" | Use full URL with https:// in Step 2 server field |
| "Domain did not match" | Use .my.salesforce.com, NOT .lightning.force.com |
| "INVALID_EMAIL_ADDRESS" | Some emails are invalid. Valid contacts still created with allOrNone: false |
| "REQUIRED_FIELD_MISSING" | Check LastName fallback in Step 7 code |
Adding Custom Fields
In Step 7 code, add after Email line:
Phone: user.phone || "", Custom_Field__c: user.custom_value || ""
Need Help?
- 📧 Contact CE-Go support
- 📚 Salesforce API Docs
Happy syncing! 🎉
You've just automated your CRM workflow!