Back to Integrations
integrationHubSpot node
integrationSalesforce node

HubSpot and Salesforce integration

Save yourself the work of writing custom integrations for HubSpot and Salesforce and use n8n instead. Build adaptable and scalable Sales, and Communication workflows that work with your technology stack. All within a building experience you will love.

How to connect HubSpot and Salesforce

  • Step 1: Create a new workflow
  • Step 2: Add and configure nodes
  • Step 3: Connect
  • Step 4: Customize and extend your integration
  • Step 5: Test and activate your workflow

Step 1: Create a new workflow and add the first step

In n8n, click the "Add workflow" button in the Workflows tab to create a new workflow. Add the starting point – a trigger on when your workflow should run: an app event, a schedule, a webhook call, another workflow, an AI chat, or a manual trigger. Sometimes, the HTTP Request node might already serve as your starting point.

HubSpot and Salesforce integration: Create a new workflow and add the first step

Step 2: Add and configure HubSpot and Salesforce nodes

You can find HubSpot and Salesforce in the nodes panel. Drag them onto your workflow canvas, selecting their actions. Click each node, choose a credential, and authenticate to grant n8n access. Configure HubSpot and Salesforce nodes one by one: input data on the left, parameters in the middle, and output data on the right.

HubSpot and Salesforce integration: Add and configure HubSpot and Salesforce nodes

Step 3: Connect HubSpot and Salesforce

A connection establishes a link between HubSpot and Salesforce (or vice versa) to route data through the workflow. Data flows from the output of one node to the input of another. You can have single or multiple connections for each node.

HubSpot and Salesforce integration: Connect HubSpot and Salesforce

Step 4: Customize and extend your HubSpot and Salesforce integration

Use n8n's core nodes such as If, Split Out, Merge, and others to transform and manipulate data. Write custom JavaScript or Python in the Code node and run it as a step in your workflow. Connect HubSpot and Salesforce with any of n8n’s 1000+ integrations, and incorporate advanced AI logic into your workflows.

HubSpot and Salesforce integration: Customize and extend your HubSpot and Salesforce integration

Step 5: Test and activate your HubSpot and Salesforce workflow

Save and run the workflow to see if everything works as expected. Based on your configuration, data should flow from HubSpot to Salesforce or vice versa. Easily debug your workflow: you can check past executions to isolate and fix the mistake. Once you've tested everything, make sure to save your workflow and activate it.

HubSpot and Salesforce integration: Test and activate your HubSpot and Salesforce workflow

Automate HubSpot to Salesforce lead creation with Explorium AI enrichment

Automatically enrich prospect data from HubSpot using Explorium and create leads in Salesforce

This n8n workflow streamlines the process of enriching prospect information by automatically pulling data from HubSpot, processing it through Explorium's AI-powered tools, and creating new leads in Salesforce with enhanced prospect details.

Credentials Required

To use this workflow, set up the following credentials in your n8n environment:

HubSpot
Type**: App Token (or OAuth2 for broader compatibility)
Used for**: triggering on new contacts, fetching contact data

Explorium API
Type**: Generic Header Auth
Header**: Authorization
Value**: Bearer YOUR_API_KEY

Get explorium api key

Salesforce
Type**: OAuth2 or Username/Password
Used for**: creating new lead records

Go to Settings → Credentials, create these three credentials, and assign them in the respective nodes before running the workflow.

Workflow Overview

Node 1: HubSpot Trigger
This node listens for real-time events from the connected HubSpot account. Once triggered, the node passes metadata about the event to the next step in the flow.

Node 2: HubSpot
This node fetches contact details from HubSpot after the trigger event.

Credential**: Connected using a HubSpot App Token
Resource**: Contact
Operation**: Get Contact
Return All**: Disabled

This node retrieves the full contact details needed for further processing and enrichment.

Node 3: Match prospect
This node sends each contact's data to Explorium's AI-powered prospect matching API in real time.

