Score new HubSpot leads with RapidAPI and alert SDRs in Slack

By General Input

When a new HubSpot contact appears, enrich and score them through RapidAPI, then ping your SDR channel only when the lead is top tier.

Integrations

  • HubSpot
  • RapidAPI
  • Slack

Type

Agentic Task

Categories

  • Sales

Build me an agent workflow that auto-enriches and scores new inbound leads from HubSpot, then pings the SDR Slack channel only for top-tier leads.

Trigger: a HubSpot outgoing webhook on the contact.creation event. The webhook payload includes the new contact id.

When a new contact comes in, the agent should do the following in order:

1. Use HubSpot Get Contact to load the new contact by id from the webhook payload. Capture email, first name, last name, the captured LinkedIn URL (custom property if the form sets one), and the associated company id and domain if present.

2. Use RapidAPI Call a Subscribed Hub API to hit a LinkedIn profile API I have subscribed on the Hub. Pass the LinkedIn URL from step 1, or fall back to the email if no URL was captured. Capture current company name, title, seniority, location, and a short bio paragraph. The RapidAPI host header (X-RapidAPI-Host) for the LinkedIn provider should be a configurable input at the top of the workflow.

3. Use RapidAPI Call a Subscribed Hub API again, this time against a company data API I have subscribed on the Hub. Pass the company domain (from the contact's associated company in step 1, or derived from the LinkedIn profile in step 2). Capture industry, headcount band, country, and any recent funding round (round name, amount, date) if available. The RapidAPI host header for the company provider should also be a configurable input.

4. Score the contact A, B, or C against an ICP definition I can edit at the top of the workflow with these knobs: target industries (list of strings), headcount range (min and max), and minimum seniority (e.g. Manager, Director, VP, C-level). Default rules: A = matches industry AND headcount AND seniority. B = matches industry AND seniority but headcount is outside the range. C = misses industry OR seniority. Also write a one-sentence rationale that references the specific signals, for example: "Director of Engineering at a 250-person SaaS company in target industry; A-tier match."

5. Use HubSpot Update Contact on the original contact id to write the enriched data back. Use these custom properties (create them in HubSpot if they do not exist): linkedin_url, linkedin_title, linkedin_seniority, linkedin_location, linkedin_bio, company_industry, company_headcount, company_recent_funding, lead_tier (A, B, or C), and lead_tier_rationale. Also stamp an enriched_at timestamp.

6. If and only if the tier is A, use Slack Send a Message to post into a configurable SDR channel. The message should include the lead's full name and email; the company name, industry, and headcount band; an A-tier badge with an emoji; the one-sentence rationale from step 4; and a clickable deep link to the contact in HubSpot (https://app.hubspot.com/contacts/{portalId}/contact/{contactId}). Skip the Slack post entirely for B and C. They still get the enrichment and tier written back to HubSpot, the channel just stays signal-only.

Configurable inputs I want to be able to edit without touching the prompt:

- ICP definition (target industries, headcount range, minimum seniority)

- The Slack channel for A-tier alerts

- The RapidAPI host strings (X-RapidAPI-Host) for the LinkedIn profile API and the company data API, since the user picks which ones they subscribed to

- The HubSpot portal id used to build the contact deep link

Failure modes: if either RapidAPI call returns 403 or 404, write whatever was captured, tag the missing fields on the contact, and score on whatever signals exist. If too little signal exists to score confidently, default to C and say so in the rationale. If both RapidAPI calls fail entirely, still write the basic HubSpot fields, skip the Slack post, and add a low-confidence note on the contact.

Related prompts

Explore more prompts
Call overdue Xero customers with an AI collections agentWin back LiveChat visitors whose chats went unansweredTurn Mailjet email clicks into ranked HubSpot follow-upsiMessage campaign console with pre-flight checks and delivery boardChat quality review board for LiveChat support leadsA searchable RFP answer library your bid team drafts fromSee which target accounts just started advertising on LinkedInAccount health board that puts product usage next to your CRMLook up a customer's full chat history mid conversationLusha prospecting workbench with credit-safe reveals