Route new HubSpot leads to the right sales territory

By General Input

When a new contact lands in HubSpot, we work out where they are connecting from, note the company behind it, and post them to the right territory channel.

Integrations

  • HubSpot
  • IPinfo
  • Slack Bot

Type

Agentic Task

Categories

  • Sales

Whenever a new contact is created in HubSpot, look up where that lead is connecting from, save what I learn back onto the contact, and route them to the right sales territory channel in Slack. Use a poll trigger on HubSpot for newly created contacts.

HubSpot records the visitor IP address on the contact, so the new contact from the trigger already carries what the lookup needs and there is no extra fetch. Read the IP address from the contact. If the contact has no IP address, or the address is a private or non routable one, skip that contact and do nothing.

Run the IPinfo Get Full IP Details operation on that address to resolve the city, region, country and timezone.

Then run the IPinfo Core / Plus IP Lookup on the same address to surface the company and network owner behind it, along with the privacy and network type flags that say whether this is a residential ISP connection or a datacenter or hosting range.

If the lookup shows the address belongs to a VPN, a proxy, a Tor exit node, or a hosting or datacenter provider, do not assign a territory. The location is not trustworthy enough to route on. Flag the lead for manual review instead: post it to the manual review channel in Slack with the contact details, the raw location, the network owner, and the reason it was held back. Do not post it to a territory channel.

For every other lead, write the resolved country, region, timezone and network owner back onto the contact with the HubSpot Update Contact operation.

Then run HubSpot Search Companies on the organisation name behind the IP to check whether that account already exists in my CRM, so we do not open a duplicate account. Treat a confident name match as an existing account and anything else as net new. Do not create a company record either way; this step is only a check.

Finally, post to the Slack channel for the matching sales territory using the Slack Bot Send a Message operation. Map the resolved country to a territory: Europe, the Middle East and Africa go to the EMEA channel, North and South America go to the AMER channel, and Asia Pacific countries go to the APAC channel. If the country does not map cleanly to one of the three, send it to the manual review channel rather than guessing.

Each territory message should name the contact and their email, the city, region and country the lead is connecting from, the inferred company and network owner, and whether that organisation is an existing account or net new. Keep it to a short readable summary a rep can act on, and link to the HubSpot contact record where possible.

Related prompts

Explore more prompts
A brand asset library your marketing team actually searchesTurn Mailjet email clicks into ranked HubSpot follow-upsClean out the Looker dashboards and Looks nobody opensLiveKit live operations console for room moderationWake up dormant Keap leads with a researched reasoniMessage campaign console with pre-flight checks and delivery boardLiveChat coverage board for planning next week's shiftsPhone routing control panel for LiveKit voice agentsA searchable RFP answer library your bid team drafts fromLinkedIn Ads budget pacing dashboard for every client account