Step by step guide to syncing Salesforce and HubSpot data in Tray

If you’ve ever tried to keep Salesforce and HubSpot in sync, you know it’s rarely as simple as “flip a switch and walk away.” Stuff breaks, fields don’t line up, and you end up with a mess if you’re not careful. This guide is for folks who want a straightforward, step-by-step approach to syncing Salesforce and HubSpot data using Tray. No fluff, just what you need to get it working—and keep it working.

Whether you’re in marketing ops, sales ops, or just the unlucky person who got “volunteered” for this task, you’ll find honest advice here. Let’s get into it.


Why Use Tray for Salesforce-HubSpot Sync?

Here’s the short version: Tray is a flexible automation platform that connects cloud apps. If you’re tired of brittle, one-way syncs—or you’ve hit limits with native integrations—Tray is worth a look.

But don’t expect magic. Setting up a reliable sync between Salesforce and HubSpot takes work. Tray gives you the tools, but you still need to know what you’re doing.

What Tray gets right: - Handles complex logic and mapping. - More flexible than native connectors. - Can accommodate “weird” field setups.

Where it falls short: - Not plug-and-play. There’s a learning curve. - Bad mapping or logic = bad data everywhere. - Some features (like error handling) need careful setup.

If you want simple, just use the native HubSpot-Salesforce connector and accept its limits. If you need more control, keep reading.


Step 1: Get Your Accounts and Access Lined Up

You’ll need admin-level access in Salesforce, HubSpot, and Tray. If you don’t have it, get someone who does, or you’ll be stuck immediately.

Checklist: - Salesforce: API access and a user with permission to read/write the objects you’ll sync (Leads, Contacts, etc.). - HubSpot: Super Admin or Integration permissions. - Tray: A workspace and the ability to add/manage workflows.

Pro tip: If you’re testing, use sandbox environments first. It’s easy to trash real data with a bad sync.


Step 2: Map Out What You Actually Need to Sync

Don’t just connect everything “because you can.” Figure out what matters:

  • Which objects? (Leads? Contacts? Companies? Deals?)
  • Which direction? (SFDC to HubSpot, HubSpot to SFDC, or both ways?)
  • Which fields? (Map them out. Don’t assume the same names mean the same thing.)
  • How often? (Real-time? Hourly? Daily?)

What to skip: Don’t sync every field. Only sync what you truly need. Otherwise, you’ll end up with sync errors and clutter.

Pro tip: Document your mapping in a spreadsheet before you build anything. It saves headaches later.


Step 3: Connect Salesforce and HubSpot to Tray

You’ll need to connect both platforms to Tray so it can talk to them.

Connect Salesforce

  1. In Tray, create a new workflow.
  2. Add the Salesforce connector.
  3. Authenticate with your Salesforce account (use OAuth if possible).
  4. Test the connection—make sure it works and you have the right permissions.

Connect HubSpot

  1. In the same workflow, add the HubSpot connector.
  2. Authenticate with your HubSpot account.
  3. Test this connection too.

Reality check: If Tray can’t see the objects or fields you want, double-check permissions. 99% of failures here are due to missing access.


Step 4: Build Your Sync Logic

This is where you decide how data moves between Salesforce and HubSpot. Tray’s drag-and-drop builder is powerful, but don’t let that fool you—it’s easy to make a mess.

Example: Sync Contacts from Salesforce to HubSpot

  1. Trigger: Decide what starts your workflow.
  2. Use a scheduled trigger (e.g., hourly) for regular syncs.
  3. Or use a webhook trigger if you want to push updates in near real-time.

  4. Find records in Salesforce:

  5. Use the Salesforce connector to search for records (e.g., Contacts updated since last sync).
  6. Filter out records you don’t want.

  7. Map Salesforce fields to HubSpot fields:

  8. Use Tray’s “Data Mapper” or manual mapping.
  9. Double-check data types and formats. (Emails, phone numbers, dates—these trip people up.)

  10. Send data to HubSpot:

  11. Use the HubSpot connector to create or update records.
  12. Set up deduplication logic (e.g., match on email).

  13. Handle errors:

  14. Add error-handling steps, like logging or email alerts.
  15. Don’t ignore this step. Silent failures are the fastest way to lose trust in your sync.

Example: Sync HubSpot updates back to Salesforce

Repeat the process, but reverse the direction: - Use HubSpot as the trigger. - Fetch changed records. - Map fields to Salesforce. - Write back—be careful about overwriting existing Salesforce data.

Warning: Two-way sync isn’t just “run both directions at once.” You need to deal with conflicts and prevent infinite loops.


Step 5: Test with a Tiny Sample

Don’t run your sync on the whole database right away.

  • Start with a handful of test records.
  • Watch for errors, bad mappings, or missing data.
  • Check both systems. Does the data look right on both the Salesforce and HubSpot side?

Pro tip: Add lots of logging in Tray during testing. It’s easier to remove later than to troubleshoot a silent workflow.


Step 6: Set Up Error Handling and Monitoring

No matter how careful you are, syncs break. That’s just reality.

  • Set up notifications (email, Slack, etc.) for errors or failed runs.
  • Log skipped records and reasons (e.g., missing required fields).
  • Consider creating a daily summary of records synced, failed, or skipped.

Ignore at your own risk: If you don’t monitor your sync, you’ll only find out it broke when a salesperson or marketer complains.


Step 7: Roll Out Gradually

Once you’re happy with your test runs, expand the sync slowly.

  • Increase the number of records.
  • Monitor for performance issues or unexpected data changes.
  • Keep a backup of your original data (if possible) before a big sync.

Don’t: Flip the switch for the entire database on your first run. You’ll regret it if something’s off.


Step 8: Maintain and Iterate

A sync isn’t “set it and forget it.” Things change:

  • Fields get added, renamed, or deleted in Salesforce or HubSpot.
  • Business logic changes (e.g., new lead assignment rules).
  • API limits or outages happen.

What works: Schedule a periodic review of your sync setup. Update mappings when things change.

What to ignore: Don’t try to sync every single field or object “just in case.” Focus on what actually drives your business.


Common Pitfalls and How to Avoid Them

  • Field Mismatches: Just because fields have the same name doesn’t mean they have the same format or purpose. Double-check.
  • Infinite Loops: Two-way syncs can loop endlessly if you update both systems on the same field. Use “last modified by integration” flags or timestamps to prevent this.
  • API Limits: Both Salesforce and HubSpot have API rate limits—watch these, or your sync might get throttled.
  • Permissions: Missing or lost permissions are a top cause of silent failures.
  • Overcomplicating: The more complex the sync, the harder it is to troubleshoot. Start simple.

Wrapping Up: Keep It Simple and Iterate

Syncing Salesforce and HubSpot with Tray isn’t rocket science, but it does require planning, patience, and a healthy respect for Murphy’s Law. Start small, document your mappings, and don’t be afraid to revisit your setup as your business changes.

Most importantly: don’t try to build the perfect sync on day one. Get the basics working, monitor it, and improve over time. That’s how you avoid headaches—and keep your data (and your sanity) intact.