Method**: POST
Endpoint**: https://api.explorium.ai/v1/prospects/match
Authentication**: Generic Header Auth (using a configured credential)
Headers**: Content-Type: application/json

The request body is dynamically built from contact data, typically including: full_name, company_name, email, phone_number, linkedin. These fields are matched against Explorium's intelligence graph to return enriched or validated profiles.

Response Output: total_matches, matched_prospects, and a prospect_id. Each response is used downstream to enrich, validate, or create lead information.

Node 4: Filter
This node filters the output from the Match prospect step to ensure that only valid, matched results continue in the flow. Only records that contain at least one matched prospect with a non-null prospect_id are passed forward.

Status: Currently deactivated (as shown by the "Deactivate" label)

Node 5: Extract Prospect IDs from Matched Results
This node extracts all valid prospect_id values from previously matched prospects and compiles them into a flat array. It loops over all matched items, extracts each prospect_id from the matched_prospects array and returns a single object with an array of all prospect_ids.

Node 6: Explorium Enrich Contacts Information
This node performs bulk enrichment of contacts by querying Explorium with a list of matched prospect_ids.

Node Configuration:
Method**: POST
Endpoint**: https://api.explorium.ai/v1/prospects/contacts_information/bulk_enrich
Authentication**: Header Auth (using saved credentials)
Headers**: "Content-Type": "application/json", "Accept": "application/json"

Returns enriched contact information, such as:
emails**: professional/personal email addresses
phone_numbers**: mobile and work numbers
professions_email, **professional_email_status, mobile_phone

Node 7: Explorium Enrich Profiles
This additional enrichment node provides supplementary contact data enhancement, running in parallel with the primary enrichment process.

Node 8: Merge
This node combines multiple data streams from the parallel enrichment processes into a single output, allowing you to consolidate data from different Explorium enrichment endpoints. The "combine" setting indicates it will merge the incoming data streams rather than overwriting them.

Node 9: Code - flatten
This custom code node processes and transforms the merged enrichment data before creating the Salesforce lead. It can be used to:
Flatten nested data structures
Format data according to Salesforce field requirements
Apply business logic or data validation
Map Explorium fields to Salesforce lead properties
Handle data type conversions

Node 10: Salesforce
This final node creates new leads in Salesforce using the enriched data returned by Explorium.

Credential**: Salesforce OAuth2 or Username/Password
Resource**: Lead
Operation**: Create Lead

The node creates new lead records with enriched information including contact details, company information, and professional data obtained through the Explorium enrichment process.

Workflow Flow Summary

Trigger: HubSpot webhook triggers on new/updated contacts
Fetch: Retrieve contact details from HubSpot
Match: Find prospect matches using Explorium
Filter: Keep only successfully matched prospects (currently deactivated)
Extract: Compile prospect IDs for bulk enrichment
Enrich: Parallel enrichment of contact information through multiple Explorium endpoints
Merge: Combine enrichment results
Transform: Flatten and prepare data for Salesforce (Code node)
Create: Create new lead records in Salesforce

This workflow ensures comprehensive data enrichment while maintaining data quality and providing a seamless integration between HubSpot prospect data and Salesforce lead creation. The parallel enrichment structure maximizes data collection efficiency before creating high-quality leads in your CRM system.

Nodes used in this workflow

Popular HubSpot and Salesforce workflows

+5

Automate B2B SaaS Renewal Risk Management with CRM, Support & Usage Data

