Route inbound email leads into HubSpot with Slack alerts

By General Input

Every 15 minutes during business hours, sort new inbound emails, sync sales inquiries to HubSpot, ping Slack on urgent ones, and stage a suggested reply.

Integrations

  • Nylas
  • HubSpot
  • Slack

Type

Agentic Task

Categories

  • Sales
  • Operations

Build an agent workflow that triages my inbound email inbox and routes sales leads into HubSpot with a Slack alert on the urgent ones.

Trigger: run on a cron every 15 minutes during business hours (Monday to Friday, 8am to 6pm in my local timezone).

On each run, use the Nylas List Messages operation to pull unread inbound messages received since the last run. Pass a provider-native search filter through search_query_native so it works for both Gmail (Gmail search operators like is:unread newer_than:1h -in:sent) and Microsoft Outlook (KQL like isRead:false received>=<timestamp>) out of the same workflow. Limit to the most recent 50 messages per run to stay under rate limits.

For each message, classify the intent as one of: sales_inquiry, support_request, vendor_pitch, newsletter, or noise. Also extract the sender's display name, their company (from the email domain or signature), and a one-sentence summary of the core ask. Skip anything classified as newsletter, vendor_pitch, or noise. Do not process it further.

For messages classified as sales_inquiry: call HubSpot Search Contacts by email to see if the sender already exists. If no contact is found, call HubSpot Create Contact with their email, first name, last name, company, and lifecycle stage set to lead. Then call HubSpot Create Note associated with that contact, containing the email excerpt (first ~500 chars), the detected intent, and the extracted core ask.

For anything you judge urgent or high value (an obvious buying signal, a decision-maker at a target-size company, a time-sensitive question, or an existing HubSpot contact in an open deal), call Slack Send a Message to post a short summary to a channel called #sales-inbox. Include the sender, company, intent, one-line summary, and a link back to the original email thread. Do not post low-signal messages to Slack.

For every sales_inquiry (urgent or not), use Nylas Create Draft to stage a suggested first reply in my mailbox. Address it to the sender, keep it short (3 to 5 sentences), match a friendly professional tone, acknowledge their ask, propose a next step (a 20-minute call or a scoped answer), and sign off with my name. Do not send the draft. Leave it in Drafts so I can review and send manually.

Track which message IDs have already been processed so the next run does not re-triage the same email. A simple in-workflow state or timestamp checkpoint on last processed received_at is fine.

Integrations to use: Nylas (List Messages, Create Draft), HubSpot (Search Contacts, Create Contact, Create Note), Slack (Send a Message). Do not use any other services.

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