Triage inbound sales emails into HubSpot deals and Slack

Every five minutes during business hours, real prospect inquiries get logged in HubSpot, acknowledged from your inbox, and posted to your sales channel.

Agentic Task
AgentMailHubSpotSlack BotSalesLead EnrichmentEmail AutomationNotifications & Alerts

Build me an inbound sales lead triage agent on top of AgentMail, HubSpot, and Slack.

Trigger: cron, every 5 minutes from 8am to 7pm on weekdays in my local time zone. Keep track of the last run timestamp so each run only looks at messages received since then.

Each run, do the following:

1. Call AgentMail List Messages on my sales inbox, filtered to messages received since the last run. For every new message, call AgentMail Get Message to load the full thread, sender, subject, and body.

2. For each message, use LLM judgement on the sender domain and the body to decide if it is a real prospect inquiry. Skip newsletters, marketing blasts, vendor pitches, cold outbound, auto-replies, out-of-office, delivery failures, and anything that is clearly not a first-touch buyer message. Be conservative: when in doubt, skip the auto-reply and let a human look at it. Only proceed for messages that look like a genuine human asking about our product or service.

3. For qualifying messages, extract: prospect name, company, email address, and a one or two sentence summary of their stated need.

4. Upsert the contact in HubSpot using Batch Upsert Contacts keyed on email, with first name, last name, email, and company. Then call HubSpot Create Deal in the New Leads pipeline (let me pick the pipeline and stage at setup time), with the deal name set to "<Company> – inbound inquiry" and the inquiry summary plus a quote of the original message saved on the deal so it shows up in deal notes. Associate the deal with the contact (and the company if HubSpot has one).

5. Post a Slack message via Slack Bot Send a Message to the #sales-leads channel (configurable). The message should include: prospect name and company, the one-sentence summary of what they want, the sender's email address, a deep link to the AgentMail thread, and a deep link to the new HubSpot deal.

6. Send a short personalized acknowledgement using AgentMail Reply To Message on the same thread, written in a warm, plain, human tone (two or three sentences) that references what they actually asked about and tells them a real person on the team will follow up shortly. Only send this reply for messages that look like a genuine first-touch human inquiry. Never reply to auto-responders, out-of-office, no-reply senders, or anything you classified as not-a-lead.

Idempotency: keep a record of which message ids have already been processed so a retry or overlapping run does not double-create deals or send duplicate acknowledgements.

Make the inbox address, the HubSpot pipeline and stage, the Slack channel, the business-hours window, and the acknowledgement template all configurable at setup time.

Additional information

What does this prompt do?
  • Watches your sales inbox every five minutes during business hours and reads the full thread of anything new.
  • Filters out newsletters, vendor pitches, and auto-replies so only genuine prospect inquiries make it through.
  • Creates or updates the contact in HubSpot and opens a deal in your New Leads pipeline with a clean summary of what they asked for.
  • Sends a short, personal acknowledgement back from your inbox so the prospect knows a human is on it.
  • Posts a Slack alert to your sales channel with the prospect summary plus deep links to the email thread and the new HubSpot deal.
What do I need to use this?
  • An AgentMail account with the inbox you use for inbound sales inquiries.
  • A HubSpot login with permission to create contacts and deals, plus a pipeline you want new leads to land in.
  • A Slack workspace and the channel where your sales team triages new leads.
How can I customize it?
  • Change how often it runs or narrow the window to your real business hours and time zone.
  • Adjust the filter language to match what counts as a real prospect for your team (and what to always ignore).
  • Tweak the acknowledgement reply, the deal pipeline and stage, or which Slack channel gets pinged.

Frequently asked questions

Will it reply to newsletters or out-of-office bounces?
No. The agent reads the sender and the body and skips anything that looks automated, promotional, or like a vendor pitch. It only replies when a message reads like a genuine first-touch inquiry from a real person.
What if the same prospect emails twice?
Contacts are matched by email, so a second message from the same person updates the existing HubSpot contact instead of creating a duplicate. The agent will still post a Slack alert so your team sees the new thread.
Can I change which HubSpot pipeline or stage the deal lands in?
Yes. The default is a New Leads pipeline, but you can point it at any pipeline and stage you already use. Tell the workflow your pipeline name when you set it up.
How do I change the Slack channel it posts to?
Swap the channel name when you set the workflow up, or edit it later. The Slack message includes the prospect summary plus one-click links to the email thread and the new deal.
Will the acknowledgement email sound like a robot?
The agent writes a short, plain reply that references what the prospect actually asked about, so it reads like a quick human note. You can edit the tone and the signature to match how your team writes.

Stop letting inbound sales leads sit in an inbox.

Connect AgentMail, HubSpot, and Slack once, and Geni triages every real inquiry into your CRM and your sales channel within minutes.