Outlook inbox triage agent for urgent clients and sales replies

Run every 30 minutes during work hours, classify new Outlook email, ping Slack on urgent client issues, and log sales replies to HubSpot.

Agentic Task
Microsoft OutlookSlackHubSpotSalesOperationsEmail AutomationFeedback TriageNotifications & Alerts

Build me a recurring inbox triage agent over Microsoft Outlook that runs on a cron schedule every 30 minutes during work hours (Monday to Friday, 8am to 7pm in my local timezone).

On each run, use Microsoft Outlook's List Messages operation to fetch unread messages from the Inbox folder that were received after the last processed message timestamp. Persist that timestamp between runs so the next invocation only sees new mail. If this is the very first run, default the watermark to one hour before now so we don't backfill.

For each new message, read the subject, sender, and body, then classify it into exactly one of: urgent client issue, sales lead reply, internal, newsletter, or spam. Treat senders from my own company domains as internal. Treat unsubscribe headers, list-id headers, and bulk marketing footers as newsletter. Treat low-quality cold outreach as spam.

If the classification is urgent client issue: post a formatted message to the Slack channel I designate as the urgent client channel using Slack's Send a Message operation. The message should include the sender, subject, a one-paragraph AI summary of the issue, suggested next step, and the Outlook web permalink to the original message.

If the classification is sales lead reply: first call HubSpot's Search Contacts operation to find a contact matching the sender's email. If no contact exists, call HubSpot's Create Contact operation with the sender's email and parsed name. Then call HubSpot's Create Note operation associated with that contact, with a body that contains a one-line AI summary of the reply plus the original message snippet and the Outlook permalink. After the HubSpot work is done, post a lightweight ping to the Slack sales channel using Send a Message with the contact name, company if known, the one-line summary, and the HubSpot contact link.

If the classification is internal, newsletter, or spam: do nothing. Leave the message untouched in Outlook (do not mark as read, do not move, do not delete).

After processing the batch, update the stored last-processed timestamp to the maximum receivedDateTime across the messages handled in this run. If a single message fails (Slack 5xx, HubSpot rate limit, etc.), log it and skip ahead so one bad message does not block the rest, and do not advance the watermark past the failed message so it gets retried next run.

Inputs I'll configure: the urgent client Slack channel ID, the sales Slack channel ID, my list of internal email domains, and an optional allowlist of VIP client domains that should always classify as urgent client issue. Use my connected Microsoft Outlook, Slack, and HubSpot accounts.

Additional information

What does this prompt do?
  • Polls Microsoft Outlook every 30 minutes during work hours for unread Inbox messages received since the last run.
  • Classifies each message as urgent client issue, sales lead reply, internal, newsletter, or spam.
  • Posts a formatted summary plus message permalink to a designated Slack channel for urgent client issues.
  • Looks up or creates the HubSpot contact for sales replies, attaches a Create Note engagement with an AI summary, and pings a Slack sales channel.
  • Tracks the last processed message timestamp so each run only handles new mail and never double-acts.
What do I need to use this?
  • A Microsoft Outlook account connected with Mail.Read scope.
  • A Slack workspace with chat:write access on the urgent and sales channels.
  • A HubSpot account with crm.objects.contacts.read/write and notes write scopes.
  • Channel IDs (or names) for the urgent client channel and the sales ping channel.
  • Optional: a list of internal email domains so internal mail is classified correctly.
How can I customize it?
  • Tighten or loosen the cron window (for example, every 15 minutes, or weekends off).
  • Adjust the classification rules and the keywords that mark a message as an urgent client issue.
  • Change the Slack channels, swap the AI summary tone, or add a HubSpot Create Task instead of a note for sales replies.

Frequently asked questions

How does the agent avoid processing the same email twice?
It tracks the last processed message timestamp between runs and uses Outlook's List Messages with a received-after filter, so each run only sees mail that arrived since the previous one.
Why a cron schedule instead of a real-time email trigger?
Microsoft Outlook does not have a first-class poll trigger on this platform, so a 30-minute cron over List Messages is the supported pattern. You can shorten the interval if you need faster response.
What happens to newsletters and spam?
They are classified and ignored. The agent leaves them untouched in the Inbox so your existing rules and read state stay intact.
Will this create duplicate contacts in HubSpot?
No. The agent first runs Search Contacts by email and only calls Create Contact when no match is found, then attaches the Create Note engagement to the resolved contact.
Can I add more categories or routes?
Yes. The classification list is part of the agent instructions, so you can add categories like billing or partnerships and route each one to a different Slack channel or HubSpot action.

Stop hand-sorting your Outlook inbox.

Connect Outlook, Slack, and HubSpot once, and Geni triages new mail every 30 minutes during work hours.