Shata Solutions
← Back to marketplace
Sales Automation

Lead Router by Territory

Lead Router by Territory — orchestrates HubSpot, Salesforce, Gmail, Slack to automate this workflow with field mapping, notifications, and audit logging.

Automation overview

What this automation does

This automation starts when hubSpot and Salesforce event matching Lead Router by Territory business rules. It salesforce router, gmail router, slack router, and openai router, then tune thresholds and field maps in the install wizard.

Trigger
HubSpot and Salesforce event matching Lead Router by Territory business rules
Main actions
Salesforce router → Gmail router …
Final outcome
Tune thresholds and field maps in the install wizard.
Execution time
30–90 seconds
Apps used
5 integrations
AI-powered
No
Difficulty
Beginner
Beginner
Workflow diagram

End-to-end scenario flow

Read-only visualization of how data moves from trigger to final result.

Trigger
HubSpot
Event detected
Step 1
Salesforce
Router
Step 2
Gmail
Router
Step 3
Slack
Router
AI
OpenAI
Router
Result
OpenAI
Workflow complete
Step-by-step

How each step runs

  1. 1
    HubSpotTrigger
    Event detected

    HubSpot and Salesforce event matching Lead Router by Territory business rules

  2. 2
    Salesforce
    Router

    When triggered (HubSpot and Salesforce event matching Lead Router by Territory business rules), this workflow validates the payload, applies deduplication, sync

  3. 3
    Gmail
    Router

    When triggered (HubSpot and Salesforce event matching Lead Router by Territory business rules), this workflow validates the payload, applies deduplication, sync

  4. 4
    Slack
    Router

    When triggered (HubSpot and Salesforce event matching Lead Router by Territory business rules), this workflow validates the payload, applies deduplication, sync

  5. 5
    OpenAI
    Router

    When triggered (HubSpot and Salesforce event matching Lead Router by Territory business rules), this workflow validates the payload, applies deduplication, sync

  6. 6
    OpenAI
    Workflow complete

    Tune thresholds and field maps in the install wizard.

Apps used

Connected applications

HubSpot

Router

Salesforce

Router

Gmail

Router

Slack

Router

OpenAI

Router

Summary

Automation summary

Trigger
HubSpot and Salesforce event matching Lead Router by Territory business rules
Inputs
HubSpot and Salesforce event matching Lead Router by Territory business rules, Business Name, Notification Email, Timezone
Outputs
Tune thresholds and field maps in the install wizard., Slack router, OpenAI router
Business goal
Automate lead router by territory end-to-end with accurate app routing.
Execution frequency
Real-time on event
Estimated runtime
30–90 seconds
Error handling
Failed steps retry up to 3 times with exponential backoff; persistent failures notify your configured channel and log to the run history.
Dependencies
HubSpot, Salesforce, Gmail
Benefits

Why use this automation?

Save ~7 hours/week

Remove repetitive steps from Lead Router by Territory so your team focuses on high-value work.

Reduce manual work

Connected apps sync data automatically instead of copy-paste between dashboards.

Prevent human errors

Standardized logic runs the same way every time, with retries on failure.

Faster response times

Events trigger immediate actions instead of waiting for someone to check a queue.

Requirements

What you need to get started

Required apps

  • HubSpot
  • Salesforce
  • Gmail

Required accounts

  • Active HubSpot workspace with API access
  • Active Salesforce workspace with API access
  • Active Gmail workspace with API access
  • Shata Automation workspace (free tier supported)

Required API keys

  • OAuth tokens for each connected integration

Permissions

  • Read access on trigger sources (forms, sheets, webhooks, or CRM objects)
  • Write access on destination apps (email, chat, CRM, or storage)

Estimated setup time

  • 10 min including app authorization and test run
  • Difficulty: Beginner

Optional apps

  • Slack (optional)
  • OpenAI (optional)

Automation runtime

Activate this template

PartialSome steps run in preview until their integrations go live.

Connect required apps via OAuth or API keys. Credentials are encrypted server-side. Dev test runs mock external actions when connections are missing.

Draft
0%
Activation readiness

Est. setup time: ~14 min

Required connections

  • HubSpot(required)
    PreviewHubSpot: workflow actions run in preview
    Missing
  • salesforce(required)
    Previewsalesforce: workflow actions run in preview
    Missing
  • Gmail(required)
    Missing
  • Slack(required)
    Missing
  • Missing connection: HubSpot
  • Missing connection: salesforce
  • Missing connection: Gmail
  • Missing connection: Slack
Manage all connections →View all installations →

Workflow summary

Trigger
HubSpot and Salesforce event matching Lead Router by Territory business rules
Steps
6 nodes
Required apps
4
Optional apps
1

Trigger

Manual trigger

Run workflows on demand via Test run or Live test. Activate to enable scheduled/webhook triggers on other templates.

Run history

No runs yet. Install the template and run a test, or activate to receive webhook/schedule runs.

PremiumBeginnerPartial10 min setup4.41.6k installs · 180 reviews
Customize for My Business
Analytics

Template performance

18.8k
Views
1.6k
Installs
341
Favorites
4.4
Avg rating
8.3%
Conversion
10 min
Setup time
97%
Success rate
71
Trending score
Most used integrations
HubSpotSalesforceGmail

When triggered (HubSpot and Salesforce event matching Lead Router by Territory business rules), this workflow validates the payload, applies deduplication, syncs data across HubSpot, Salesforce, Gmail, Slack, and notifies stakeholders in Slack or email. Lead Router by Territory includes configurable filters, retry on transient API errors, and optional GPT-4o steps for classification or summarization when the use case involves structured data routing. Tune thresholds and field maps in the install wizard.

Some steps run in preview until their integrations go live.

Required apps
HubSpotPreviewSalesforcePreviewGmailLiveSlackLive
Optional apps
OpenAILive
All integrations
HubSpotSalesforceGmailSlackOpenAI
Workflow preview

How Lead Router by Territory runs

1
Trigger
Configure trigger
2
Process
Rule engine
3
Action
hubspot
4
Notify
Alert & log
HubspotSalesforceGmailSlackOpenai
Setup steps

Get started in 5 steps

  1. 1
    Connect required apps

    Authorize HubSpot, Salesforce, Gmail, Slack with least-privilege OAuth scopes for Lead Router by Territory.

  2. 2
    Configure trigger

    Set trigger: HubSpot and Salesforce event matching Lead Router by Territory business rules. Enable idempotency keys for webhook retries.

  3. 3
    Map and transform data

    Align source fields to destination schema; apply filters and business rules.

  4. 4
    Execute routing logic

    Branch on priority, tier, or category; route to correct queue or sheet tab.

  5. 5
    Notify and log

    Post Slack summary or email digest; append audit row to Google Sheets.

Variables

Configurable settings

VariableTypeDefaultRequired
Business NametextYour BusinessYes
Notification EmailemailYes
TimezoneselectYes
Slack Channeltext#generalNo
Gmail Search Querytextis:unreadNo
FAQ

Frequently asked questions

Can I change the connected apps?

Swap connectors in the install wizard—workflow logic for Lead Router by Territory remains the same.

Failure handling?

Failed steps retry 3× with backoff; permanent failures alert Slack #automation-alerts.

Test before go-live?

Use sandbox mode with sample webhook payload; review run history before activating.

Get started

Customize Lead Router by Territory for your business

Our team can adapt this template to your exact workflow, apps, and brand requirements.