Description This workflow is designed for B2B/SaaS teams who want to secure renewals before it’s too late. It runs every day, identifies all accounts whose licenses are up for renewal in J–30, enriches them with CRM, product usage and support data, computes an internal churn risk level, and then triggers the appropriate playbook: HIGH risk** → full escalation (tasks, alerts, emails) MEDIUM risk** → proactive follow-up by Customer Success LOW risk** → light renewal touchpoint / monitoring Everything is logged into a database table so that you can build dashboards, run analysis, or plug additional automations on top. How it works Daily detection (J–30 renewals) A scheduled trigger runs every morning and queries your database (Postgres / Supabase) to fetch all active subscriptions expiring in 30 days. Each row includes the account identifier, name, renewal date and basic commercial data. Data enrichment across tools For each account, the workflow calls several business systems to collect context: HubSpot → engagement history Salesforce → account profile and segment Pipedrive → deal activities and associated products Analytics API → product feature usage and activity trends Zendesk → recent support tickets and potential friction signals All of this is merged into a single, unified item. Churn scoring & routing An internal scoring step evaluates the risk for each account based on multiple signals (engagement, usage, support, timing). The workflow then categorizes each account into one of three risk levels: HIGH – strong churn signals → needs immediate attention MEDIUM – some warning signs → needs proactive follow-up LOW – looks healthy → light renewal reminder A Switch node routes each account to the relevant playbook. Automated playbooks 🔴 HIGH risk Create a Trello card on a dedicated “High-Risk Renewals” board/list Create a Jira ticket for the CS / AM team Send a Slack alert in a designated channel Send a detailed email to the CSM and/or account manager 🟠 MEDIUM risk Create a Trello card in a “Renewals – Follow-up” list Send a contextual email to the CSM to recommend a proactive check-in 🟢 LOW risk Send a soft renewal email / internal note to keep the account on the radar Logging & daily reporting For every processed account, the workflow prepares a structured log record (account, renewal date, risk level, basic context). A Postgres node is used to insert the data into a churn_logs table. At the end of each run, all processed accounts are aggregated and a daily summary email is sent (for example to the Customer Success leadership team), listing the renewals and their risk levels. Requirements Database A table named churn_logs (or equivalent) to store workflow decisions and history. Example fields: account_id, account_name, end_date, riskScore, riskLevel, playbook, trello_link, jira_link, timestamp. External APIs HubSpot (engagement data) Salesforce (account profile) Pipedrive (deals & products) Zendesk (support tickets) Optional: product analytics API for usage metrics Communication & task tools Gmail (emails to CSM / AM / summary recipients) Slack (alert channel for high-risk cases) Trello (task creation for CS follow-up) Jira (escalation tickets for high-risk renewals) Configuration variables Thresholds are configured in the Init config & thresholds node: days_before_renewal churn_threshold_high churn_threshold_medium These parameters let you adapt the detection window and risk sensitivity to your own business rules. Typical use cases Customer Success teams who want a daily churn watchlist without exporting spreadsheets. RevOps teams looking to standardize renewal playbooks across tools. SaaS companies who need to prioritize renewals based on real risk signals rather than gut feeling. Product-led organizations that want to combine usage data + CRM + support into one automated process. Tutorial video Watch the Youtube Tutorial video About me : I’m Yassin a Project & Product Manager Scaling tech products with data-driven project management. 📬 Feel free to connect with me on Linkedin

Automate HubSpot to Salesforce Lead Creation with Explorium AI Enrichment

