Skip to main content

Enforce sales rules of engagement with AgentMail for HubSpot teams

Workflow preview

Workflow preview
100%
Enforce sales rules of engagement with AgentMail for HubSpot teams preview
Open on n8n.io

1. Workflow Overview

Who’s it for This is for SaaS founders, agency owners, and Sales Ops managers who use HubSpot but are tired of "toe stepping." If your BDRs are accidentally emailing your AE’s active deals, or Mark...

Best for

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

Tools used

n8n-nodes-base.stickynote, n8n-nodes-base.datatable, n8n-nodes-base.code, n8n-nodes-base.httprequest, n8n-nodes-base.manualtrigger, n8n-nodes-base.switch, n8n-nodes-base.webhook, n8n-nodes-base.if

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Enforce sales rules of engagement with AgentMail for HubSpot teams
Workflow name
Enforce sales rules of engagement with AgentMail for HubSpot teams

Who’s it for

This is for SaaS founders, agency owners, and Sales Ops managers who use HubSpot but are tired of "toe-stepping." If your BDRs are accidentally emailing your AE’s active deals, or Marketing is blasting "Closed Won" accounts with generic newsletters, your CRM has failed you. This template is for teams that want infrastructure-level enforcement of their sales hierarchy using AgentMail.

How it works / What it does

CRM "Rules of Engagement" are often ignored because human laziness is stronger than your HubSpot setup. This agnostic flow moves enforcement from the CRM dashboard directly to your email infrastructure:

  • The Deal Shield: When an AE (Priority 3) sends an email, the BDR and Marketing inboxes are automatically blocked at the server level for that specific lead.
  • Pro Triple-Threat Routing: Detects "HOT" signals in replies (e.g., "pricing", "demo") and automatically labels the thread while shielding the lead from automated marketing drips.
  • Market Refresh: An automated weekly decay timer releases "Soft Blocks" after your defined window (e.g., 30 days), ensuring your reachable market doesn't shrink into a black hole.

Requirements

  • AgentMail Account: You need an API key from the AgentMail Console.
  • n8n Instance: Must support native Data Tables.

How to set up

  1. Initialize the Brain: Click "Execute Workflow" on the DATABASE SETUP trigger. This creates your Team_Config Data Table automatically.
  2. Set Your Rules: Go to the Data Tab (left menu) in n8n and enter your rep emails and priorities. (AE = 3, BDR = 2, Mkt = 1).
  3. Bootstrap Webhooks: Run the Layer 1 trigger once to automatically register your n8n URLs as webhooks in AgentMail.
  4. Activate: Toggle the workflow to Active. The infrastructure is now the Law—reps cannot bypass these blocks.

How to customize the workflow

To add more tiers (e.g., an Account Management team), simply add a new row to the Team_Config Data Table. The hierarchy logic is fully dynamic: any new tier added will automatically block those with a lower priority integer. No code or regex editing is required.

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 - Note: Database Setup

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

Block 2 - 1. Create Schema

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

Block 3 - 2. Generate Baseline Tiers

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

Block 4 - 3. Populate Database

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

Block 5 - GET Block Lists

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

Block 6 - 📊 Compile Audit Report

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

Block 7 - When clicking ‘Execute workflow’

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

Block 8 - 🔧 Build Config

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

Block 9 - Note: Layer 2

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

Block 10 - ⚙️ Load Team_Config

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

Block 11 - Note: Layer

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

Block 12 - Note: Decay Timer

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

Block 13 - ⚙️ Read Team_Config

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

Block 14 - 📊 Decay Report

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

Block 15 - 📋 All Clear

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

Block 16 - Note: Overview1

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

Block 17 - 📥 Fetch Live Inboxes

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

Block 18 - 🔍 Compare + Tier Check

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

Block 19 - 🔀 Route Decision

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

Block 20 - 🔀 Fan Out Missing

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

Block 21 - 📬 Create Missing Inboxes

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

Block 22 - 🔗 Aggregate Creations

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

Block 23 - 📋 Final Fetch

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

Block 24 - ✅ Provisioning Report

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

Showing the first 24 of 65 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Enforce sales rules of engagement with AgentMail for HubSpot teams
Complexity advanced
Nodes 65
Categories CRM, AI Summarization
Author Stephan Koning
Published 17 Apr 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/15122/15122.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 Enforce sales rules of engagement with AgentMail for HubSpot teams do?

Who’s it for This is for SaaS founders, agency owners, and Sales Ops managers who use HubSpot but are tired of "toe stepping." If your BDRs are accidentally emailing your AE’s active deals, or Mark...

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, AI Summarization use case.