How to use workflows with Salesforce

Last updated: May 15, 2018

Applies to:

Marketing Hub: Pro, Enterprise
Sales Hub: Professional

With the Salesforce integration, you can not only sync data between HubSpot and Salesforce, but also trigger various actions between the two systems. Using your HubSpot workflows with Salesforce, your sales reps can enroll their leads into select HubSpot workflows, set and assign a Salesforce task to note what action is needed and what action to take, set company property values that can sync back to Salesforce, and enroll contacts in Salesforce Campaigns.

This feature is available on Salesforce version 2.57 or greater and was designed to strengthen the tie between what sales and marketing are doing in their smarketing efforts.

How to manually enroll Salesforce leads and contacts into a HubSpot workflow

You may have a workflow designed for your leads in HubSpot but still want your sales reps, who work primarily in Salesforce, to enroll leads or contacts in that HubSpot workflow.

When you’re integrated with Salesforce, you get an option in your workflow settings to allow contact enrollment into the workflow from Salesforce. When this is set to Yes, your sales reps will be able to quickly add a lead or contact from Salesforce into your HubSpot workflow. In order to have access to this feature, you need to have the Lead Nurturing visualforce page added to your lead and contact layout to enroll contacts in workflows from Salesforce.

Please note: you will not be able to enroll a Salesforce lead or a contact into a workflow until that record syncs between the two systems. If you see No data on file within the visualforce layout, that lead or contact has not sycned with HubSpot or no longer has HubSpot Intelligence associated with it, and you will not be able to enroll them into workflows in HubSpot.

Once the record syncs, your available workflows will appear in the HubSpot Lead Nurturing section in your leads and contacts in Salesforce. To enroll a lead or contact into a workflow from within Salesforce, follow these instructions:

1. Navigate to Workflows

Navigate to Workflows:
  • In your HubSpot account, navigate to Automation > Workflows.
  • In your Sales Hub Professional account, navigate to Automation > Workflows.

2. Choose a workflow and navigate to Settings

Hover over the workflow you'd like to have available in Salesforce and click Edit to edit it. Once in the workflow, click Settings from the top menu.

3. Allow contact enrollment from Salesforce

From within this Settings screen, make sure General is selected from the left sidebar menu. Then locate the section entitled Allow contact enrollment into this workflow from Salesforce? and make sure the radio button next to Yes, allow enrollment from Salesforce is selected.

4. Activate workflow

At the top-right, click Review. Review your workflow settings, then click Activate to turn on your workflow. 

Your workflow must be active in order for it to show up as an option for enrollment from Salesforce.

5. Navigate to your lead or contact in Salesforce

Find the lead or contact you'd like to enroll from Salesforce. Scroll to the HubSpot Intelligence section and look for where you put the workflows Lead Nurturing visualforce section of the layout. You need to have the Lead Nurturing visualforce section added to your lead and contact layout to enroll contacts in workflows from Salesforce in order to see this section.

6. Select workflow to enroll lead or contact in.

From the dropdown menu, select the HubSpot workflow for your lead or contact to be enrolled in. Click Enroll in WorkflowYour lead or contact is now enrolled in your HubSpot workflow.

How to add a Salesforce task in your workflows

In workflows, one of your available actions is Set a Salesforce task. With this action, you can assign a task to either the integration user (the user whose Salesforce credentials were used to set up the integration) or to the owner of the lead or contact record. You’ll also choose a status, a subject line, and a comment for that task.

This can be useful if you want to notify the lead owner to take specific action based on their workflow enrollment. For example, if your lead opens a trial and enrolls in your trial workflow, one of the actions may be to set a Salesforce task. You can set it up to assign that task to the lead owner with a comment for them to reach out to the contact to start a connection. The rep would then work with the lead to find out their pain points and how your product can help them.

To set a Salesforce task in a HubSpot workflow, follow these instructions:

1. Navigate to Workflows

Navigate to Workflows:
  • In your HubSpot account, navigate to Automation > Workflows.
  • In your Sales Hub Professional account, navigate to Automation > Workflows.

Once there, click New workflow to create a new workflow, or edit an existing workflow by hovering over it and clicking Edit.

2. Add action to set a Salesforce task

Once you’ve either created your workflow or opened an existing workflow, click the plus icon. In the left sidebar menu that appears, search for and select Set a Salesforce task.

3. Fill in the task details

After selecting the action, set up the following:

  1. Under Assign to, select the radio button for Owner Email or Integration user.
  2. From the Status dropdown menu, select a status for the task. 
  3. Decide how urgent or important the task is using the Priority dropdown menu.
  4. In the Due date field, enter the number of days before the task is due.
  5. Add a task subject line in the Subject line field.
  6. In the Description field, include any additional comments you want to pass on to the owner of the task.
  7. Click Save.

4. Activate your workflow

At the top-right, click Review. Review your workflow settings, then click Activate to turn on your workflow. 

How to set a company property value

Although the setup and execution are identical in nature, setting a company property value works a little different than setting a contact property value. When you set a contact property value, you are setting it specifically for the contact in question. When you set a company property value, you are setting it for the company record (known as an Account record in Salesforce) associated with their contact record; since the company is usually linked to multiple contacts, you are also updating this property for all other contacts listed in that company (or account).

For example, if you have multiple contacts that are a part of the same company who should have their company property Company URL updated (such as the case in rebranding or buy-out), you can send one contact through a workflow to update their company URL property and it will update the contact’s company information, which in turn will update all other contacts associated with that company.

While you can make this in Salesforce as well, perhaps the person in charge of completing this task doesn’t have Salesforce access, or doesn’t want to leave HubSpot and stay focused on their tasks.

To update a company property through a workflow, follow these instructions:

1. Navigate to Workflows

Navigate to Workflows:
  • In your HubSpot account, navigate to Automation > Workflows.
  • In your Sales Hub Professional account, navigate to Automation > Workflows.

Once there, click New workflow to create a new workflow, or edit an existing workflow by hovering over it and clicking Edit.

2. Add an action to set a company property value

Once you’ve either created your workflow or opened an existing workflow, click the plus icon to add an action and select Set company property value from the sidebar menu.

3. Select a value for your company property

From the options, choose the company property value you wish to set and as well as the value for that property. Then click Save.

Please note: Salesforce owner information is dynamically pulled through a reference field, and it cannot be set or changed through HubSpot workflows.

4. Activate workflow

At the top-right, click Review. Review your workflow settings, then click Activate to turn on your workflow. 

How to set a Salesforce campaign with a workflow

In addition to setting tasks and updating company properties, you can enroll contacts in Salesforce campaigns through HubSpot workflows.

To set a Salesforce campaign for a contact through a workflow, follow these instructions:

1. Navigate to Workflows

Navigate to Workflows:
  • In your HubSpot account, navigate to Automation > Workflows.
  • In your Sales Hub Professional account, navigate to Automation > Workflows.

Once there, click New workflow to create a new workflow, or edit an existing workflow by hovering over it and clicking Edit.

2. Select Set a Salesforce campaign

Once you’ve either created your workflow or opened an existing workflow, click the plus icon to add an action and select Set a Salesforce campaign.

3. Select campaign and status

Select the Salesforce campaign to enroll a contact in. You can also set the status of that contact in the campaign. Click Save when you're ready.

Please note: you are only able to enroll contacts in active Salesforce campaigns.

4. Activate workflow

At the top-right, click Review. Review your workflow settings, then click Activate to turn on your workflow. 

Was this article helpful?

If you still need help you can get answers from the , or to contact support.

Previous article:

Next article: