Loading...

Exchange Record IDs on Record Creation Between Systems in HubSpot Using Workflow Custom Coded Action

How to Sync Data Between HubSpot Portals and Track Record IDs In this video, I’ll show you how to sync data between two HubSpot portals (Portal A and Portal B) while ensuring that the record IDs are tracked and saved in both systems.

This is crucial for maintaining data integrity and avoiding duplicates when syncing records.

What You’ll Learn ✅ How to create records in Portal B from Portal A. ✅ How to pass the Portal A record ID to Portal B as an integration_id. ✅ How to save the Portal B record ID back to Portal A for tracking. ✅ How to use HubSpot’s API to automate this process.

Key Steps Set Up Integration IDs: Create a custom property called integration_id in Portal B to store the Portal A record ID. Create a custom property called portal_b_id in Portal A to store the Portal B record ID. Sync Data from Portal A to Portal B: Use the HubSpot API to create a record in Portal B with the integration_id set to the Portal A record ID. Save the Portal B ID Back to Portal A: After creating the record in Portal B, update the corresponding record in Portal A with the new Portal B ID (portal_b_id). Avoid Duplicates: Before creating a record in Portal B, check if a record with the same integration_id already exists. Why This Matters Data Integrity: Ensures records in both portals are linked and up-to-date. Avoid Duplicates: Prevents duplicate records by checking for existing records before creating new ones. Automation: Saves time by automating the sync process between portals. Resources Mentioned in the Video HubSpot API Documentation Example Code: GitHub Gist (Link to your code repository or paste the code in the description) Timestamps 00:00 – Introduction: Why track record IDs during sync? 00:44 – Setting up custom properties (integration_id and portal_b_id) 01:32 – Syncing data from Portal A to Portal B 03:11 – Saving the Portal B ID back to Portal A 05:08 – Testing the workflow with example data 07:24 – Debugging and verifying the sync Pro Tip Always test your workflow with sample data to ensure the sync works as expected. Use console.log to debug and verify the data being passed between portals. If you found this video helpful, don’t forget to like, subscribe, and hit the notification bell for more HubSpot tips and tutorials!

Leave your comment