# Salesforce Campaigns Sync

**URL:** <https://community.hubspot.com/t/salesforce-campaigns-sync/95197>\
**Category:** APIs & Integrations\
**Tags:** professional\
**Created:** [December 1, 2023, 10:07am UTC](https://community.hubspot.com/t/salesforce-campaigns-sync/95197 "2023-12-01T10:07:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![SHogan1](https://avatars.discourse-cdn.com/v4/letter/s/ad7895/32.png) [@SHogan1](https://community.hubspot.com/u/SHogan1)\
**Post date:** [December 1, 2023, 10:07am UTC](https://community.hubspot.com/t/salesforce-campaigns-sync/95197/1 "2023-12-01T10:07:55Z")

</div>

Hello, I am wondering if anyone has any experience with the below and could offer some assistance.

We have a salesforce campaign for each asset (webinar, guide, form) on our website. When someone completes a form submission the salesforce campaign is hidden in a HubSpot form and stored in a field in Hubspot.  
I’m hoping to build a Hubspot automation that  
1. Takes the submitted ID.  
2. Loops through all our Salesforce Campaign Ids.  
3. Finds a match.  
4. Then set the correct salesforce campaign for that contact.

Have been advised that an option could be to get your Salesforce IDs with a Webhook action - then use the output of that action in a custom coded action to say if Contact’s Campaign = the outcome of the webook then do action xyz.

It is the coded action part using either Python or Node.js etc that i am struggling with..

---

<div class="post-metadata">

**Author:** ![PamCotton](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/pamcotton/32/47916_2.png) [@PamCotton](https://community.hubspot.com/u/PamCotton)\
**Post date:** [December 1, 2023, 3:38pm UTC](https://community.hubspot.com/t/salesforce-campaigns-sync/95197/2 "2023-12-01T15:38:12Z")

</div>

Hello @SHogan1, Happy Friday!

I want to share [this knowledge](https://knowledge.hubspot.com/campaigns/campaigns-faq)base explaining the differences between HubSpot and Salesforce campaigns. Although both HubSpot and Salesforce have campaigns, these two objects do not correspond to each other.

Also, I found a [similar post here](https://community.hubspot.com/t5/APIs-Integrations/We-want-Salesforce-Campaigns-to-sync-with-Hubspot-Campaign/m-p/862678#M68112)where @HFisher7 explained more about it."

The HubSpot and Salesforce integration will also create a contact property called ‘Salesforce campaign ID.’ The Salesforce Campaign ID field will sync to their HubSpot contact record if a Salesforce lead or contact is associated with a Salesforce campaign. This property could then be used to segment contacts in HubSpot."

I hope this information helps.

Pam

---

<div class="post-metadata">

**Author:** ![SHogan1](https://avatars.discourse-cdn.com/v4/letter/s/ad7895/32.png) [@SHogan1](https://community.hubspot.com/u/SHogan1)\
**Post date:** [December 1, 2023, 4:27pm UTC](https://community.hubspot.com/t/salesforce-campaigns-sync/95197/3 "2023-12-01T16:27:33Z")

</div>

Thank you!! It is the code issue where we want to connect the values in the ‘Recent SF Campaign’ field (which is from a form fill on our website) to the salesforce campaign ID where I am having difficulty!

---

<div class="post-metadata">

**Author:** ![alisonhebert](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/alisonhebert/32/196878_2.png) [@alisonhebert](https://community.hubspot.com/u/alisonhebert)\
**Post date:** [August 8, 2024, 9:25pm UTC](https://community.hubspot.com/t/salesforce-campaigns-sync/95197/4 "2024-08-08T21:25:58Z")

</div>

You probably have already found a solution but I am just coming across this post in a search.

In your case, you could map the submitted ID field through to a salesforce field on the lead/contact record, and then use a Salesforce Flow “Get Records” function to query the campagin IDs for a match. Then use the “Create Record” function to create a campaign member record. Remember to include the campaign ID, lead/contact ID and the member status you’d like to set in the create operation.

---

<div class="post-metadata">

**Author:** ![JSanders16](https://avatars.discourse-cdn.com/v4/letter/j/ed655f/32.png) [@JSanders16](https://community.hubspot.com/u/JSanders16)\
**Post date:** [August 24, 2025, 12:16pm UTC](https://community.hubspot.com/t/salesforce-campaigns-sync/95197/5 "2025-08-24T12:16:09Z")

</div>

What you want is doable with a custom-coded action that calls SF’s REST API to upsert a CampaignMember using the stored Campaign ID. If you’d rather skip writing/maintaining that code, a low‑code option like [Skyvia](https://ecosystem.hubspot.com/marketplace/apps/skyvia) can read the ID from HubSpot and map contacts to the matching Salesforce campaign automatically.
