Set up the following workflows to create and maintain the associations between your different object types.
- Workflow 1: Creates and maintains associations between Contacts and Campaigns, and Contacts and Campaign Members.
- Workflow 2: Creates and maintains associations between Campaign Members and Campaigns.
- Workflow 3: Updates campaign member statuses based on contact interactions with campaign assets.
Before you get started
- Your HubSpot account must have an Enterprise subscription to create custom objects.
- Your account must have the HubSpot-Salesforce integration installed.
- You must have completed the object, property, and field setup in [Salesforce - HubSpot Campaigns] | Step 1 | Set up custom objects and properties.
- You must have completed the Salesforce Integration custom object sync setup in* [Salesforce - HubSpot Campaigns] | Step 2 | Set up Salesforce Integration Custom Object Sync.*
Contact-Based workflow: create an association between Contact records and Marketing campaign members, and Contact records and Marketing Campaigns
- In your HubSpot account, navigate to Automation > Workflows
- In the top right, click Create workflow and select From scratch.
- In the left panel, select Met filter criteria.
- In the Choose a type of record that can enroll section, select Contact. Then, select Contact properties.
- Select your SF Campaign ID custom property
- In the Edit criteria section, select Is known.
- At the top, click Next.
- Click to toggle on the Re-enroll switch. The SF Campaign ID is known checkbox should be selected automatically.
- At the top, click Save and continue.
- In the left panel, search for and select the Create associations action.
- Set up your action:
- Enrolled object: Contact
- Object to associate: Marketing Campaign Member
- Select the Create association only without applying any label checkbox.
- Select a property of enrolled object: Email
- Select a property to match on: Email
- At the top, click Save.
**
**
- Click the +Add icon.
- In the left panel, search for and add another Create associations action.
- Set up your action:
- Enrolled object: Contact
- Object to associate: Marketing Campaign
- Select the Create association only without applying any label checkbox.
- Select a property of enrolled object: SF Campaign ID
- Select a property to match on: SF Campaign ID
- At the top, click Save.
- In the top right of the workflow editor, click Review and publish.
- In the right panel, under Do you want to enroll contacts that currently meet the enrollment criteria when the workflow turns on section, select No, only enroll contacts who meet the enrollment criteria after the workflow is turned on. Currently, there shouldn’t be any records that meet this criteria.
- Set up your Timing & Performance, Connections, and Workflow details accordingly. Alternatively, at the bottom, click Skip to turn on.
- At the bottom, click Turn on workflow.
Marketing Campaign Members (custom object-based workflow): create an association between Marketing Campaigns and Marketing Campaign members.
- In your HubSpot account, navigate to Automation > Workflows
- In the top right, click Create workflow and select From scratch.
- In the left panel, select Met filter criteria.
- In the Choose a type of record that can enroll section, select Marketing Campaign Member. Then, select Marketing Campaign Member properties.
- Select your SF Campaign ID custom property
- In the Edit criteria section, select Is known.
- At the top, click Next.
- Click to toggle on the Re-enroll switch. The SF Campaign ID is known checkbox should be selected automatically.
- At the top, click Save and continue.
- In the left panel, search for and select the Create associations action.
- Set up your action:
- Enrolled object: Contact
- Object to associate: Marketing Campaign Member
- Select the Create association only without applying any label checkbox.
- Select a property of enrolled object: SF Campaign ID
- Select a property to match on: SF Campaign ID
- At the top, click Save.
- In the top right of the workflow editor, click Review and publish.
- In the right panel, under Do you want to enroll contacts that currently meet the enrollment criteria when the workflow turns on section, select No, only enroll contacts who meet the enrollment criteria after the workflow is turned on. Currently, there shouldn’t be any records that meet this criteria.
- Set up your Timing & Performance, Connections, and Workflow details accordingly. Alternatively, at the bottom, click Skip to turn on.
- At the bottom, click Turn on workflow.
Contact-Based workflow: add records to Salesforce campaigns.
- In your HubSpot account, navigate to Automation > Workflows
- In the top right, click Create workflow and select From scratch.
- Set your workflow enrollment trigger. Generally, this should be a contact-based workflow. For example, you can set:
- Salesforce Campaign ID is known and Contact has filled out [Form name] on [Page name]. When using this trigger, you can set the Salesforce Campaign ID value for a specific campaign as a hidden field in the form.
- Salesforce Campaign ID is known and [Email Name] was sent to [Contact]. When using this trigger, you can use the Edit record action to add a Salesforce Campaign ID value on the contact.
- Click the + Add icon.
- In the left panel, search for and select the Set Salesforce campaign workflow action
- Set up your action:
- Campaign name: select an existing Salesforce Campaign.
- Status: select a status for your campaign.
After adding your record to a Salesforce campaign, the corresponding campaign member will be automatically created in Salesforce and sync to your HubSpot account. The new Salesforce campaign will then sync with the corresponding contact and campaign object using the above two workflows.





