Route inbound email leads into HubSpot with Slack alerts
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.
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.
What does this prompt do?
- Reads new inbound emails every 15 minutes during your working hours across Gmail or Outlook.
- Classifies each message as sales inquiry, support request, vendor pitch, newsletter, or noise, and ignores the noise.
- Logs sales leads into HubSpot, creating the contact if it does not exist yet, and attaches a note with the email excerpt and detected intent.
- Alerts your sales channel in Slack when something looks urgent or high value, with a link back to the original thread.
- Stages a suggested first reply as a draft in your mailbox so you can review and edit before sending.
What do I need to use this?
- A Nylas account connected to your Gmail or Microsoft Outlook mailbox.
- A HubSpot login with permission to search contacts, create contacts, and add notes.
- A Slack workspace and a sales channel you want the alerts posted in.
How can I customize it?
- Change how often it runs and which hours count as business hours.
- Adjust which sender types or keywords count as urgent or high value.
- Tweak the tone, signature, and template used for the suggested draft reply.
- Pick which HubSpot properties get filled in when a brand new contact is created.
FAQs
Does this work with both Gmail and Outlook?
Will it send emails on my behalf without me seeing them?
What happens if the sender is already a contact in HubSpot?
How does it decide what counts as urgent?
Will it spam my Slack channel with newsletters and receipts?
Related templates
Every weekday at 10am, an AI voice agent phones your most overdue Xero accounts, logs what each customer promised, and reports back to finance in Slack.
Every couple of hours we find the chats your team never answered, email those visitors a real reply, and hand the sensitive ones to a support lead.
Twice a day we spot the people clicking your pricing and demo pages, create a follow-up task for their owner, and post a ranked recap to Slack.
Build every text campaign in one screen: check who is actually reachable, see a realistic send plan, then watch delivery land row by row.
Score last week's finished live chats against one rubric, let an AI grader draft the notes with quotes, and send coaching straight to the agent.
Every proposal you have ever submitted in one searchable archive, with the closest past answers lined up against each question in a new RFP.
Stop letting good leads sit in your inbox.
Connect Nylas, HubSpot, and Slack once. Every 15 minutes we sort your inbox, log new leads in your CRM, and get a reply ready for you to send.