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

  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
    • server → Type your Salesforce instance URL (e.g., https://ability-computing-1896)
  3. 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

  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 Salesforce

  1. Add Code by ZapierJavaScript
  2. In Input Data, add: data5. Step(Row) Output
  3. 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

  1. Add SalesforceAPI Request (Beta)
  2. Configure:
Field Value
HTTP Method POST
URL 2. Url
Headers Key: Content-Type
Value: application/json
Body
{
  "allOrNone": false,
  "records": <strong>{{7. Contacts}}</strong>
}
		

Step 9: Validate Results

  1. Add Code by ZapierJavaScript
  2. In Input Data:
    • salesforce_response8. Body
    • page_number7. Page Number
  3. Paste the validation code (counts successful/failed contacts)

🎉 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 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?

Happy syncing! 🎉
You've just automated your CRM 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