1. Home
  2. Guides
  3. AI Builder & AI
  4. How to organize Outlook emails into folders with AI Builder and Power Automate
AI Builder & AI

How to organize Outlook emails into folders with AI Builder and Power Automate

Build a scheduled flow that runs every night, sends each read email from today to an AI Builder prompt, and moves it into the Outlook folder that matches the category the AI returns.

  • By Nur Islam
  • 10:39 video
  • 8 steps
  • 6.9K views
Jump to a step (8)
Who this is for

Business owners, project managers and admins spend 10 to 30 minutes a day dragging invoices, customer inquiries and project emails into folders. Outlook rules only match keywords, so anything worded differently lands in the wrong place or stays in the inbox.

This is part 2 of the AI email series. In part 1 you built an AI Builder prompt that reads an email's subject, body and sender and returns a category (Invoices, Customer, Projects and so on) as JSON. Here you reuse that prompt in a scheduled flow.

At 11:50 PM each day the flow gets today's read emails from the inbox, runs each one through the prompt and moves it to Inbox/ plus the category name. Because the category names match your folder names exactly, each email lands in the right folder.

What you need

  • The AI Builder email classifier prompt from part 1
  • AI Builder capacity for the Run a prompt action (not included in Business Basic or Standard alone)
  • Outlook folders whose names match the prompt's category names exactly
  • Power Automate with the Office 365 Outlook connector

Step by step

0 of 8 done
  1. 01

    Create the category folders in Outlook

    Create one folder per category. In the video there are seven folders directly under Inbox. You can also put them outside the inbox or under a parent folder like AI Organized, as long as you use the matching path later. The folder names must match the category names your prompt returns. This works the same in Outlook on the web and the desktop app.

  2. 02

    Create a scheduled cloud flow

    In Power Automate select Create > Scheduled cloud flow. Name it Outlook Email Organizer, keep today as the start date and set it to repeat every 1 Day. Select Create.

  3. 03

    Set the run time on the Recurrence trigger

    Open the Recurrence trigger. Set Time Zone to your local time zone, At These Hours to 23 and At These Minutes to 50. The flow then runs at 11:50 PM, just before the day ends. You can switch the frequency to weekly if that suits you better.

  4. 04

    Get today's read emails

    Add Get emails (V3) from Office 365 Outlook.

    • Folder: Inbox (or any folder you want to organize)
    • Fetch Only Unread Messages: No
    • Include Attachments: No
    • Top: 50 (raise it if you get more than 50 emails a day)

    Under Advanced parameters add Search Query and enter received:today isread:true. This picks only today's emails that you have already read, so nothing moves before you see it. The read filter is optional.

  5. 05

    Loop through each email and run the AI prompt

    Add Apply to each and set its input to body/value from Get emails (V3).

    Inside the loop add Run a prompt (AI capabilities) and select your prompt (Microsoft Outlook Email Classifier in the video). Map its three inputs from Get emails (V3): Subject to Subject, Body to Body and Sender to From.

  6. 06

    Move each email to its folder

    Still inside the loop, add Move email (V2) from Office 365 Outlook.

    • Message Id: the Message Id from Get emails (V3) (under See more)
    • Folder: type Inbox/ and then insert the category output from Run a prompt

    When the AI says Invoices, the email moves to Inbox/Invoices, and so on.

  7. 07

    Test the flow

    Save, then select Test and run it manually with Outlook open beside it. Only read emails from today move. Unread emails and older emails stay in the inbox.

  8. 08

    Adjust or pause it

    Change the prompt to add or remove categories (and create matching folders), or change the search query and schedule. To pause the organizer, turn the flow off, and turn it back on when you are ready.

Tips and common problems

  • The category the AI returns must match the folder name exactly. If the prompt says Customer and the folder is Customers, Move email fails.
  • If your folders are not under Inbox, change the folder path prefix to match where they are.
  • Top is set to 50. If you get more emails than that in a day, increase it or some emails stay unsorted.
  • The isread:true filter keeps unread mail in the inbox so you see it first. Remove it if you want everything sorted.
  • Run a prompt is an AI Builder action. It uses AI Builder credits, which standard Microsoft 365 Business plans do not include on their own, so check your tenant's capacity before you build.
Still stuck? Ask AI to help you fix itChatGPTClaudeGeminiCopilotPerplexityGrok

Start with part 1

This flow reuses the email classifier prompt from Part 1: Create an AI email categorizer. Build that prompt first, then come back to add the folder sorting.

Questions

Can Power Automate move Outlook emails to folders based on AI?

Yes. Run an AI Builder prompt on each email to get a category, then use Move email (V2) with the folder path Inbox/ plus that category.

How do I only move emails I have already read?

In Get emails (V3), set Fetch Only Unread Messages to No and add the search query received:today isread:true.

Does AI Builder come with Microsoft 365 Business Standard?

Not on its own. AI Builder actions such as Run a prompt use AI Builder credits, which come with premium Power Automate licensing or add-on capacity. Outlook, Forms and Excel connectors are standard, but the AI step is not.

Video chapters
Ask a question in the comments Last checked 26 Sep 2026. Screens change: if a step looks different, tell me in the comments.