Automatically enrich prospect data from HubSpot using Explorium and create leads in Salesforce This n8n workflow streamlines the process of enriching prospect information by automatically pulling data from HubSpot, processing it through Explorium's AI-powered tools, and creating new leads in Salesforce with enhanced prospect details. Credentials Required To use this workflow, set up the following credentials in your n8n environment: HubSpot Type**: App Token (or OAuth2 for broader compatibility) Used for**: triggering on new contacts, fetching contact data Explorium API Type**: Generic Header Auth Header**: Authorization Value**: Bearer YOUR_API_KEY Get explorium api key Salesforce Type**: OAuth2 or Username/Password Used for**: creating new lead records Go to Settings → Credentials, create these three credentials, and assign them in the respective nodes before running the workflow. Workflow Overview Node 1: HubSpot Trigger This node listens for real-time events from the connected HubSpot account. Once triggered, the node passes metadata about the event to the next step in the flow. Node 2: HubSpot This node fetches contact details from HubSpot after the trigger event. Credential**: Connected using a HubSpot App Token Resource**: Contact Operation**: Get Contact Return All**: Disabled This node retrieves the full contact details needed for further processing and enrichment. Node 3: Match prospect This node sends each contact's data to Explorium's AI-powered prospect matching API in real time. Method**: POST Endpoint**: https://api.explorium.ai/v1/prospects/match Authentication**: Generic Header Auth (using a configured credential) Headers**: Content-Type: application/json The request body is dynamically built from contact data, typically including: full_name, company_name, email, phone_number, linkedin. These fields are matched against Explorium's intelligence graph to return enriched or validated profiles. Response Output: total_matches, matched_prospects, and a prospect_id. Each response is used downstream to enrich, validate, or create lead information. Node 4: Filter This node filters the output from the Match prospect step to ensure that only valid, matched results continue in the flow. Only records that contain at least one matched prospect with a non-null prospect_id are passed forward. Status: Currently deactivated (as shown by the "Deactivate" label) Node 5: Extract Prospect IDs from Matched Results This node extracts all valid prospect_id values from previously matched prospects and compiles them into a flat array. It loops over all matched items, extracts each prospect_id from the matched_prospects array and returns a single object with an array of all prospect_ids. Node 6: Explorium Enrich Contacts Information This node performs bulk enrichment of contacts by querying Explorium with a list of matched prospect_ids. Node Configuration: Method**: POST Endpoint**: https://api.explorium.ai/v1/prospects/contacts_information/bulk_enrich Authentication**: Header Auth (using saved credentials) Headers**: "Content-Type": "application/json", "Accept": "application/json" Returns enriched contact information, such as: emails**: professional/personal email addresses phone_numbers**: mobile and work numbers professions_email, **professional_email_status, mobile_phone Node 7: Explorium Enrich Profiles This additional enrichment node provides supplementary contact data enhancement, running in parallel with the primary enrichment process. Node 8: Merge This node combines multiple data streams from the parallel enrichment processes into a single output, allowing you to consolidate data from different Explorium enrichment endpoints. The "combine" setting indicates it will merge the incoming data streams rather than overwriting them. Node 9: Code - flatten This custom code node processes and transforms the merged enrichment data before creating the Salesforce lead. It can be used to: Flatten nested data structures Format data according to Salesforce field requirements Apply business logic or data validation Map Explorium fields to Salesforce lead properties Handle data type conversions Node 10: Salesforce This final node creates new leads in Salesforce using the enriched data returned by Explorium. Credential**: Salesforce OAuth2 or Username/Password Resource**: Lead Operation**: Create Lead The node creates new lead records with enriched information including contact details, company information, and professional data obtained through the Explorium enrichment process. Workflow Flow Summary Trigger: HubSpot webhook triggers on new/updated contacts Fetch: Retrieve contact details from HubSpot Match: Find prospect matches using Explorium Filter: Keep only successfully matched prospects (currently deactivated) Extract: Compile prospect IDs for bulk enrichment Enrich: Parallel enrichment of contact information through multiple Explorium endpoints Merge: Combine enrichment results Transform: Flatten and prepare data for Salesforce (Code node) Create: Create new lead records in Salesforce This workflow ensures comprehensive data enrichment while maintaining data quality and providing a seamless integration between HubSpot prospect data and Salesforce lead creation. The parallel enrichment structure maximizes data collection efficiency before creating high-quality leads in your CRM system.
+6

Analyze customer feedback and send AI-written replies with GPT-4 and Gmail

