Outlook inbox triage agent for urgent clients and sales replies

By General Input

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

Integrations

  • Microsoft Outlook
  • Slack
  • HubSpot

Type

Agentic Task

Categories

  • Sales
  • Operations

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.

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