Skip to content

Start building

Use cases

How to build an AI email assistant that sorts your inbox

An AI email assistant is an agent with access to your mailbox that runs on a schedule: it reads new messages, sorts them with labels, archives what needs no action, and tells you what does. Replies are the one thing it should not send alone, so each one waits for your approval.

Updated · 4 min read

An example run: the assistant sorts new mail, posts a summary to Slack, and its one reply waits for approval.

What can an AI email assistant do?

  • Read new mail every half hour, or on any schedule you choose.
  • Sort it with your own labels: customers, invoices, newsletters, needs a reply.
  • Archive what needs no action, and star what is urgent.
  • Post a short summary to Slack: who wrote, what they want, what is waiting on you.
  • Write a reply in the same thread, and send it once you approve it.

The value is in the sorting and the summary: instead of opening every message, you read one list of what needs you.

Which mailbox actions can the assistant use?

  • Gmail

    Action
    Search messages (Gmail search syntax)
    Reads or writes
    Reads
  • Gmail

    Action
    Get a message
    Reads or writes
    Reads
  • Gmail

    Action
    List labels
    Reads or writes
    Reads
  • Gmail

    Action
    Add or remove labels (mark read, archive, star)
    Reads or writes
    Writes
  • Gmail

    Action
    Send an email, also as a reply in a thread
    Reads or writes
    Writes
  • Outlook

    Action
    List and search messages
    Reads or writes
    Reads
  • Outlook

    Action
    Get a message
    Reads or writes
    Reads
  • Outlook

    Action
    Reply to a message
    Reads or writes
    Writes
  • Outlook

    Action
    Send an email
    Reads or writes
    Writes

There is no action that deletes mail in either connector. In Gmail, archiving means removing the Inbox label, and the assistant can only apply labels you have already created.

How do you build the email assistant, step by step?

In MyDeepAgents, with Gmail and Slack:

  1. Create the labels you want in Gmail first, such as Customers, Invoices and Needs reply.
  2. Connect Gmail in the console by signing in with Google, and connect Slack with an incoming webhook for the channel that gets the summary.
  3. Create an agent with Search messages, Get a message, List labels, Add or remove labels, Send an email and Slack’s Post a message.
  4. Leave approval on for Send an email. Labels are easy to undo, so you can switch approval off for them once you trust the sorting.
  5. Write the instructions: what each label means, what to archive, what counts as urgent, how to reply and in whose voice.
  6. Create a workflow with a schedule trigger, for example every 30 minutes on weekdays in your time zone, and one agent step that asks it to process unread mail in the inbox.
  7. Watch the first runs in the run history, read each tool call, and adjust the instructions.

With Outlook the steps are the same, without labels: the assistant reads, summarizes and replies in the thread.

How do you approve the assistant’s replies?

When the assistant wants to send, the run stops and a person is asked, in the console and by email. The request shows the whole message: recipient, subject and body. Approve it and the email goes; reject it and the agent is told, and carries on with the rest of the inbox.

Keep approval on for anything that leaves your company. See human-in-the-loop approvals.

Is it safe to give an AI agent access to email?

  • The agent never sees your password or token. You sign in once; the platform stores the token encrypted and makes each call for the agent.
  • Email is marked as personal data, so your organization’s compliance profile and policies apply to every mailbox action.
  • Only the actions you add. An assistant that only summarizes needs only the read actions.
  • Each run is recorded, so you can see exactly which messages it opened and what it changed.

Use a mailbox the agent is meant to work on, such as a shared support or sales address, before you connect your personal one.

Key points

  • An email assistant is an agent on a schedule with access to one mailbox.
  • It reads, labels, archives and summarizes on its own; replies wait for approval.
  • Gmail and Outlook connect with an OAuth sign-in, and neither connector can delete mail.
  • Create Gmail labels first: the assistant applies existing labels only.
  • A Slack summary turns a full inbox into one list of what needs you.

Questions people also ask

Can the AI assistant reply to emails automatically?

It can, if you switch off approval for sending. Most people keep approval on, so each reply is read before it goes.

Does it work with Outlook as well as Gmail?

Yes. Outlook connects with a Microsoft sign-in, and the assistant can list, search, read and reply to messages. Labels are Gmail only.

How often does the assistant check the inbox?

As often as its schedule says: any cron schedule, in your time zone. Every 15 to 30 minutes on working days is typical.

Can it save replies as drafts instead of sending them?

Not as Gmail or Outlook drafts. Approval does the same job: the reply waits, fully written, until you approve or reject it.

Early access

Put an agent to work

Build an agent, connect it to your tools, and decide what it may do on its own. Or tell us what you want it to do.