How It Works This workflow automates customer feedback processing by analyzing sentiment, identifying key issues, generating personalized responses, and escalating critical cases to support teams when required. Designed for customer success managers, support teams, and product managers, it enables scalable feedback handling without compromising response quality or urgency. The workflow eliminates manual triage and response drafting by normalizing incoming feedback, performing sentiment and topic analysis, generating context-aware AI responses, validating tone and intent, escalating high-risk or negative feedback, logging all interactions for traceability, and delivering automated replies via email. Setup Steps Configure webhook trigger URL for feedback form integration or email parsing Add OpenAI API key for sentiment analysis and response generation Connect Anthropic Claude API for alternative response generation and validation Set up Google Sheets integration for feedback logging and analytics tracking Configure Gmail OAuth2 credentials for automated customer response delivery Integrate support ticket system (Zendesk, Freshdesk) for escalation routing Prerequisites OpenAI API key, Anthropic Claude API key (optional), Google Workspace account (Sheets, Gmail) Use Cases Product feedback management, customer support automation Customization Adjust sentiment scoring thresholds per industry standards, modify response templates Benefits Responds to feedback 95% faster, maintains consistent response quality across all interactions

Qualify & Route Leads Across Channels with GPT-4o, Slack & CRM Integration

This n8n template demonstrates how to use AI to capture, qualify, and route inbound leads automatically from email or web forms. It extracts key business information using AI, scores the lead based on your ideal customer profile, creates CRM records, notifies your team on Slack, and logs all activity—including failures—to Google Sheets. Use cases include: automating sales inboxes, qualifying form leads for agencies or SaaS products, routing high-fit prospects to the right territory owner, and keeping your sales and ops teams aligned without manual data entry. Good to know The OpenAI model is used for lead data extraction and will incur a small cost per run depending on volume. This workflow supports either Salesforce or HubSpot as the CRM system—select which one in the configuration node. You’ll need valid credentials for Gmail (or another email service), OpenAI, Slack, Google Sheets, and your chosen CRM before running. How it works Triggers: A Gmail trigger polls for new inbound emails. A Webhook node receives submissions from any online form. Both sources merge into a single pipeline. Validation: Incoming data is checked for required fields (email or text). Invalid entries are routed to the Dead Letter Queue (DLQ) for review. AI Extraction: The OpenAI node extracts structured fields like company name, size, industry, role, region, problem statement, and budget signals from free-form text. Parsing & Scoring: The AI output is parsed, then a code node calculates a 0–100 lead score based on transparent criteria—industry, size, role, problem clarity, and budget mentions. It also assigns a lead tier (Hot, Warm, Cold, Unqualified). CRM Routing: Depending on your configuration, the workflow creates a Salesforce lead (default) or can be easily adapted for HubSpot. Territory or CRM owner routing can be extended here. Slack Notification: A rich Slack message summarizes the lead score and reasoning and includes a “Create intro email” button for quick action. Logging: All successful leads are logged to Google Sheets for reporting. Any failed or invalid leads are logged separately to the DLQ tab for auditing. How to use Configure your credentials for Gmail, OpenAI, Slack, Google Sheets, and your CRM. Open the Workflow Configuration node and fill in your target industries, buyer roles, company size, Slack channel ID, Google Sheets URL, and CRM choice. Create corresponding tabs in your Google Sheet for Leads and DLQ. Test by sending a sample email or form submission, then watch the workflow extract, score, route, and notify automatically. Requirements OpenAI account for text extraction Gmail (or other email provider) for the email trigger Slack for lead notifications Google Sheets for logging leads and DLQ entries Salesforce or HubSpot account for CRM integration Customizing this workflow This template can be expanded in many ways: Add HubSpot routing on the first Switch output. Integrate a Slack button handler to auto-generate intro emails. Add retry and backoff logic for resilience. Modify the scoring rubric in the code node to match your unique ICP. Connect additional sources, such as LinkedIn forms or landing page builders, for omnichannel lead capture.

Build your own HubSpot and Salesforce integration

Create custom HubSpot and Salesforce workflows by choosing triggers and actions. Nodes come with global operations and settings, as well as app-specific parameters that can be configured. You can also use the HTTP Request node to query data from any app or service with a REST API.

HubSpot supported actions

