Skip to main content

Auto-assign deals in Hubspot to fitting sales reps based on geo and company size

Workflow preview

Workflow preview
100%
Auto-assign deals in Hubspot to fitting sales reps based on geo and company size preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Use case To guarantee an effective sales process deals must be distributed between sales reps in the best way. Normally, this involves manually assigning new deals that have come in. This workflow ...

Best for

  • CRM automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.scheduletrigger, n8n-nodes-base.httprequest, n8n-nodes-base.filter, n8n-nodes-base.splitout, n8n-nodes-base.switch, n8n-nodes-base.hubspot, n8n-nodes-base.stickynote

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Niklas Hatje.

Original n8n.io source

1.1 Workflow description

Title
Auto-assign deals in Hubspot to fitting sales reps based on geo and company size
Workflow name
Auto-assign deals in Hubspot to fitting sales reps based on geo and company size

Use case

To guarantee an effective sales process deals must be distributed between sales reps in the best way. Normally, this involves manually assigning new deals that have come in. This workflow automates it for you!

What this workflow does

This workflow runs once a day and checks for unassigned deals in your Hubspot CRM. Once it finds one, it enriches the deal with information about the assigned contact and their company. It then checks the region of the assigned company before looking at the company's employee size. Based on this, it assigns the deal to the right sales rep within your company.

Requirements

  • New deals in Hubspot need to be unassigned in the beginning
  • New deals have to have an attached contact that has an attached company in Hubspot
  • The company needs to have values for region and employee count in Hubspot

Setup

The setup is quite straight forward and will probably take a few minutes only.

  1. Add your Hubspot credentials
  2. Customize your criterias for assigning deals in the Assign by Region and the following Assign nodes
  3. Make sure deals are assigned to the right salesrep in the Hubspot nodes at the end
  4. Activate the workflow

Customizing this to your needs

  • Adjust the trigger interval to your needs. Currently, it defaults to once a day
  • Adjust your region settings by adding/updating/removing options in the respective node
  • Adjust your employee size settings by adding/updating/removing options in the respective node

Ideas to enhance this flow

  • Wrap each region's assigned criteria into different sub-workflows for easier maintainability. This will not consume additional execution counts.
  • Add more logic on what happens once a deal does not match any criteria you've set

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Schedule Trigger

Type / Role
n8n-nodes-base.scheduleTrigger - scheduleTrigger
Config choices
Version 1.1

Block 2 - Get Deals

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.1

Block 3 - Get contact for deals

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.1

Block 4 - Unassigned Deals

Type / Role
n8n-nodes-base.filter - filter
Config choices
Version 2

Block 5 - Split out deals

Type / Role
n8n-nodes-base.splitOut - splitOut
Config choices
Version 1

Block 6 - Assign by Region

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 3

Block 7 - Assign deal to John

Type / Role
n8n-nodes-base.hubspot - hubspot
Config choices
Version 2

Block 8 - Assign to Max

Type / Role
n8n-nodes-base.hubspot - hubspot
Config choices
Version 2

Block 9 - Assign to Eeden

Type / Role
n8n-nodes-base.hubspot - hubspot
Config choices
Version 2

Block 10 - Assign to Peter

Type / Role
n8n-nodes-base.hubspot - hubspot
Config choices
Version 2

Block 11 - Get company of contact(s)

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.1

Block 12 - Assign US deals by company size

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 3

Block 13 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 14 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 15 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 16 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 17 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 18 - Sticky Note5

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 19 - Assign deal to Edward

Type / Role
n8n-nodes-base.hubspot - hubspot
Config choices
Version 2

Block 20 - Assign to Michael

Type / Role
n8n-nodes-base.hubspot - hubspot
Config choices
Version 2

Block 21 - Assign to Suka

Type / Role
n8n-nodes-base.hubspot - hubspot
Config choices
Version 2

Block 22 - Assign DE deals by company size

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 3

3. Summary Table

Workflow Auto-assign deals in Hubspot to fitting sales reps based on geo and company size
Complexity advanced
Nodes 22
Categories CRM
Author Niklas Hatje
Published 22 Feb 2024

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/2117/2117.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Auto-assign deals in Hubspot to fitting sales reps based on geo and company size do?

Use case To guarantee an effective sales process deals must be distributed between sales reps in the best way. Normally, this involves manually assigning new deals that have come in. This workflow ...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your CRM use case.