Online Tools Directory

Extract All Email Data (Including Categories) to a SharePoint List with Power Automate

Learn how to extract all email data, including Outlook categories, into a SharePoint list using Power Automate and Microsoft Graph API.
Extract All Email Data (Including Categories) to a SharePoint List with Power Automate

Managing emails efficiently is a challenge for many organizations. Moving email content—such as sender, recipients, subject, and attachments—into a SharePoint list can unlock powerful reporting and automation. But what if you also need to capture the Outlook category?

By default, Power Automate (Microsoft Flow) doesn’t expose categories in the standard Outlook connector. Luckily, there’s a workaround: combining Power Automate with the Microsoft Graph API.

The Challenge: Capturing Outlook Categories

A common requirement is to build a Power Automate flow that pushes emails into a SharePoint list. Standard fields like subject, body, and attachments work fine with the Outlook connector. However, categories are not available as an expression.

This limitation makes it difficult to track or report on categorized emails in SharePoint—unless we extend the solution.

The Solution: Power Automate + Microsoft Graph API

The missing piece comes from the Microsoft Graph API, which provides full access to Outlook message properties, including categories. By calling the Graph API within a flow, you can retrieve the categories property and store it alongside your email data in SharePoint.

Step-by-Step Guide

1. Create Your SharePoint List

Set up a list with columns for:

  • From
  • To
  • Subject
  • Body
  • Attachments
  • Category

2. Build the Flow in Power Automate

Start with a trigger such as:

  • When a new email arrives
    or
  • For a selected email

This will provide the messageId you’ll use later.

3. Extract Standard Email Data

Use the Outlook connector to capture:

  • Sender
  • Recipients
  • Subject
  • Body
  • Attachments

4. Call Microsoft Graph API

Add an HTTP action to fetch categories with:

GET https://graph.microsoft.com/v1.0/me/messages/{messageId}
  • Replace {messageId} with the dynamic value from the email trigger.
  • Ensure the flow has proper Graph permissions (e.g., Mail.Read).

5. Parse and Store Categories

  • Use Parse JSON to extract the categories field from the API response.
  • Map it to the Category column in your SharePoint list.

6. Create the SharePoint Item

Combine everything into the “Create item” action. Your email data, complete with categories, will now be logged in SharePoint.

Best Practices

  • Permissions: Use Azure AD app registration for secure Graph API calls.
  • Error Handling: Build retries for failed API requests.
  • Performance: Be mindful of throttling on high-volume mailboxes.
  • Security: Protect credentials and sensitive information.

Why This Approach Matters

Outlook categories are often used for internal workflows, prioritization, or compliance. By bringing this metadata into SharePoint, you gain richer reporting, searchable records, and more automation options.

Combining Power Automate with Microsoft Graph turns what seems like a limitation into a powerful integration pattern.

Source: Microsoft Tech Community – Extract all email data including category to a SharePoint list using Power Automate

About the author
Decoge

Decoge

Decoge is a tech enthusiast with a keen eye for the latest in technology and digital tools, writing reviews and tutorials that are not only informative but also accessible to a broad audience.

Online Tools Directory

Discover the Online Tools Directory, your ultimate resource for top digital tools. Enhance productivity, foster collaboration, and achieve business success. Subscribe for updates!

Online Tools Directory

Great! You’ve successfully signed up.

Welcome back! You've successfully signed in.

You've successfully subscribed to Online Tools Directory.

Success! Check your email for magic link to sign-in.

Success! Your billing info has been updated.

Your billing was not updated.