Create
Create a company
Delete
Delete a company
Get
Get a company
Get Many
Get many companies
Get Recently Created/Updated
Get recently created/updated companies
Search
Search companies by their website domain
Update
Update a company
Create or Update
Create a new contact, or update the current one if it already exists (upsert)
Delete
Delete a contact
Get
Get a contact
Get Many
Get many contacts
Get Recently Created/Updated
Get recently created/updated contacts
Search
Search contacts
Add
Add contact to a list
Remove
Remove a contact from a list
Create
Create a deal
Delete
Delete a deal
Get
Get a deal
Get Many
Get many deals
Get Recently Created/Updated
Get recently created/updated deals
Search
Search deals
Update
Update a deal
Create
Create an engagement
Delete
Delete an engagement
Get
Get an engagement
Get Many
Get many engagements
Create
Create a ticket
Delete
Delete a ticket
Get
Get a ticket
Get Many
Get many tickets
Update
Update a ticket

Salesforce supported actions

Add Note
Add note to an account
Create
Create an account
Create or Update
Create a new account, or update the current one if it already exists (upsert)
Delete
Delete an account
Get
Get an account
Get Many
Get many accounts
Get Summary
Returns an overview of account's metadata
Update
Update an account
Create
Create a attachment
Delete
Delete a attachment
Get
Get a attachment
Get Many
Get many attachments
Get Summary
Returns an overview of attachment's metadata
Update
Update a attachment
Add Comment
Add a comment to a case
Create
Create a case
Delete
Delete a case
Get
Get a case
Get Many
Get many cases
Get Summary
Returns an overview of case's metadata
Update
Update a case
Add Contact To Campaign
Add contact to a campaign
Add Note
Add note to a contact
Create
Create a contact
Create or Update
Create a new contact, or update the current one if it already exists (upsert)
Delete
Delete a contact
Get
Get a contact
Get Many
Get many contacts
Get Summary
Returns an overview of contact's metadata
Update
Update a contact
Create
Create a custom object record
Create or Update
Create a new record, or update the current one if it already exists (upsert)
Delete
Delete a custom object record
Get
Get a custom object record
Get Many
Get many custom object records
Update
Update a custom object record
Upload
Upload a document
Get Many
Get many flows
Invoke
Invoke a flow
Add Lead To Campaign
Add lead to a campaign
Add Note
Add note to a lead
Create
Create a lead
Create or Update
Create a new lead, or update the current one if it already exists (upsert)
Delete
Delete a lead
Get
Get a lead
Get Many
Get many leads
Get Summary
Returns an overview of Lead's metadata
Update
Update a lead
Add Note
Add note to an opportunity
Create
Create an opportunity
Create or Update
Create a new opportunity, or update the current one if it already exists (upsert)
Delete
Delete an opportunity
Get
Get an opportunity
Get Many
Get many opportunities
Get Summary
Returns an overview of opportunity's metadata
Update
Update an opportunity
Query
Execute a SOQL query that returns all the results in a single response
Create
Create a task
Delete
Delete a task
Get
Get a task
Get Many
Get many tasks
Get Summary
Returns an overview of task's metadata
Update
Update a task
Get
Get a user
Get Many
Get many users

FAQs

  • Can HubSpot connect with Salesforce?

  • Can I use HubSpot’s API with n8n?

  • Can I use Salesforce’s API with n8n?

  • Is n8n secure for integrating HubSpot and Salesforce?

  • How to get started with HubSpot and Salesforce integration in n8n.io?

Looking to integrate HubSpot and Salesforce in your company?

Over 3000 companies switch to n8n every single week

Why use n8n to integrate HubSpot with Salesforce

Build complex workflows, really fast

Build complex workflows, really fast

Handle branching, merging and iteration easily.
Pause your workflow to wait for external events.

Code when you need it, UI when you don't

Simple debugging

Your data is displayed alongside your settings, making edge cases easy to track down.

Use templates to get started fast

Use 1000+ workflow templates available from our core team and our community.

Reuse your work

Copy and paste, easily import and export workflows.

Implement complex processes faster with n8n

red iconyellow iconred iconyellow icon